哪个Actor模型库/框架为python和Erlang样? [英] Which Actor model library/framework for python and Erlang-like?
问题描述
- 糖果图太旧了。 >
- Twisted太复杂了。
- Gevent:它是否可以支持Actors模型是不清楚的。
你建议什么?
使演员使用 gevent ,使用 Greenlet 子类,嵌入式 gevent.queue.Queue 实例用作收件箱。要从收件箱读取邮件,只需 get()从队列。要向演员发送消息,请将其放入该演员的队列。
如果您需要帮助编写Actor类,请随时使用询问邮件列表。
I am looking for an easy-to-learn Actor library or framework for Python 2.x. I have tried Candygram and Twisted but I did not like them. I'd like something that will be easy to extend to suppero Greenlet (= stackless python).
- Candygram is too old.
- Twisted is too complicated.
- Gevent: it is unclear if it can support Actors model.
What do you suggest?
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.
这篇关于哪个Actor模型库/框架为python和Erlang样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!