Different Scala Actor Implementations Overview

 ̄綄美尐妖づ 提交于 2019-11-28 15:23:11

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

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

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!