Hello folks,
I'm writing web chat application, similar to GTalk. It based on Orbited + Sinatra for client side, and Ruby for server side. I've already implemented all the protocol, everything working good. But. I got a problem - dont know how to deal if there are multiple connections from one user. Let`s say for example, i logged to chat from 2 different browsers. Google handles that really nice, two chats appear to be exactly the same. But my app just shows 2 exactly the same users in contact list, which is incorrect.
Here is a small example of server clients pool:
Server
--> Connections
|
- Client (User Information, ConnectionID)
- Client (User Information, ConnectionID)
....
- Client (...)
I have 2 types of messages: Private (user-to-user), Public (user-to-conference).
Im trying to figure out how to deal with such situation? Any suggestions?