I am about to implement a server application that can answer queries fast. The server is implemented in java. I don't want to waste a lot of time on a complicated communication protocol so I search for a good best-practice way of 1) performing a query to my server 2) letting the server answer that query Both the queries and answers will be maps from integers to integer lists.
Related: Are there any combined framework that both handles the query/response protocol AND manage incoming queries (puts them in a queue)?
I don't know if I should implement it as a plain daemon or a web service. A web service seems more flexible as it can be relatively easily moved to another machine but a plain daemon sounds faster.