Akka框架的最佳用例是什么 [英] What are the best use cases for Akka framework

查看:117
本文介绍了Akka框架的最佳用例是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过许多关于 Akka 框架(Java/Scala服务平台)的热衷,但是到目前为止,还没有看到许多用例的实际示例将是有益的.因此,我想听听有关开发人员成功使用它的事情.

I have heard lots of raving about Akka framework (Java/Scala service platform), but so far have not seen many actual examples of use cases it would be good for. So I would be interested in hearing about things developers have used it succesfully.

只有一个限制:请不要包括编写聊天服务器的情况. (为什么?因为这已被过度用作许多类似事物的示例)

Only one limitation: please do not include case of writing a chat server. (why? since this has been overused as an example for lots of similar things)

推荐答案

到目前为止,我已经非常成功地在两个实际项目中使用了它.两者都位于近实时交通信息领域(交通流量就像高速公路上的汽车一样),分布在多个节点上,整合了多方之间的消息以及可靠的后端系统.我还没有随意提供有关客户端的详细信息,当我确定时,也许可以将其添加为参考.

I have used it so far in two real projects very successfully. both are in the near real-time traffic information field (traffic as in cars on highways), distributed over several nodes, integrating messages between several parties, reliable backend systems. I'm not at liberty to give specifics on clients yet, when I do get the OK maybe it can be added as a reference.

Akka确实完成了这些项目,即使我们是从0.7版本开始的. (顺便说一下,我们正在使用Scala)

Akka has really pulled through on those projects, even though we started when it was on version 0.7. (we are using scala by the way)

最大的优点之一是,您可以轻松地用参与者和消息组成系统,而几乎无需重复编程,它的伸缩性非常好,而无需手动卷入线程的所有复杂性,并且您几乎可以在对象之间传递异步消息免费.

One of the big advantages is the ease at which you can compose a system out of actors and messages with almost no boilerplating, it scales extremely well without all the complexities of hand-rolled threading and you get asynchronous message passing between objects almost for free.

在对任何类型的异步消息处理进行建模方面非常好.与任何其他样式相比,我更喜欢以这种样式编写任何类型的(网络)服务系统. (您是否曾经尝试用JAX-WS编写异步Web服务(服务器端)?这有很多问题).因此,我想说任何不想挂在其组件之一上的系统,因为所有组件都使用同步方法隐式调用,并且该组件正在锁定某个对象.它非常稳定,让故障崩溃+主管解决故障的方法确实运行良好.一切都很容易通过编程进行设置,而不难进行单元测试.

It is very good in modeling any type of asynchronous message handling. I would prefer to write any type of (web) services system in this style than any other style. (Have you ever tried to write an asynchronous web service (server side) with JAX-WS? that's a lot of plumbing). So I would say any system that does not want to hang on one of its components because everything is implicitly called using synchronous methods, and that one component is locking on something. It is very stable and the let-it-crash + supervisor solution to failure really works well. Everything is easy to setup programmatically and not hard to unit test.

然后是出色的附加模块. Camel模块确实可以很好地插入Akka,并可以轻松地开发具有可配置端点的异步服务.

Then there are the excellent add-on modules. The Camel module really plugs in well into Akka and enables such easy development of asynchronous services with configurable endpoints.

我对该框架感到非常满意,它已成为我们构建的连接系统的事实上的标准.

I'm very happy with the framework and it is becoming a defacto standard for the connected systems that we build.

这篇关于Akka框架的最佳用例是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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