Rustic Dendrite
A Rust library to connect to AxonServer.
This project is a sibling of dendrite2go and archetype-go-axon, but for the Rust programming language.
Core concepts
Stack
In alphabetic order:
- Bash: The shell, or command language interpreter, for the GNU operating system — for building and deploying
- AxonServer: A zero-configuration message router and event store for Axon (docker image) — Event Store
- Docker compose: A tool for defining and running multi-container Docker applications — for spinning up development and test environments
- ElasticSearch You know, for search (docker image) — for query models (though any tokio-compatible persistence engine will do)
- Envoy proxy: An open source edge and service proxy, designed for cloud-native applications (docker image) — to decouple microservices
- React: A JavaScript library for building user interfaces — for the front-end
- Rust: A language empowering everyone to build reliable and efficient software — for the back-end
- Tonic: A Rust implementation of gRPC with first class support of async/await — for the plumbing on the back-end
Status
This project has now reached the level of Minimal Viable Deliverable in the sense that the first phase is completed: the current application communicates with AxonServer properly. Like archetype-go-axon it can do the following:
1. ☑ Set up a session with AxonServer
* ☑ Enable React app to call a RPC endpoint on the example-command-api service through grpc-web
2. ☑ Issue commands
3. ☑ Register a command handler and handle commands
4. ☑ Submit events
* ☑ Stream events to UI
5. ☑ Retrieve the events for an aggregate and build a projection
* ☑ Validate commands against the projection
6. ☑ Register a tracking event processor and handle events
7. ☑ Store records in a query model: Elastic Search
* ☑ Store tracking token in Elastic Search
8. ☑ Register a query handler and handle queries
* ☑ Show query results in UI
The next task is to split off the example project from the library, and publish the library on crates.io.
After that:
- Add macros to make the definition of handlers more ergonomic
- Add in-memory caching of aggregate projections
- Add support for storing snapshots of aggregate projections in AxonServer.
- Add support for segmentation to distribute the load on tracking event processors.
- Add support for sagas.
- ...