mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Hudzia" <benoit.hud...@gmail.com>
Subject vm-pipe and object reference passing
Date Fri, 01 Sep 2006 13:55:44 GMT
I am currently implementing a p2p grid system (Dget). In this system I have
entity moving from one peers to another ( to simplify entity = agent on
steroid).
 
Since I can have multiple entities on one local system, I use the vmpipe
from mina to provide a uniform communication model for theses entities. When
two entity communicate with each other remotely, they both go through the
encoder decoder layer (serialization, or custom binary encoding etc ..)  .
But when they are both hosted on the same peers we simply forward the
object/ message directly using vmpipe.
 
One problem arises at that level because the message and the instance of
objects within are passed as reference. This means that when one entity is
modifying the object passed it is also modifying the object on the other
entity (since they share the same reference). It might be useful in some
case (actually its very useful in most of my internal communication/routing
within the peer), but its not really consistent with communication
abstraction because when you are communicating you should not share message
/ objects . 
 
To go around such problem I used deep cloning technique of the object
(custom fast serialization / de-serialization during the routing of the
message within the peers) . But it might useful to enable/disable such
behaviour at the vmpipe level. Or maybe proposing a deep cloning filter for
people that want it?
If people are interested I can donate the code for deep cloning filter. 
 
Benoit Hudzia
Parallel Computing Research Group
School of Computer Science & Informatics
University College Dublin
Ireland

Tel: +353 1 716 2403
Fax: +353 1 269 7262
E-mail: benoit [dot] hudzia [at] ucd [dot] ie
Web: <http://benoit.hudzia.googlepages.com/>  Personnal Web Page,
<http://voidreflections.blogspot.com> Blog 
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message