Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

now add concurrency, the system state is a superposition of concurrent transitions


Finite state machines are an ideal mechanism to with concurrency if you put a concurrent queue in front of them. Such a program is easily coded with Akka's FSM trait. It even adds the possibility to trigger transition based on timer. As soon as you are in the realm of time sensitive programs, i.e. because of network requests, this is a very powerful and easy to understand way to program complicated parts of programs.


for others:

https://doc.akka.io/docs/akka/current/typed/fsm.html

https://doc.akka.io/docs/akka/current/typed/persistence-fsm....

Is ^ demonstrating the equivalence between FSMs and event streams? or are they not quite identical just closely related?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: