© Michael L. Perry 2020
M. L. PerryThe Art of Immutable Architecturehttps://doi.org/10.1007/978-1-4842-5955-9_6

6. State Transitions

Michael L. Perry1 
(1)
Allen, TX, USA
 

Among the most powerful tools available to a software developer is the finite state machine. This mechanism—sometimes illustrated as a state transition diagram—describes a multistep process. The machine moves from one state to the next as it encounters input. Each unit of input determines which arc of the graph the state machine follows. That arc decides how the input is processed and what state the machine finds itself in to receive the next unit.

This tool is a natural choice for solving problems such as parsing computer languages and input files. The specification for the JSON ...

Get The Art of Immutable Architecture: Theory and Practice of Data Management in Distributed Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.