Answer the question
In order to leave comments, you need to log in
Server multithreading and task queue in Java?
Good afternoon. Need help in explaining the concept of how best to do it and actually suggest literature on this topic.
The task such it is necessary to write the client and the server. Basically there is no problem with the client. Data from the client will come both as commands, for example in (json) or (jsonp) and voice messages.
The task of the server is to authorize the client to accept commands or sound files, process them and send a response. This is in short.
There is a desire to make the server modular, since the list of performed functionality will be replenished and I would like it to be convenient to expand it. I see it this way, the main part authorizes users, is responsible for receiving / sending messages and parsing the protocol, it adds commands to a queue or list and notifies modules, and then from this queue the necessary commands pick up modules, perform the necessary actions and place the result in the same pool execution and the server sends it to the client/clients.
The question is how much is the right concept?
What can you read about plug-ins / plugins in Java?
What to read about threads / queues and client server in Java?
What to read about events and the queue / pull / list I need?
What is the best data transfer format? (json, jsonp or etc)
Answer the question
In order to leave comments, you need to log in
1) Modularity can be achieved using OSGI
2) Java Concurrency in Practice
3) The implementation of the "command" pattern suggests itself
4) json or binary format
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question