File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Moving Client Socket from One Server to Another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Moving Client Socket from One Server to Another" Watch "Moving Client Socket from One Server to Another" New topic
Author

Moving Client Socket from One Server to Another

Muhammad Shafique
Ranch Hand

Joined: Sep 30, 2006
Posts: 59
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
Marshal

Joined: Mar 22, 2005
Posts: 41800
    
  62
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.


Ping & DNS - my free Android networking tools app
Muhammad Shafique
Ranch Hand

Joined: Sep 30, 2006
Posts: 59
Hi Ulf,
Thanks for your reply. Thats seems the only possible platform dependent solution available.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Moving Client Socket from One Server to Another