Web Services‎ > ‎

ipreg


Overview

This service allows devices to register "services" available on a LAN.

Problem Statement

Discovery of services available on a LAN is a problem addressed by technologies such as Multicast-DNS with Service Discovery but when it comes to supporting these protocols on mobile devices (i.e. Android), the situation is more complicated.  On Android devices (as example, I haven't investigated on iOS or others), many device manufacturers (e.g. Samsung) have opted to disable reception of multicast packets: thus, Multicast-DNS cannot be used.

Use Case

A Use Case addressed by the ipreg service is the following:  
  • User is hard at work 
    • User is listening to music at the same time
    • User's mobile phone rings : the music is playing loud enough that User doesn't hear his mobile phone ring
One way to resolve this situation is to have the mobile phone send a "phone ringing" event to the music source to have it put on pause/mute.

Service Details

Registration of Service

Registration of a Service is done through the following API:

GET method : HTTP://services.systemical.com/ipreg/v1/$service/$IP

Where:
  • $service : represent the "name" of the service being registered
  • $IP : (and optionally IP:PORT) is the LAN IP address:port of the service
If the call was successful an HTTP status code of 200 will be returned.

Service Querying

To retrieve the list of services registered at a particular public location, use the following API:
GET method :  HTTP://services.systemical.com/ipreg/v1/ [?format=json|jsonp]

A response of the form for JSONP format will be returned:

systemical_ipreg({
    'status' : 'OK',
    'list' : [ ...list of services... ]
});

Restrictions

  • Note that multiple services (up to 256 at the moment) can be registered per public IP address.
  • Registration is rate limited to 1 update per day
  • Usage is monitored and abusers will be black-listed

How does it work?

The service works by looking at the "source" IP address of the incoming HTTP connection. This gives the "public" IP address from which the request is coming from. At this point, the service can associate the "$service" being registered with the "public IP" address of the registrant.