1GB of data into memory from data-files (just the loading takes 30-60 seconds) process-2 "client" want..." /> 1GB of data into memory from data-files (just the loading takes 30-60 seconds) process-2 "client" want..." /> 1GB of data into memory from data-files (just the loading takes 30-60 seconds) process-2 "client" want..."/>

Java inter-process communication in year 2015 (with no boiler-plate)?

202 views Asked by At

My use-case:

  • process-1 "database" that loads >1GB of data into memory from data-files (just the loading takes 30-60 seconds)
  • process-2 "client" wants to access that data quickly without having to load it all

They are separate processes ran on same machine. Data I would like to transfer between the processes is Collections (lists, maps) containing primitive-types (integers, strings, booleans).

I know that this can be done by opening socket-connect (creating some specific protocol in serializing the data) or by RMI (more or less the same thing). We did both of these already 15 years ago. Hasn't anyone automatized this by now so that by using some library you could just set up @InterProcessMethod("some", "details") and be able to invoke methods on different JVM without having to implement serializations etc. each time? (because of the primary types this shouldn't be too complex).

A company called Caucho used to have some product to tackle this issue but I cannot find it from their webpage anymore. Then again, it was a sort of web-service instead RPC.

1

There are 1 answers

0
jotadepicas On

Not that I now of. The more "2015" would be to stay with RMI, or, refactor your backend into a REST API and connect it via JSON, and then, if you want, serialize/deserialize it with Jackson or even by hand (In some very performance oriented scenarios).