Intercommunication between Java Chat Servers
Posted
by
Pravingate
on Stack Overflow
See other posts from Stack Overflow
or by Pravingate
Published on 2012-04-11T11:26:49Z
Indexed on
2012/04/11
11:29 UTC
Read the original article
Hit count: 171
I have a application in which I am using socket programming , having this(image) scenario. Where number of clients will try to connect Broadcast server. Now here I am managing load through LVS(Load balancer). so as a example shown in image, suppose 200 clients will wish to login for broadcast they will be distributed as 100 users on server 1 and another 100 users on server 2.clients will get connected to servers using TCP connection.
Now I am maintaining user information on server side in arraylist which will be stored in heap memory,Now the problem is if client wish to broadcast to all logged in users, but that particular client is logged in server 1. and so client will not be able to broadcast another 100 users from server 2. Because both ther servers are unaware about each others state.
please suggest to solve this scenario by whatever means you want.
© Stack Overflow or respective owner