Akka 框架的最佳用例是什么

编程入门 行业动态 更新时间:2024-10-27 04:29:49
本文介绍了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:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628962.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架   Akka

发布评论

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

>www.elefans.com

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