哪个Actor模型库/框架适合python和Erlang一样?

dai*_*gio 44 python erlang actor python-stackless

我正在为Python 2.x寻找一个易于学习的Actor库或框架.我尝试了Candygram和Twisted,但我不喜欢它们.我想要一些很容易扩展到suppero Greenlet(= stackless python)的东西.

  • Candygram太老了.
  • 扭曲太复杂了.
  • Gevent:目前还不清楚它是否能支持Actors模型.

你有什么建议?

Den*_*nko 19

To make actors with gevent, use a Greenlet subclass with embedded gevent.queue.Queue instance used as an inbox. To read a message from the inbox, simply get() from the queue. To send a message to an actor, put it into that actor's queue.

Read about subclassing Greenlet here.

If you need help with writing the Actor class, feel free to ask the mailing list.


Luc*_*lla 14

查看脉冲星,它是python的并发框架,它使用actor模型作为并行执行的源.


bea*_*gle 8

我知道这个问题有点陈旧但是这里是python的另一个actor资源:

https://github.com/godaddy/Thespian

文档可以在这里找到:

http://godaddy.github.io/Thespian/doc/

编辑:

此库的主要作者后来离开GoDaddy并分叉了回购:

https://github.com/kquick/Thespian

可在此处找到新文档:

http://thespianpy.com/doc/


小智 5

帕利Pykka列出这对维基百科的演员Model页面,所以你可能要考虑其中的一个.

Pykka似乎正在积极开发(2012年12月发布1.0.1),而PARLEY自2007年以来就没有发布(并且仍然被列为测试版).Pykka声称只有在名字中才能被Akka打造,而不仅仅是一个蟒蛇端口.