The concept that I like the most in this chapter is the notion of having supervision hierarchies. The tree representation is a great way of distributing error recovery responsibilities to nodes, so that each node can monitor the errors in its child nodes. The error recovery mechanism described in this chapter is very robust and I think this approach will allow building very robust software systems. The difficulty that I see in real world application is that it is not always clear to the developers what an error is. The error recovery mechanism here requires the programmers to know exactly what an error is so that an error recovery procedure is initiated whenever that error occurs. This is not an easy task because most of time it only after a crash that the programmer becomes aware of some type of errors.
The author gives the notion of well-behaved functions(WBF) as a way of determining what an error is. WBF are functions that should not generate an exception unless an error is encountered. So this allows the programmer to interpret any exception generated by a WBF as an error. Amount the rules to follow when writing WBF, I found rule 2 interesting. The author advocates raising an exception when the specification is not clear about what to do. I think this is a better approach to determine and address specification errors instead of the programmer making assumptions about the design.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment