欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  资讯频道

Revactor-一个使用actor模型的ruby并发库

程序员文章站 2022-05-24 14:38:09
...
项目的地址在这里,最新版本是0.1.2:

http://revactor.org/

它是基于ruby1.9的。

这边是他的roadmap,挺让人期待的:

引用
Revactor is still in its infancy. Erlang and its Open Telcom Platform are an extremely feature rich platform, and many features can be borrowed and incorporated into Revactor.

The first and foremost feature to be added is the concept of linked Actors. This idea is somewhat difficult to explain for the uninitiated, but the general concept is that interdependent Actors are linked in a graph. When one Actor dies, it kills all linked Actors is well. However, special Actors trap the exit messages from the Actors they‘re linked with. These Actors are generally supervisors and restart any linked Actor graphs which crash.

Next on the agenda is implementing DRb. This should be possible simply by monkeypatching the existing DRb implementation to run on top of Revactor::TCP. Once DRb has been implemented it should be fairly trivial to implement distributed Actor networks over TCP using DRb as the underlying message passing protocol.

Long term items include implementation of more Filters, Behaviors, and protocol modules. These include an HTTP client (subclassed from the client in Rev), an HTTP server adapter (using the Mongrel parser), and the gen_fsm behavior from Erlang. Additional areas of concern are addressing the problems of mutable state in conjunction with Server and FSM behaviors. A possible solution is to implement a tuple which stores immutable collections of primitive types like numbers, strings, and symbols, but this approach is likely to be slow.

相关标签: Ruby