Welcome here! Yes, Statecharts for sure bring a lot of interesting perspectives!
but it's taking a while to make the connections when applied to UI.
I don't know what you need so I just tell what I used other than the obvious great stuff at https://statecharts.github.io/
and many great presentations over at youtube, by
(davidkpiano) and others :-)
I studied parts of the Horrocks book. I think the best material besides Harel's original paper
is the book "Horrocks, Ian. Constructing the user interface with Statecharts. Addison-Wesley Longman Publishing Co., Inc., 1999."
For leveling up your intuition for Statecharts, use this web course
with videos featuring Harel himself(!). It's super accessible.
I can't contribute to the question about "communicating across machines" but there is a lot of knowledge among the forum members! Personally, In stead of going with agents for combining machines, I have chosen an alternative path, namely to use machines that do not use extended state ("context" in XState) since it's baked into the control state fringes. Then the magic starts and the machines get highly composable. In principle, I think you (could and should!) define the total dynamic i.e. the total essential state
, of a web site/app in one hive-mind machine, composed of sub-machines, and the DOM rendering would be combined in a corresponding way. Agents are still relevant when there is a externally dictated need for asynchronous communication, it's not forced by composability limitations of the machine formalism. It's highly experimental work, so I don't know how it will work out, but it sure is exiting and rewarding working with state machines! While I hope that my approach with composable State machines will be relevant some day, It's highly experimental work for the time being. I'm working on a library called Omb that implements those composable Statecharts, so far I've got half a prof-of-concept implementation it's halfway implemented. This unpublished draft
over at dev.to
should give an idea of how composition of context-free Statecharts might be done. It's best to just glance at the code, and ignore the rest of the text; the text just me trying to figure out how it all connects, all new and exiting but for damned sure not obvious!! :-)
Keep spreading the Statechart love! :-)
PS I for sure will take you up on the offer of coffee in Tokyo when we visit next time, though I might opt for green tea or matcha :-) My wife's relatives live in the area :-)