Akka框架的最佳用例是什么

编程入门 行业动态 更新时间:2024-10-27 06:20:33
本文介绍了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框架的最佳用例是什么

本文发布于:2023-11-25 08:03:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628963.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架   Akka

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!