4 ms·
FSMs are great! I’ve worked a lot with state machines, in telecom (to model different parts of 4G connections) as well as in capital markets (to model trades, t
by surfsvammel 6y ago
FSMs are great! I’ve worked a lot with state machines, in telecom (to model different parts of 4G connections) as well as in capital markets (to model trades, transactions etc.).
My opinion is that FSMs are best implemented on a higher abstraction layer than directly in code itself. FSMs tend to reflect the business domain very closely, are very easy to reason and talk about with non-tech domain experts but also tend to change often.
Therefore we have always implemented the framework for the FSM along with some kind of event kernel, and then left the actual setup and configuration of the FSMs to a configuration layer.
It has worked very well and has made it so much easier to talk about how the system works with non-techies.
- tenaciousDaniel 6y agoSeems like FSM and DDD would go very well together, although I haven't seen any literature explicitly linking the two.
- jgraettinger1 6y ago> My opinion is that FSMs are best implemented on a higher abstraction layer than directly in code itself. I really love Rust async/await for this. Under the hood, the compiler is simply assembling a big FSM, and polling a Future is equivalent stepping through allowed transitions which are available to it. You can even use this to build FSMs which are designed to be manually driven, by coordinating generator inputs and outputs via RefCell and one-shot channels and calling `poll` yourself.
- youerbt 6y agoTLA+ is a great example of a modeling tool that allows you to create FSMs relatively easily. It can also check properties of your model which gives more confidence in the final design.