Summary
In this chapter, you learned how to create a WebSocket communication between the server and the browser. At the server level, we kept a reference to all the browsers connected, so that events could be dispatched to all the browsers. An important piece of the system is the actor model, defined at the server level. We learned that the actor model programming paradigm is adequate as soon as we have an interaction between asynchronous systems.
You learned that a diagram of the interactions between Actors can be helpful as your system is growing. It is particularly useful when someone needs to go back to the code after being away for a while. As we are not calling methods but sending messages to ActorRef
, the navigation in the IDE is not easy, so it is difficult to understand the flow just by reading the code.
Once the first steps in this framework are made, development is natural and close to real-world interaction.
We also introduced Akka. Akka is a complete framework, separated into different...