I am in the process of investigating how I would go about implementing a 
scalable fault tolerant order management system using an akka sharded 
cluster. 

Initially all orders will be limit orders whereby they are entered with a 
limit price and then executed once this limit price has been reached.

My current thinking is to have individual orders represented as an FSM 
actor which receives a stream of price events, updating the state of the 
order once the price condition is met.

I was intending to use a sharded cluster to distribute the orders across 
multiple nodes. The order actors will be made persistent using akka 
persistence so their state can be recovered after re-balancing etc.

So that the order actors can receive price events after re-balancing, I was 
going to create some sort of shard aware price publisher that the order 
actor could subscribe to on start up. The publisher would then publish 
price events via the sharded cluster. This would ensure the order actors 
would still receive price events after a rebalance.

Is this a reasonable way to handle event streams for actors which belong to 
a sharded cluster?

To enable querying the state of all orders in the cluster, I was going to 
have each order actor register it's id in some central repository. This 
repository could then be queried for orders which are in the cluster and 
queries could then be sent to each order actor via the sharded cluster to 
retrieve it's state.

Is this a sensible way to handle the querying of actor state in a sharded 
cluster?


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to