在没有Axon Server Enterprise的情况下是否可以扩展Axon Framework [英] Is it possible to scale Axon Framework without Axon Server Enterprise

查看:135
本文介绍了在没有Axon Server Enterprise的情况下是否可以扩展Axon Framework的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在没有Axon Server 企业的情况下扩展Axon Framework?我有兴趣使用Axon创建原型CQRS应用程序,但最终的可部署系统必须免费获得许可费用.如果使用免费软件无法将Axon Framework扩展到六个节点,那么我应该去找别的地方.

如果事实证明Axon Framework不是该系统的理想选择,那么您会提出什么建议?在Apache Pulsar周围构建一些东西会是明智的选择吗?

解决方案

那我想我有个好消息.您可以在没有Axon Server Enterprise的情况下完美地利用Axon Framework.

首先,您可以使用Axon Server Standard版本,该版本完全免费,并且您也可以根据需要签出代码.如果您希望重新获得基础架构,还可以选择其他方法来分发 CommandBus EventBus / EventStore ./p>

对于 CommandBus ,框架提供了 DistributedCommandBus ,针对这两个实现,它们是:

  1. JGroups
  2. Spring Cloud

我认为选项2是分发命令的最理想选择,因为它使您可以自由选择所需的任何Spring Cloud Discovery Service实现.这应该使您能够免费获得许可"工作.在那个地区.

要分发事件,您可以大致研究两种方法:

  1. 在所有实例之间共享数据库,也就是您的 EventStore
  2. 使用事件消息总线分发事件消息

如果您希望节点的实例能够从命令模型中获取事件源,则倾向于使用选项1.这是必需的,因为Axon Framework需要专用的 EventStore 来获取源代码历史中的命令模型.

当您只想将其他应用程序连接到事件流时,选项2将是一个很好的选择.同样,该框架在此区域有两个选项:

  1. AMQP
  2. Kafka

在这部分我唯一要指出的是,Kafka扩展程序仍处于候选发布状态.目前,它正在积极进行中.

所有这些扩展及其选项应在参考指南中明确说明,因此如果您要启动应用程序,我一定会查阅此文档.

有一件您无法分发的东西,就是 QueryBus .有一个出色的问题可以解决此问题,为此有人付出了努力 PR .在了解了Axon Server Standard Edition的工作方式之后,他有意关闭了PR(使用以下 解决方案

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!

这篇关于在没有Axon Server Enterprise的情况下是否可以扩展Axon Framework的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆