All SmartSpace objects can operate both as Clients and Servers.
When a new SmartSpace object enters the network, it will:
- Scan that network for other objects.
- Check which objects are SmartSpace Servers
- Request a Public Application manifest
- 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:
- 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: 126.96.36.199 – Your IP number on Connectify
- 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
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:
- 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.
- Process the Server Manifest – Which states:
- Server Statistics – In the shape of the number of connections at that time
- Whether it exposes itself as a Server to Clients – Just for completion sake
- 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:
- Applications – Are the things you can use in a Smart Space, via your computer, mobile phone, tablet or any other device.
- 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:
- Request each Server – if it serves this Sandbox
- 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:
- There is no center
- There are no fixed IP locations to connect to
- Each Server can be just a pass-through station for Messages and Events
- 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.