• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Inter-VM communication

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way of interchanging data between 2 objects running in diferent VM?
I know I can create a pipe and stream the data with it, but I'm just curious about that ...
Thanks in advance!
Luis Alfredo Perez
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lots of ways to do this....
One way I've done this is using sockets. One VM can be the "server" and create a ServerSocket on some port. Then the other VM can connect to that using a Socket. You then get I/O streams to talk on.
Sending serialized Objects over the streams makes a pretty easy "protocol".
If both VMs are peers, then you have to come up with some kind of agreement about which is the server (first one up, probably).
reply
    Bookmark Topic Watch Topic
  • New Topic