1

The gateway uses Rabbitmq with Masstreansit to send commands to services. Some of services require event sourcing in their internal architecture. Since I need my aggregate states available, and the system requires speed, The actor model seems to be a good fit, but require to deal with a couple of issues:

  1. The actors should acknowledge the command to be removed from the message queue for reliability purposes.
  2. Out of order commands should not be acknowledged to be resent to the actor(Optimistic concurency).
  3. Reading a command from one queue(rabbitmq) and writing it to another queue(actor model's mailbox) seems to be redundant.
  4. I'm going to use proto.actor and that seems to require remote cluster for sending commands to actors based on the id of the actor, and that means yet another unnecessary network layer after reading each command from message queue inside of my event sourced services.

And that complexity makes me uncertain about whether I am in the right path or not.

Am I in the right road?

Is there any alternatives to that solution?

Please help me to clarify the question with your comments if you find it unclear. Thanks.

asked Aug 30, 2019 at 16:39

1 Answer 1

2

The actor model is a conceptual model to deal with concurrent computation. It defines some general rules for how the system’s components should behave and interact with each other. The concept fits well with Event Sourcing application however due to the complexity to implement it ́s worth to use it with a stable framework that hides the complexity and provides you an interface to interact. I suggest trying Akka Actors. In this talk the legend Carl Hewitt elucidates how the actor model works.

answered Nov 6, 2019 at 11:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.