Comments (4)
The short answer is that it doesn't. Commanded only supports running on a single node. There's an open issue to support running on a cluster of nodes (#39) and an open pull request with further discussion on this topic (#60).
The approach will likely be to distribute aggregate, event handler, and process manager processes amongst the nodes in the cluster. So they run as singleton instances, but the load is distributed (e.g. user1 aggregate on node1, user2 aggregate on node2). In a net split scenario only one half of the cluster will continue functioning. This is to ensure consistency and prevent duplicate aggregates/handlers running. I'm open to suggestions, and pull requests, for alternative ways of tackling this.
An alternative approach, that you could implement now, is to use a single event store and Commanded instance per bounded context (microservice). Then you can deploy each service to its own node for distribution. You would need a way of message passing between each service for commands and events. This could be a REST API endpoint for commands and an event handler that pushes events onto a message bus for the other services to consume.
Feel free to chat about Commanded on Gitter.
from commanded.
Gotcha. Is there any literature on established techniques used in other platforms?
from commanded.
Here are a couple of relevant projects that implement distributed event sourcing:
- Akka is an actor based toolkit for Java, Scala, and .NET [cluster | split brain resolver].
- Eventuate uses causally ordered event streams [overview | repo].
from commanded.
Closing this issue. Refer to related issue "Support running on a cluster of nodes" (#39) instead.
from commanded.
Related Issues (20)
- Process manager router option not working
- Lessons learned from performance optimization - an unlikely culprit HOT 3
- no function clause matching in Commanded.Commands.Dispatcher.telemetry_stop/3 HOT 1
- Docs questions
- Stacktrace in event handler error? HOT 2
- Paralelization Strategies in EventHandlers
- Should Commanded.Event.Handler support messages from swarm? HOT 2
- Event retention policies?
- please support multiple commanded application with one eventstore HOT 6
- Process Manager state serialization breaks when using a custom TypeProvider with the JsonSerializer
- `Commanded.ProcessManagers.ProcessManager.identity/0` function returns `nil` in unit tests
- no function clause matching in Commanded.Event.Handler.partition_event/4 HOT 1
- EventstoreDB is sunsetting the TCP protocol HOT 1
- Is it a bad practice for an event handler to depend on a projector completion? HOT 2
- Snapshotting 2 Aggregates having same identity
- Is it possible to log contents of InMemoryEventStore on failed test?
- Ecto Sandbox, Projections and In Memory adapter HOT 3
- Aggregate throws error when execute returns more than 1000 events.
- Individual stream events handling HOT 2
- Skipped event with concurrency enabled HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commanded.