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.
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 ]