简体   繁体   中英

What are some popular frameworks available for implementing CQRS, Event Sourcing and Saga for data consistency and distributed transactions?

I would like to know some popular frameworks that are available for implementing CQRS, ES, Saga in the application.

As a part of my research, I have to compare these frameworks and evaluate them based on various -ilities .

I have to compare these [event-sourcing] frameworks and evaluate them based on various -ilities.

The premise of the question is that you need a framework to implement event sourcing but, in fact, you do not.

Greg Young , one of the most influential proponents of event sourcing, frequently expresses his misgivings about frameworks. See, for instance, his QCon London 2013 keynote , esp. mark 9'.

Event sourcing is conceptually simple and doesn't need the kind of magic that frameworks typically bring with them. For instance, rebuilding the state from a stream of events simply consists in a left fold over the stream in question. Moreover, you don't necessarily need a specialised database; I know people who have successfully implemented event sourcing by simply appending events to a file.

If your research aims at comparing event-sourcing frameworks, I would argue that you should consider the case where no framework is used at all.

Axon is a popular framework/server for building CQRS/ES applications.

EventStoreDB is a popular EventStore database for the EventSourcing part.

In addition to Axon, on the JVM there's also the Akka ecosystem (the cluster sharding, persistence, and projection modules (as well as the still-in-progress sharded daemon process module) are the most relevant to CQRS/ES/DDD). One benefit of Akka Persistence is the ability to choose from a variety of datastores to use as an event store (JDBC SQL databases and Cassandra are the most common, but there are many more supported). My experience with it has been that it is capable of exceptionally high availability and since it allows a stateful event-sourced application to be deployed as if it's stateless (eg in Kubernetes without needing an operator) there's a lot of deployment flexibility. Note that because it's built on the actor model, a lot of JVM observability tooling doesn't work particularly well with it (often assuming a stronger mapping of threads to tasks), so certain commercially-licensed observability tooling is recommended.

Lagom is built on Akka and is a bit more opinionated/guided in how you go about things. It integrates a high-level web framework, so it's especially suited to handling web front-end traffic.

Additionally, Cloudstate also provides a polyglot (all you need is to express domain logic in a language which supports grpc) event-sourcing implementation.

If you are looking for a managed solution, you can also check out what we at Serialized provide.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM