concept state machine in category akka

This is an excerpt from Manning's book Reactive Applications with Akka .NET.
Several core design patterns can be used to simplify reactive application development: the actor model, using state machines, and using routers.
A text-based description of an FSM can be difficult to understand, but it’s possible to represent the state machine diagrammatically with a state transition diagram. In a state transition diagram, you draw the state machine as a directed graph, where each vertex is a state, and each edge is an event. This provides a visualization of how each event causes transitions between states. Each edge is marked with a label that signifies the type of event received. You can see the transition by finding the current state vertex and then tracing the edge that has a label matching the event name. An event edge can transform the state machine into either a different state or the same state.
Typically, when you build an FSM, your system will automatically need to enter a certain state as soon as it starts up. We refer to this as the default state, and it can be represented on the state transition diagram as a small black spot with an arrow pointing to a state. This small spot symbolizes the initial entry location for the state machine and signifies that it should automatically move into the new space. Figure 4.2 shows the turnstile state machine with a default state marker, which indicates that the locked state is automatically entered when the FSM is started.
Although state transition diagrams are a valid means of representing FSMs, there are many other ways of representing them, such as the commonly used state transition table. This is a textual representation of the behavior changes encompassed within a state machine. A state transition table also makes it easier to include details of the effects that could occur between transitions. This might include, for example, some communication with an external information source, or in the case of the turnstile, telling a locking mechanism to unlock when the unlocked state is entered. You can represent the turnstile state machine as a state transition table, as shown in table 4.1. The information represented in both the diagram and the table is identical; they simply provide two different views of the available information.
In this chapter, we’ve considered how you can model some common objects using state machines. You’ve seen how to represent a turnstile as a set of finite states, as well as the events that cause transitions between states. These principles can be extended to larger and more-complex applications that have a limited number of states. One practical example is the management of complex marketing campaigns.