Hello, I hope my question is ok for this forum.
I need to develop a
java application that will run as a daemon inside a linux machine and will accept logins from remote browsers (Chrome, Firefox, ...) through WebSocket.
To do this, the application will have a
thread called login_thread that waits for one remote client to send a login attempt through the websocket called login_websocket.
When the login attempt arrives, the login_thread creates a new thread called user_thread and move the login_websocket to this newly created thread (after that we will call it user_websocket), then creates a new websocket and waits on it for another client login attempt.
At the same time, the user_thread now sends and receives messages through the user_websocket till the remote client logs out.
I am searching for some advices on how to implement that architecture with Java. I've read articles and tutorials about Tyrus but it seems that using Tyrus I will not have the full control over the websockets that I need.
In short, I would like to do the same thing as described in this article:
http://tutorials.jenkov.com/java-multithreaded-servers/multithreaded-server.html
but using websockets and not simple sockets.
Is this possible? Is there a library that permits me to do this in a simple way?
Sorry if the question is dumb, but it is the first time I try to use websockets in Java and I feel a bit confused.
In JS, for example, the thing that I'm trying to do seems easily feasible.
Thank to each and everyone of you that will help!
- ipmpi