Skip to content

CQRS Support

Duncan Jones edited this page Apr 12, 2020 · 3 revisions

One use case for event sourcing on Azure functions is as part of a CQRS (Command and Query Responsibility Separation) system.

To do this you would have each instance of a command or a query backed by its own event stream. As the command or query is processed, progress events are appended to that event stream and at any given time a projection can be run over it to determine the state and what steps remain to be performed.

You can couple this with Azure Durable Function orchestration to implement more complicated command and query handling while still using serverless functions.

In addition this library has top level Command and Query classes that take care of the event stream backing so that orchestrations at a business level van be performed, and defines a set of events and projections to work with the underlying event stream of each of these.