I have a big database controller which is written in Java. The controller reads information from the database, and interprets it into data structures which are then displayed in a CLI.
Java was chosen because writing code in it is fast and easy. Now I want to create an RPC server on top of the controller (XML-RPC or JSON-RPC for future AJAX calls), but it looks like I need a servlet container for my RPC service. I am confused because last year when I needed this kind of capability for another project in python, it took me less than 5 minutes to create the same functionality using the SimpleXMLRPCServer
The same ease of creation applies also to C# as far as I recall.
But in Java the story is different; now I need a servlet and therefore a servlet container (i.e Tomcat, Jetty) which means I need to install and maintain web servers. From what I can tell, JSON-RPC requires Spring
framework in order to work.
I have already spent around two hours in learning the design and sort-of how Tomcat works without writing even one line of code.
I searched the web and found out that I have standalone options: I can use this library, but it doesn't seem maintained and it is also somewhat complex (I'm looking for something with decorators / annotations).
The other option I found is to use the so called "embedded" jetty and then trying to set it and configure it by code which also seems a tedious task.
Why isn't there a standalone mechanism for such a popular interface? Am I missing out something here?