TechDoc: Finding and identifying SmartSpace Servers in a local network

Posted on May 6, 2011

0


Basis

All SmartSpace objects can operate both as Clients and Servers.

When a new SmartSpace object enters the network, it will:

  1. Scan that network for other objects.
  2. Check which objects are SmartSpace Servers
  3. Request a Public Application manifest
  4. Identify which Servers host a specific Application Sandbox the SmartSpace object will connect to.

Step 1: Scanning the network

When a SmartSpaces Object is started, it will:

  1. Collect all the IP numbers assigned to the machine it runs on – In most cases this will be one number, but in some cases this can be two or more. For instance:
    • IP number 1: 192.168.1.3 – your IP number on the WiFi
    • IP number 2: 183.168.0.6 – Your IP number on Connectify
  2. Explore the range of each IP number – As each IP number is part of a specific range of IP numbers in which other SmartSpace Objects might be, we will scan this range.
    • IP number 1: 192.168.1.xxx – where xxx ranges from 0 to 255
    • IP number 2: 183.168.0.xxx – where xxx ranges from 0 to 255
  3. Ping each IP number to see if something is there – As we have no clue who is within our network and where they are located, we perform a scan on all.
  4. Store the IP numbers we got a response from – In Objects which are stored in an Object Pool.

Step 2: Check which objects are SmartSpace Servers

Not all objects we found in a network are SmartSpace Servers. Some are just SmartSpace Clients. Some are just a computer or some other device.

As we can only communicate to and with a SmartSpace Server, we will:

  1. Test each object – by trying to make a Socket connection to it, using a specific Socket. If the Object is a Server, it will return a Manifest. Otherwise, the connection will fail.
  2. Process the Server Manifest – Which states:
    1. Server Statistics – In the shape of the number of connections at that time
    2. Whether it exposes itself as a Server to Clients – Just for completion sake
    3. Which Applications are available in the public space – This is your point of entry to start working

Applications and Application Sandboxes

Applications and Application Sandboxes can be identified as follows:

  1. Applications – Are the things you can use in a Smart Space, via your computer, mobile phone, tablet or any other device.
  2. Application Sandboxes – Are the environments in which Applications run. They can be seen as separate work spaces. The main thing to know is that Events and Messages in Sandbox “A” can never interfere with Events and Messages in other Sandboxes (“B”, “C” and “D”).

Step 3: Identify which Servers host a specific Application Sandbox

We find the right Servers as follows:

With the list of Servers found in Step 2 and the Identifier of an Application Sandbox, we:

  1. Request each Server – if it serves this Sandbox
  2. Store each server that serves our Sandbox – in a SandBox placeholder

Mes Networks, or: Understanding SmartSpaces Servers

The main design goal in the architecture of the SmartSpaces Servers is to create an unbreakable structure.

Therefore, SmartSpaces Servers are replacable nodes in a larger Mesh Network. This means that:

  1. There is no center
  2. There are no fixed IP locations to connect to
  3. Each Server can be just a pass-through station for Messages and Events
  4. You do not know beforehand which Server will host a specific Socket Connection from your client.

SmartSpaces Servers can change roles. They can be switched off. They can be taken out. They can be introduced shortly to increase capacity.

Advertisements
Posted in: techdoc