1. Message-passing framework and 'actor' objects

Hi

could someone please comment on the potentialities of OpenEuphoria or Phix for the implementation of a message-passing framework (and 'actor' objects)? In an 'actor' model the objects send and receive messages to one another, triggering actions (each message essentially being a method call on the receiving object). I know, the OE/Phix framework is quite different from all this, but still I am curious about the possibility to implement some sort of actor model or at least emulate some of its functionality in OE/Phix. The idea came to me from the Io programming language (iolanguage.org) where the only entities are 'actor' objects whose structures are not fixed and can change quite radically at runtime. They reminded me of Euphoria sequences, whose structure is equally dynamic and can freely change at runtime. Io's objects are esentially hashtables containing slots (each slot being a key/value pair, where the value associated with a key can be a function and thus serve as a method of the object). Since our sequences can already be used to implement OOP and dictionaries too are already available, I was thinking that perhaps it could be possible to make our sequences behave like actor objects. I believe the crucial step would be to implement a message-passing framework to let the objects interact with one another. And of course, objects would also have to be made to operate as semi-autonomous entities (although interacting with each other). Again, I know that this is all very far from the current OE/Phix paradigm, but optimistically I imagine that just like basic OOP was introduced in Euphoria, although not officially, a step further could be taken to also implement actors, perhaps without even too much effort. I believe it all boils down to implementing a message passing infrastructure. Hypothetically, how much effort would it take to implement such a framework? Would it be necessary to modify the language itself or could this be implemented simply as an add-on to the language, as an external library?

I would really be grateful if you guys from both the OE and the Phix user communities shared your thoughts about this idea.

Thanks

GreenEuphorian

new topic     » topic index » view message » categorize

2. Re: Message-passing framework and 'actor' objects

Here are my thoughts, based on my understanding of the actor and message-passing patterns. I'm not too familiar with them so excuse my ignorance if that's the case.

You could probably design pluggable actor library, where you can register new actor types and then assign their required functions. I'd use maps to maps to create actor objects and assign their registered actor type and other properties, and pass the actor into the message passing interface. This is basically what I'm doing in mvc/model.e for Euphoria MVC.

For a message passing interface, would something like ZeroMQ or Redis work? ZeroMQ would allow you to spin up your own services and then pass messages around in a variety of patterns (pub/sub, etc.). Redis is a little similar, and has its own server, where you could post messages to a given key (the actor or actor type, probably) and then poll for them in some client service.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Message-passing framework and 'actor' objects

GreenEuphorian said...

Hi

could someone please comment on the potentialities of OpenEuphoria or Phix for the implementation of a message passing framework (and 'actor' objects)? In an 'actor' model the objects send and receive messages to one another, triggering actions (each message essentially being a method call on the receiving object). I know, the OE/Phix framework is quite different from all this, but still I am curious about the possibility to implement some sort of actor model or at least emulate some of its functionality in OE/Phix. The idea came to me from the Io programming language (iolanguage.org) whose only entities are 'actor' objects whose structures are not fixed and can change quite radically at runtime. They reminded me of Euphoria sequences, whose structure is equally dynamic and can freely change at runtime. Io's objects are esentially hashtables containing slots (each slot being a key/value pair, where the value associated with a key can be a function and thus serve as a method of the object). Since our sequences can already be used to implement OOP and dictionaries too are already available, I was thinking that perhaps it could be possible to make our sequences behave like actor objects. I believe the crucial step would be to implement a message-passing framework to let the objects interact with one another. And of course, objects would also have to be made to operate as semi-autonomous entities (although interacting with each other). Again, I know that this is all very far from the current OE/Phix paradigm, but optimistically I imagine that just like basic OOP was introduced in Euphoria, although not officially, a step further could be taken to also implement actors too, perhaps without even too much effort. I believe it all boils down to implementing a message passing infrastructure. Hypothetically, how much effort would it take to implement such a framework? Would it be necessary to modify the language itself or could this be implemented simply as an add-on to the language, as an external library?

I would really be grateful if you guys from both the OE and the Phix user communities shared your thoughts about this idea.

Thanks

GreenEuphorian

Is there anything to be gained? I looked at iolanguage.org, And I am pretty certain that what you are looking for is achievable.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Message-passing framework and 'actor' objects

Bhupen1277 said...

Is there anything to be gained? I looked at iolanguage.org, And I am pretty certain that what you are looking for is achievable.

I like Euphoria more than I like Io (more standard syntax, sequences, etc), but the idea of having actor objects passing messages amongst them is too cool and intriguing for me to just let it go. I would like to have the best of both worlds.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Message-passing framework and 'actor' objects

BTW the actor model is also used by programming languages that are much more professional and popular than Io, in the field of distributed computing and/or parallel computing.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Message-passing framework and 'actor' objects

GreenEuphorian said...
Bhupen1277 said...

Is there anything to be gained? I looked at iolanguage.org, And I am pretty certain that what you are looking for is achievable.

I like Euphoria more than I like Io (more standard syntax, sequences, etc), but the idea of actor objects and message passing amongst them is too cool and intriguing for me to just let it go. I would like to have the best of both worlds.

You mean you want to have your cake and eat it. You should realise that the cake you ate would be same tasting as the one in your hand.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu