Is it possible to scale Axon Framework without Axon Server Enterprise
Asked Answered
C

1

14

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?

Caecum answered 14/10, 2019 at 17:27 Comment(0)
P
23

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:

  1. JGroups
  2. Spring Cloud

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:

  1. Share the database, aka your EventStore, among all instances
  2. Use a event message bus to distribute your event messages

If 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:

  1. AMQP
  2. Kafka

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!

Passel answered 15/10, 2019 at 7:49 Comment(3)
Good point that nothing is free. I'm not opposed to solutions that involve licensed software. However, the contract is written such that adding more more people is much easier than paying for licenses.Caecum
what is the advantage of eventsourcing the command model? And why would I not distribute events over -say - kafka, if I wanted to do that?Sodomite
Event Sourcing the Command Model in essence means you will use a single data source for every model within your application. This effectively solves the problem of "what is the correct source of truth", as your events become the single source of truth. I tried to clarify this for you in this comment too, by the way - #56681199Passel

© 2022 - 2024 — McMap. All rights reserved.