Hacker News new | ask | show | jobs
by jonahx 3732 days ago
> The biggest problem with FSMs (or generally actors, or more generally distributed systems, microservices, etc.)

I'm intrigued by this sentence. Can you explain how actors and microservices are a generalization of FSMs?

1 comments

I think you misread OP's sentence. Actors and micro services are not really related to FSM's.

You can make services and actors which can be modeled as FSM's but they don't have to be.

I'd say it really comes down to whether your actor or microservice has any statefulness or if it's idempotent.

If you have a database behind your microservice, or some kind of in-memory cache, where you ever modify values instead of just writing and reading them then there's a good chance it's an FSM. On the other hand if it's purely functional - say, it just returns a thumbnail image for any photo you give it - then it's not really an FSM.

From what I've seen an awful lot of microservices out there have some amount of state (not sure about actors). I think that's why the author made the generalization.