Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moving Client Socket from One Server to Another

 
Muhammad Shafique
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,
I am writing a simple client-server application using Java sockets where client creates socket connection by passing server address and server listening port. The server may be busy/over-loaded during the communication cycle because of serving many clients as the same time. To off-load the burden, I need to move some of connected clients to some other server. One why to do this is to let client know the address of some under-loaded server so that client could establish a new connection by itself. However, the requirement is that the server should not let client (or any proxy running at client side) know about this migration. This is just like moving server side socket connection to some other machine without letting client know this. Any help is appreciated!

Thanks,
Shafique
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A connection is specific to a server. Once established it can't be moved. You can could put a proxy in between to which the client connects, and the proxy can then connect to any server it chooses.
 
Muhammad Shafique
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
Thanks for your reply. Thats seems the only possible platform dependent solution available.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic