Is it possible to scale Axon Framework without Axon Server Enterprise? I'm interested in creating a prototype CQRS app with Axon, but the final, deployable system has to be be free from licensing fees. If Axon Framework can't be scaled to half a dozen nodes using free software, then I should probably look elsewhere.
If Axon Framework turn out not to be a good choice for the system, what would you recommend? Would building something around Apache Pulsar be a sensible alternative?
Axon Server is freely available to get started quickly and easily. Various other options are available for serious enterprise deployments to give you the assurance and functionality you need. “Axon Server Enterprise” adds SLA-backed support, clustering, monitoring, and integration features to the free Axon Server.
Axon Framework offers extreme application scalability, handling a huge number of concurrent events while maintaining application consistency in distributed systems. Axon Framework is based on CQRS principles and fits perfectly in the modern architectural pattern of Microservices.
Axon Framework is designed to support developers to apply the CQRS/DDD architectural pattern and Event Sourcing.It helps developers build easily scalable and maintainable applications by providing implementations of some basic building blocks, such as Aggregates, repositories and event buses (the dispatching mechanism ...
Kafka Extension components are used from Axon and make sure the axon-Kafka module is available on the application classpath. Using the extension requires setting up and configuring Kafka in the project's requirements. Kafka is a perfectly fine event distribution mechanism but it is not a good fit for an event store.
I think I have good news for you then. You can utilize Axon Framework perfectly fine without Axon Server Enterprise.
Firstly, you can use the Axon Server Standard edition, which is completely free and you can check out the code too if you want.
If you prefer to get infrastructure back in your own hands, you can also select different approaches to distributing the CommandBus
and the EventBus
/EventStore
.
For the CommandBus
the framework provides the DistributedCommandBus
for which two implementation are in place, being:
I'd argue option 2 is the most ideal for distributing your commands, as it gives you the freedom to choose whichever Spring Cloud Discovery Service implementation you desire. That should give you the handles to work "free of licenses" in that area.
For distributing your Events, you can broadly look at two approaches:
EventStore
, among all instancesIf you want instances of your nodes to be able to Event Source the Command Model, you are inclined to use option 1. This is required as Axon Framework requires a dedicated EventStore
to be able to source the Command Models from history.
When you just want to connect other applications to your Event Stream, option 2 would be a good fit. Again, the framework has two options in this area:
The only thing I'd like to point out on this part additionally is that the Kafka extension is still in a release candidate state. It is being worked on actively at the moment though.
All these extensions and their options should be clearly stated in the Reference Guide, so I'd definitely check this documentation out if you are gonna start an application.
There is a sole thing you cannot distribute though, which is the QueryBus
.
There is an outstanding issue to resolve this, for which someone put the effort in to provide a PR.
After seeing how Axon Server Standard edition does it though, he intentionally closed the PR (with the following comment) as it didn't seem feasible to him to maintain such a tool at this stage.
So, can you use Axon Framework without Axon Server Enterprise? Well, I think you can. :-) Mind you though, although you'd be winning on not having a license fee if you don't use Axon Server Enterprise, it doesn't mean your production is gonna be free. You'd be introducing back quite some infrastructure set up and production time to get this going.
Hope this gives you plenty of feedback @ahoffer!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With