nguyennv / pysage

Automatically exported from code.google.com/p/pysage
0 stars 0 forks source link

optimize the message passing API for common use #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have only had a brief look at pysage so forgive me if I'm ignorant on the 
subject. It seems as if 
the message passing API could be easier to use in the following way:

When you queue/send a message (ie: multicast or monocast), it could go 
immediately to the 
receiver(s). This possibility is further detailed in 
http://code.google.com/p/pysage/issues/detail?
id=3.

Having this ability to immediately send messages asynchronously (instead of 
effectively 
scheduling them for later, as pysage seems to have now) would more closely 
approximate erlang 
and some other message passing concurrency implementations (including gears 
workerpools, 
which is my favorite!)

Having this immediate send functionality could eliminate the need for the 
ActorManager.tick 
instance method, or pysage could have deferred messages which would be sent 
later with tick.

Original issue reported on code.google.com by arsch...@gmail.com on 9 Apr 2009 at 4:54

GoogleCodeExporter commented 8 years ago
additionally, it would be great to have a convenience method in the Actor that 
would allow clients to send raw 
data (ie: strings, integral types, etc...) as messages. of course, this method 
would package up this raw data into a 
proper message.

Original comment by arsch...@gmail.com on 9 Apr 2009 at 5:01