RoutingΒΆ

To send messages it is sufficient to set a recipient address in the Envelope. The message is then passed to a transmission method and the message is delivered. But how does the system find the right target on another NODE somewhere in the network? The framework must be able to determine each NODE in the network for this task. Since there is no central directory of all computers or NODES in the network, there must be another mechanism.

For routing we need all links between the NODES in a network. When a NODE C is connected to a NODE D, a new link CD is created. Both NODES now know each other.

However, if C was already connected to NODES A and B, and NODE D was already connected to NODES E and F, a larger network is created.:

A--\         /--E          A--\     /--E
    C   +   D       =          C---D
B--/         \--F          B--/     \--F

The new link C–D must be communicated to the other NODES (ABEF). But this is not enough, because A and B do not yet know the links DE and DF. And the NODES E and F don’t know anything about the links AC and BC.

A special flooding broadcast provides fast and bandwidth-saving information for all NODES without the need to send the entirety of all links to all NODES.

The situation is similar in the case of a connection failure. If the link CD is interrupted, the NODES C and D will notice it first. But C then loses not only D, but also E and F. The same applies to all other NODES. Nevertheless, only the interruption of C and D must be reported to the NODES.

Each NODE has a list of all links in the network (here AC, BC, CD, DE, DF). With this network of graphs you can find the fastest route through a network at any time, e. g. from A to F, using the Djikstra algorithm. This also applies if several routes lead to the goal. The algorithm also detects unreachable NODES, i. e. NODES that cannot be reached from a starting point. If the link CD is interrupted, F cannot be reached by A any more.

The links between the individual NODES can be rated in the configuration. This tells you how fast a message can be sent between the NODES. The routing algorithm finds the fastest route of a message through the network.

Each NODE has a current graph network and can calculate the routing for a message completely. However, we would only be interested in the next step, the next NODE, to which a message would have to be forwarded. This next NODE will then determine the following NODE and so on. This leads to the curiosity that a message that is already on the way can change direction if a connection is lost in a route before it, if an alternative route exists. Otherwise it would be returned with an error code.

Important

These routing mechanisms allow us to send messages over one network to another NODE without the programmer knowing which links are currently intact and without the need for a direct connection to the target. This is a new approach to distributed objects, distributed programs, message passing. It allows us to distribute objects over a network and change this distribution at any time. And this without using a central server or middleware. Peer-to-Peer rules!