Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Framework for Java RPC server [closed]

I'm planning on writing an RPC server in Java. The server needs to accept incoming RPCs - probably over HTTP - and answer them. Fairly basic stuff. Support for 'long polling' or 'hanging' RPCs isn't necessary, so a thread-per-request model ought to be perfectly adequate.

If I were writing this in Python, I would probably use a framework like twisted. In C, something like glibc. In each case, the framework provides an implementation of the general 'select loop' core of handling IO and invoking higher level constructs that deal with it, eventually leading to my application being called for events such as receiving an RPC.

It's a long time since I wrote anything substantial in Java, though, so I don't know what the state of the art or the suggested solutions are for this sort of thing. Possibly there's even parts of the standard library I can easily use to do this. Hence my question to StackOverflow: What frameworks are there out there that would be suitable for a task like this?

Note that although I may use HTTP for the RPCs, this is emphatically not a web application - and as such, a web framework is not appropriate.

like image 784
Nick Johnson Avatar asked Dec 30 '22 02:12

Nick Johnson


1 Answers

Apache MINA is a very well designed asynchronous non-blocking networking framework. It provides byte-oriented access to read and write packet data. Building atop that it has a filter system where additional layers can be added, providing things like line-oriented text parsing, encryption (via TLS), compression, etc.

PS: The 2.0 release series is highly recommended, even though it's still in "milestone" form, it's proven very stable and is nearing a final release.

like image 60
Mark Renouf Avatar answered Jan 02 '23 23:01

Mark Renouf