1. 8
  1. 2

    Everything is a finite state machine.

    1. 5

      Distributed systems aren’t finite state machines, because each piece of state doesn’t share a common notion of time. You need something like Paxos to turn it back into a state machine, which is very expensive and only done for small pieces of state.

      1. 2

        They are non-deterministic FSMs, which can be rewritten as deterministic FSMs for analysis purposes. It gets unwieldy though. The motivation of the article is opposite, the builder pattern is very obviously an FSM but is rarely studied as one.

        1. 1

          I don’t have the link in me right now, but IIRC the first successful formulation of a distributed system is multiple interacting concurrent FSMs.

          1. 2

            Right, that makes sense. My point was that a set of multiple concurrent FSMs with communication channels is not an FSM… you need Paxos to turn them back into one!

      2. 1

        The author of the original article totally misses out on Immutables which is a nice in-between of the two presented solutions which generates readable generated code yet allows for customization via a number of mechanisms as needed without so much of the jank of Lombok.