Ya gotta think like a clockmaker.
But FSM are just too easy, so people often use it to make implicit some state that would be explicit otherwise. In this sense, yes, they do cause emergent behavior.
The alternatives are joining your state at a single layer, making sure your states are really orthogonal to each other (very hard if both do IO), or making your state explicit so that you can at least verify once you find a problem.
I've found it offends some people, but it works and generally, their way doesn't.
But the founding principle is "trust no one" in distributed systems.
But if two layers do IO, you'll almost certainly want the state to be explicit.
I have a BluRay player with Java(tm). If it sits more than a day or twenty, I have to unplug it, count to ten and plug it back in. I have a TV that has seizures - loud, painful seizures ( that always test the ability of an amp connected to it to defend itself ) . Scares the crap out of the dogs.
This is not necessary. This is not good.
Here is one: https://news.ycombinator.com/item?id=11418855 (intended as a reply to your question but accidentally posted to the thread)
Given an FSM and a set of messages, and a model of timing, it may be possible to fully test out the most interesting subset of transactions and test out many of the pathological cases. But instrumentation in anticipation of finding unanticipated pathological cases is pretty important.
This is bounded by cost, just as all due diligence processes are. Well-designed instrumentation is the key.
FSMs are not the problem here - with infinite bandwidth channels and perfect transmission, you wouldn't even need all that.
So maybe we shouldn't rule-out FSM's but be subtle in their use ?
Something like Isabelle/HOL etc.
I'm intrigued by this sentence. Can you explain how actors and microservices are a generalization of FSMs?
You can make services and actors which can be modeled as FSM's but they don't have to be.
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.