0

We want write a Java 7 program that will boot (via 2 cmd line invokes) as two separate JVM process instances. We want these 2 processes to communicate with each other using native Linux kernel shared-memory IPC resources.

Does anyone have any insight as to which of these 2 approaches may have more merit?

  1. Use java.nio.* API on /dev/shm
  2. Use JNI bridge to C++ code that makes native shmctl() system calls

?

LRI CS
  • 161
  • 10

1 Answers1

1

I vote "NIO and /dev/shm".

But before making any final decisions, you should also consider other options, including CLIP:

Sockets, message queues and named pipes are other IPC methods I wouldn't necessarily dismiss out-of-hand. IMHO...

Community
  • 1
  • 1
paulsm4
  • 114,292
  • 17
  • 138
  • 190