Chat Room with JPA / Servlets - References/Recommendations?

05/08/2017 12:35 C_O_R_E#1
Hey there!


I'm running a web-project for a couple of weeks and going to implement chat system.


May I ask you guys, where I should start to look for a chat room system in JPA/Servlets?


Does someone know a good reference to look for?




Note: Probably Servlets isn't the best way to implement such a thing like that, but I'm forced to.




ahoé


C_O_R_E



Edit://


What the system should capable of?


1. User connects to chat
2. Broadcasting to all users currently connected to
3. Notifications to inform new messages has been received
4. Disconnection
5. Reconnection
05/08/2017 16:19 Devsome#2
#moved
05/09/2017 19:38 NotThatBad#3
The keyword for server implementations is usually "multithreading". Handle logins and logouts with sessions cookies. Implement some kind of "User" model to identify logged in users, broadcast to a subset of e.g. a List<java.lang.Thread> which has a "User" object stored for each connection.

05/09/2017 21:39 C_O_R_E#4
@[Only registered and activated users can see links. Click Here To Register...]
As you said, I will go through all those keywords to make some progress.


In general, I already know how the implementation should look like, but lacking in specific implementation work.


Thanks for your contribution