In Chapter 5 of Joe Armstrong's thesis, we are introduced to programming fault tolerant systems. Joe begins the chapter discussing the concept of falling back to simpler tasks if what ideally should be done cannot. The idea is that simpler tasks mean simpler code and in theory should be able to succeed even when the more complex tasks cannot. I think Erlang works well with this sort of methodology. Attempting to do this type of fallback in other languages such as C/C++/Java/C# is not always as straightforward as it could be.
Joe also discusses the concept of supervisors in more detail. We were introduced to them in earlier chapters, but in this chapter we began to dig in a little deeper and look at AND vs. OR supervisors. Child tasks monitored by AND supervisors are always restarted together. The premise being that the tasks work in conjunction so if one fails they should all fail. The tasks for OR supervisors are handled independently.
The chapter concludes with discussion on what exactly constitues an error. In my view, an error is essentially any type of problem that was unaccounted for in the code. I think Joe's definition is much more poetic, but in the end I think our philosophy is essentially the same. Again, another good read. On to chapter 6...
Tuesday, November 3, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment