views:

117

answers:

1

Hi all, I am looking for a easy to learn Actor library or framework for Python 2.x I have tried Candygram and Twisted but I did not like none of them. I'd like something 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 will suggest? Thank you!

+2  A: 

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.

Denis Bilenko
Thank you very much! I will dive into gevent, and try it extensively
daitangio