I have two Java applications running on the same machine. As there was a requirement for remote connection we implemented the inter-jvm communication via http. We are passing about 10MByte imagedata 100 times a second from one vm to the other. With http we got huge delays as the write-function took too much time. As speed is the most important criteria, http can be skipped as requirement. Then we tried sockets, but it's still too slow. I've read about RMI and Chronicle (openhft) for fast inter-jvm messaging. Chonicle sounds interesting to me as we could use chronicle-queues for message passing and chronicle-map for sharing the image data.
But to be honest, I cannot estimate what would be best. The use case is the following: The server collects images. Clients requests a list of available images. As soon as the client gets the message, the clients requests one specific image. The server has the image already loaded, and needs to send the image to the client. Any suggestions what strategy to use? We could also send all images to the client, but this would cause the server to use too much time sending data, which is not needed.
Thanks for your tips.