Question

I have a question about an event driven design architecture.

I have a server application that contains many domain services. each service is a WCF service, and I want the services to communicate using raising events via a dedicated pub-sub infrastructure that I've created.

Now everything works well, but I have a question regarding the orchestration..

I have a manager service which accepts calls from the consumers and starts the process, sending a message to component A which in turn sends a message to component B and so on.

Eventually some of these services raise events for the manager service which keeps no state of incoming requests.

What is the best way to orchestrate or manage this flow?

Thanks

Was it helpful?

Solution

Take a look at NServiceBus and NServiceBus sagas in particular. A saga (the meaning in NSB is more akin to 'process manager') maintains state and correlates messages by some ID. In your case, the manager service is a sort of saga. It should maintain sate for each process that it manages. This state should be keyed by a correlation ID to be shared by all messages sent between components.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top