Hacker News new | ask | show | jobs
by michaelsbradley 1353 days ago
The folks behind the SCXML spec were trying to address some of those concerns, albeit in the abstract manner required of platform-independent spec authors:

https://www.w3.org/TR/scxml/

https://en.wikipedia.org/wiki/SCXML

Work on that goes back to the early 2000s, when XML was on the rise. One of the more important and lasting contributions of that work is likely Appendix D, "Algorithm for SCXML Interpretation":

https://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation

I suggest ignoring the XML-specific aspects of it; consider that such tree-shaped data structures can as readily be encoded in JS objects (including stringified JSON). Also consider the larger spec's notions of `send` and `invoke` for "External communications":

https://www.w3.org/TR/scxml/#external-module