Finding the disparity hard to manage

27 views
Skip to first unread message

Jakob Bowyer

unread,
Sep 15, 2016, 7:50:52 AM9/15/16
to python-pulsar
Coming from other actor frameworks in Java, Elixir, and Python. Its hard to wrap my head around how Pulsar does actors, I don't need any of the application logic I want to be able to implement my own actors that have fixed loops, but its not obvious or clear how to do this. The examples of how to use the raw actors are very hard to follow. Something that would be nice to see would be how to create an actor that 

Once fired up, can be sent "ping" and will reply with "pong" and will do this forever.

This is the simplest actor example I can think of. 

lsbardel

unread,
Sep 19, 2016, 3:46:22 AM9/19/16
to python-pulsar
Hi,


On Thursday, September 15, 2016 at 12:50:52 PM UTC+1, Jakob Bowyer wrote:
Coming from other actor frameworks in Java, Elixir, and Python. Its hard to wrap my head around how Pulsar does actors, I don't need any of the application logic I want to be able to implement my own actors that have fixed loops, but its not obvious or clear how to do this. The examples of how to use the raw actors are very hard to follow.

Pulsar actors are threads or processes (default) with their own event loop.
They are managed by the arbiter, the master actor (main process main thread).

Actors are created via the spawn method and messages are passed via the send method.
The the send method you can run commands on remote actors
The most general command is run, which runs a function on the remote actor.

 
Something that would be nice to see would be how to create an actor that 

Once fired up, can be sent "ping" and will reply with "pong" and will do this forever.

There are few raw actor examples in the examples directory


Let me know if you have more specific questions.

Reply all
Reply to author
Forward
0 new messages