Actors
We are going to look at coding a system in terms of autonomous actors. As you will see, building software in this way takes a different mindset than you might be used to, and it might spur new ways of looking at and solving problems. When every object could potentially come alive, you start to think about what each one of them might want to do now that it has the chance.
We object-oriented programmers are so accustomed to creating classes which combine state or data with functionality in the form of methods that it's hard to think otherwise. Programming distributed systems using remote objects redirects our attention to a view of method calls as messages which travel back and forth, but often a request-response is thought of as a synchronous thing, where you wait for the answer to come in before continuing.
Actors have to be decoupled in time, interacting asynchronously from each other, so that they don't get caught up waiting on answers.
|