4 ms·
Do you have any examples off the top of your head? Haven’t explored this domain
by reasonabl_human 6y ago
Do you have any examples off the top of your head? Haven’t explored this domain
- slt2021 6y agoActor pattern (akka) is the distributed FSM
- nahuel0x 6y agoNot really, an actor can implement an FSM but it also can have an infinite number of states.
- slt2021 6y agoevery non deterministic SM can be converted into FSM: "Using the subset construction algorithm, each NFA can be translated to an equivalent DFA" https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton https://en.wikipedia.org/wiki/Nondeterministic_finite_automa...
- gopiandcode 6y agoHow is that relevant to the parent's point? Non-determinism has no relation to a system with infinite states, and the NFSM -> FSM construction algorithm provides no help in that case.
- pantulis 6y agoFor example an ecommerce order tracking system with different status (in cart, paid, shipped, returned, so on). Spree solves it very elegantly, look at those "events", "transitions". https://github.com/spree/spree/blob/4687e608b49236c2850500b026a9fbbab37dc96c/core/app/models/spree/shipment.rb https://github.com/spree/spree/blob/4687e608b49236c2850500b0... Also, Spree has this nice intro to FSMs https://github.com/Humane-Documentation/Spree/blob/master/related/state_machine.md https://github.com/Humane-Documentation/Spree/blob/master/re...
- pantulis 6y agoI also happened to work in a very huge C++ project for the business logic component of a call center, using CORBA and the Reactor pattern from ACE to integrate different parts of the user / ACD / 1st agent / specialist / CTI combo. But it was a telco project, so the "let's use a FSM" was well thought from the beginning. Turns out you could easily know what the system would do just by reading a huge Smartdraw document, and this also allowed for reasoning on new use case scenarios. It did not matter that the main file was a horrendous 40kLOC C++ class because the Smartdraw diagram was the documentation and everything else was just trivial code.