I am currently considering using java in one of my projects (for reasons not related to the network). At the moment I am using C ++ and my own protocol built on top of UDP. My problem is that although the added efficiency is good for sending large amounts of data in real time, I would prefer something according to the RPC for pure โlogical actionsโ such as login. RPC in C ++ is hard to do, since standard C ++ itself has no concept of serialization.
In another answer, I found Java RMI, which seems to be similar to RPC, but I could not find how efficient / responsive it was and could not be connected to my existing UDP socket, since I did not want to open two ports on my server program .
Alternatively, since I think Java has serialization, I could implement RPC myself, depending on how straightforwardly an arbitrary stream of objects in java deserializes. However, if it requires me to spend a few days learning Java properties, this will not be an option for me.
source share