aspose file tools*
The moose likes Web Services and the fly likes finding the server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "finding the server" Watch "finding the server" New topic
Author

finding the server

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 194
Hi all,
In my application there are 50 servers talking to a centrally located server.Sometimes ,the central server sends messages to the 50 servers attched to it.I want to know how should I provide the IP address and port of the 20 servers to my central server.I think mentioning the ip address and port number of 20 servers in a file is not a good solution.Please express your views.

with regards,
ajse
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by ajse roy:
I think mentioning the ip address and port number of 20 servers in a file is not a good solution.Please express your views.


You haven't clarified your requirements.

If the central server only has to send messages back to the servers as part of a response to a request then the ip/domain address should become part of the request.

If the central server is broadcasting information then follow the publish/subscribe model. The client (server) would send a subscribe request to the central server that includes its ip/domain address. It could also send a unsubscribe request to be taken of the subscribers list. The central server would then send messages to all the servers that are currently on the subscribers list. The 'list' of subscribers would have to be persisted in a file or database to survive server crashes.
[ March 15, 2006: Message edited by: Peer Reynders ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding the server