Java interprocess communication in 2015 (without boiler board)?
My use case:
>Process-1 "database", load 1GB of data from the data file into memory (only 30-60 seconds) > process-2 "client" wants to quickly access the data without loading it all
They are independent processes running on the same machine The data I want to transfer between processes is a collection (list, mapping) containing primitive types (integers, strings, Booleans)
I know this can be done by opening socket connect (creating some specific protocols when serializing data) or RMI (more or less the same thing) We did these two things 15 years ago No one is automating this now, so by using some libraries, you can set @ interprocessmethod ("some", "details") and call methods on different JVMs without serializing each time, etc? (because the main types should not be too complex)
A company called caucho once had some products to solve this problem, but I can't find their web page anymore Then again, it is a web service, not an RPC
Solution
Not what I am now More "2015" will be consistent with RMI, or refactor your backend into a rest API and connect it through JSON. Then, if you like, you can use Jackson or even manually serialize / deserialize it (in some very performance-oriented scenarios)