I'm trying to implement order system state machine behavior using Akka.Net. I found that this could be done using FSM class in Akka.Fsm. My state of object varies per request i.e. one order can be in created state while other order can be in PaymentProcessing state. Does Akka.Net support this kind of behavior where state is managed per instance. Also is it possible to use it in distributed system?
Asked
Active
Viewed 116 times
1 Answers
1
Usual way of modeling DDD with actors is to have instance of an actor per instance of an aggregate. Therefore having two actors in two different states of processing is totally natural behavior. If you want to have state machine DSL with support for persistence between different actor incarnations in long running processes, you may want to checkout a PersistentFSM.
Actor distribution is fully supported with the help of Akka.Cluster and other modules build on top of it, such as Akka.Cluster.Sharding. Actual case depends on the degree of control and speed you want to have.

Bartosz Sypytkowski
- 7,463
- 19
- 36