What is “state” in a replicated state machine? How do you describe it to someone with no clue? ELI5 please


#1

We had a study session with @preethi about Consensus protocols. You can find the video and summary here.

During the conversation, she explained what a distributed system is and that a “replicated state machine” is one type of distributed system (more details in her blog post here)

A replicated state machine is a deterministic state machine that is replicated across many computers but functions as a single state machine.

Any of these computers may be faulty, but the state machine will still function.

In a replicated state machine, if a transaction is valid, a set of inputs will cause the state of the system to transition to the next state.

What is a state machine? What does it mean for a machine to have “state”?


#2

I think about it like “mental state.” When someone asks me, what’s your mental state, they’re asking what’s currently on my mind. Same with computers. “State” on computers is the data the computer is currently holding. This is important because in a replicated state machine, where 100s-1000s+ computers are acting as one computer, they need to maintain the identical “state.”


#3

Or could we think about it like the way computers at bootup check for keyboard connected, mouse connected, monitor, speakers and all the things that ensure that it’ll function error free.

And if any one of those things aren’t connected, it’ll return an error message to the screen and just wait to be fixed instead of booting.

So say each one of those things connected are given a 1 value. So a 4 value state is the state of all 4 things that should be connected are. And your computer with 3 value state can’t connect to the network and do error free work with the 4 state computers that are ready and identical.

Does that bring us closer to what replicated state machines mean?