zone:routerId:clientId
This page explains "KOS Networking". KOS networking makes it easy to communicate between nodes, whether those are on the local network, or located on a remote network.
Before digging into the concepts, let’s define the relevant KOS terms:
A "node" is a computer running the KOS operating system.
If that node is also running Java, then it can participate in the KOS network.
These nodes exist in drink dispensers and in the KOS Studio’s simulators.
A "zone" identifies a cluster of nodes, where all routers in the same zone know about each other, can route between them, and can typically recover if there’s a failure.
Now that we have a basic understanding of the terms, we can now describe the KOS networking concepts.
An address is composed of three things, in this order:
Zone
Router ID
Client ID
Each of these is separated by a colon:
zone:routerId:clientId
The following shows the KosAddress class in stripped-down form:
KosAddress
classpublic class KosAddress {
private final String zone;
private final String routerId;
private final String clientId;
// Constructors:
public KosAddress(String addr);
public KosAddress(String zone, String routerId, String clientId);
// Getters:
// (as expected)
// Methods:
public String toString(); // returns zone:routerId:clientId
public String toRouter(); // returns zone:routerId:0
}