Dynamic Server Opening List

I would like to create a web service that the application server can contact to add itself to the list of servers implementing the application. Customers can then contact the service for a list of servers. Something similar to how minecraft heartbeats works to add your server to the list of main servers.

I could implement it myself quite easily, but I hope someone already created something like this.

Additional features would be helpful. Such things as:

  • Allows the client to query for application properties, such as the number of users connected to the server
  • Distributing a list of servers on multiple machines
  • Mark a server entry in the list if it has not sent a pulse for some time

Does anyone know about such a service? I know that there are open protocols and servers for detecting local area networks, but it will be a WAN service.

+4
source share
2 answers

The protocols that I could find that were relevant to your intended application are as follows:

The XRDS documentation is stupid, but you can specify XML service descriptions. The specification of the type of service may be general, but I get a headache from trying to decipher the work of the committee.

The XMPP Service Discovery protocol (part of the protocol formerly known as Jabber) also looked promising, but it seems that even if you can push your description of the service, they expect it to become one of the services mentioned in this list . Expanding it will make it non-standard.

Finally, I found something called seap (SErvice announcement protocol) . It is old, it is shaky, the source can be decent, it is written in C and Perl, it is kludge, but it seems that it does what you want, kind of.

Pressing the service pulse seems to be such an application specific and trivial problem that almost no one has considered a solution to the general case.

My advice? Read the protocols and sources mentioned above for inspiration (I'll start with seap), and then write, implement and publish a common (probably xml-based) protocol yourself. All existing ones, apparently, are either application specific, incomprehensible, or bedbugs.

+1
source

Basically, you can write it yourself, although I don’t know if anyone has a public one (I wrote one 10 years ago, but for the company).

  • (TableCols: auto-counter, svr_name, svr_ip, check_in_time, any-other-data)
  • beating code ( http://<you-app.com>?svr_name=XYZ&svr_ip=PQRS )
  • to list servers for a specific check_in_time
  • to make some correction incorrectly (for example: clear old records)

To send heartbeat, you only need to send an http: // call, on Linux use wget * with crontab, on Windows use wget.exe with task scheduler.

This application is specific, therefore, even if you wrote it yourself, others cannot use it without changing the source code.

+1
source

All Articles