Search code examples
javareal-timeniomemory-mapped-files

How to communicate between two JVMs using memory-mapped files?


I was wondering how you would synchronize on a memory-mapped file to safely use it as a pipe between two JVMs. Has anyone done that before with success?


Solution

  • I have a library which does this but it doesn't use synchronization. It writes once to memory rather than reusing the memory which simplifies the memory model. Java Chronicle