Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

finding the server

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic