We have seen how to implement a very simple framework on Mesos. Real-world frameworks rarely are so simple. In this section, we will briefly discuss some advanced topics and note down some precautions.
Mesos does a great a job with hiding the nuances of building distributed applications and provides a simpler API. Although, Mesos provides a reliable communication mechanism for framework developers, the fact that the frameworks are distributed systems cannot always be ignored. Mesos has an actor-like programming model with message-passing, with a mix of at-most-once and at-least-once semantics. The messaging between the master and framework can have failures and lost messages. When this happens, the worldview of the framework and master will be out of sync. An example scenario would be where the framework sends a message to the master and the master dies before receiving the message or before sending the message to the slave. So the task assumes that the master...