不同的 Scala Actor 实现概述

发布于 2024-09-02 11:47:02 字数 860 浏览 10 评论 0原文

我正在努力寻找“正确的”演员实施。我意识到它们有很多,选择其中一个有点令人困惑。就我个人而言,我对远程参与者特别感兴趣,但我想完整的概述会对其他许多人有所帮助。这是一个非常普遍的问题,因此请随意回答您所了解的实现。

我了解以下 Scala Actor 实现 (SAI)。请添加缺少的。

  • Akka的区别)
  • Scala 2.7(与Scala 2.8
  • (http://www.akkasource.org/)
  • Lift (< a href="http://liftweb.net/" rel="noreferrer">http://liftweb.net/)
  • Scalaz (http://code.google.com/p/scalaz/)


  • 这些 SAI 的目标用例是什么(轻量级与“重型”企业框架)?

  • 他们支持远程演员吗? SAI 中的远程参与者有哪些缺点?
  • 他们的表现如何?
  • 社区有多活跃?
  • 他们入门有多容易?文档有多好?
  • 它们的扩展有多容易?
  • 他们有多稳定?哪些项目正在使用它们?
  • 他们的缺点是什么?
  • 他们的设计原则是什么?
    • 它们是基于线程还是基于事件(接收/反应)或两者兼而有之?
    • 嵌套接收
    • 热交换 Actor 的消息循环

I'm trying to find the 'right' actor implementation. I realized there is a bunch of them and it's a bit confusing to pick one. Personally I'm especially interested in remote actors, but I guess a complete overview would be helpful to many others. This is a pretty general question, so feel free to answer just for the implementation you know about.

I know about the following Scala Actor implementations (SAI). Please add the missing ones.

  • Scala 2.7 (difference to)
  • Scala 2.8
  • Akka (http://www.akkasource.org/)
  • Lift (http://liftweb.net/)
  • Scalaz (http://code.google.com/p/scalaz/)


  • What are the target use-cases for these SAIs (lightweight vs. "heavy" enterprise framework)?

  • do they support remote actors? What shortcomings do remote actors have in the SAIs?
  • How is their performace?
  • How active is there community?
  • How easy are they to get started? How good is the documentation?
  • How easy are they to extend?
  • How stable are they? Which projects are using them?
  • What are their shortcomings?
  • What are their design principles?
    • Are they thread based or event based (receive/ react) or both?
    • Nested receiveS
    • hotswapping the Actor’s message loop

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

童话里做英雄 2024-09-09 11:47:02

Scala 2.10 开始,scala Actor 现已弃用,Akka Actors 现已成为标准发行版的一部分

As of Scala 2.10, scala actors is now deprecated and Akka Actors is now part of standard distribution

斯卡拉 2.7.7。与 Scala 2.8.0 RC3 发行版之后的 2.8 相比:

新 Reactors 提供更轻量级、纯粹的事件基于参与者,具有可选的隐式发件人标识。添加了对具有守护进程式语义的参与者的支持。 Actor 可以配置为使用高效的 JSR166y fork/join 池,从而在 1.6 JVM 上显着提高性能。调度程序现在是可插入的并且更容易定制。

还有 Haller 的设计文档: Scala Actors: Unifying Thread-based and Event-based编程

Scala 2.7.7. vs 2.8 after The Scala 2.8.0 RC3 distribution:

New Reactors provide more lightweight, purely event-based actors with optional, implicit sender identification. Support for actors with daemon-style semantics was added. Actors can be configured to use the efficient JSR166y fork/join pool, resulting in significant performance improvements on 1.6 JVMs. Schedulers are now pluggable and easier to customize.

There's also a design document of Haller: Scala Actors: Unifying Thread-based and Event-based Programming

终止放荡 2024-09-09 11:47:02

据我所知,只有 Scala 和 Akka 支持远程 Actor。

Akka 由可扩展解决方案提供支持,该解决方案为 akka 提供商业支持和插件。
Akka 似乎是一个重量级解决方案,其目标是与现有框架(camel、AMQP、JTA、Comet、Spring、Redis)以及 STM 和持久性集成。

与 Scala 相比,Akka 不支持嵌套接收,但支持热交换 actor 消息循环,并且具有基于线程和基于事件的 actor,以及所谓的“基于事件的单线程”actor。

As far as I know, only Scala and Akka support remote actors.

Akka is backed up by scalablesolutions, which offer commerical support and plug ins for akka.
Akka seems like a heavyweight solution, which targets integration with existing frameworks (camel, AMQP, JTA, Comet, Spring, Redis) and additionally STMs and persistence.

Akka compared to Scala doesn't support nested receives, but supports hotswapping the actors message loop and has both, thread based and event based actors and so called "Event-based single-threaded" ones.

倾城花音 2024-09-09 11:47:02

我意识到 akka 强制执行详尽的匹配。因此,即使从技术上来说 receive 需要一个部分函数,​​该函数也不能是部分函数。这意味着您必须立即处理每条消息。

I realized that akka enforces exhaustive matches. So even if technically receive expects a partial function, the function must not be partial. This means you have to handle every message immediately.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文