I need two separate java programs, running in separate JVMs to exchange numeric data as fast as possible through either a file stream (linux pipe) or over a network connection.
Every message is a double[] where the length of the array can vary from message to message. I would be interested what the fastest way to do this is, especially in a situation where both JVMs run on the same machine or the same hardware.
In a C-like language, this could be done by just aliasing the array to a byte buffer and transferring the byte buffer as is (plus a small header that will tell the recipient about the size of the array to create to take up the buffer). Is something similar possible with Java?