SOMns icon indicating copy to clipboard operation
SOMns copied to clipboard

Supporting Transfer of Far References Between Actors

Open smarr opened this issue 10 years ago • 0 comments

Currently, SOMns and Newspeak do only support the transfer of far references between actors as direct message parameters.

Since we do not have variable-length argument lists, the only way to transfer an arbitrary amount of references is by sending a corresponding amount of messages. Furthermore, there is currently no way to send far references as part of structured data. So, any semantic associated to references needs to be decomposed on the sender side and reassembled at the receiver side.

There are two ways to fix this:

  1. make far references proper first class objects which are themselves values, and can be part of values
    • we cannot allow there storage in values without that, because we would have to treat them transparently as direct references in the owning actor, which would cause values not to be deeply immutable anymore
  2. introduce a new kind of object that is passed by value: isolates/transfer objects

Currently, I am thinking that option 2 is the least problematic one, because having far references as fully first-class objects leads to all kind of compilation with their handling (identity, reflection, how to treat them in the owning actor, etc).

The only drawback of transfer objects/isolates is that they are yet another kind of object one has to be aware off.

smarr avatar Oct 15 '15 15:10 smarr