Routing PlugIn Help

Robustly connects one RBNB server to another. The "parent" server can see and access the "child" server as if the entire contents of the child were a source to the parent.

Input arguments

-a Parent server address (e.g. localhost:3333)
-b Child server address
-t Connection timeout (msec)

Description

This works similar to how the built-in server routing, or more closely, "shortcuts" work, but via modular external plugins.  Relative to built-in server routing:

Disruption Tolerance

Network connections can fail in a number of ways to a number of disruptions. Putting the routing logic in  a plugin makes it possible to more readily  experiment, test, and tailor  disruption tolerant routing logic.

Old Logic

Earlier attempts at disruption tolerance (e.g. the routing built into the RBNB server) used an approach something like:
This approach has met with several difficulties:

New Logic

The robust routing plugin takes a new approach:
There are several types of connections that this plugin makes:
If a parent server connection goes down, for example the RBNB server itself aborts, the plugin goes into a sleepy loop attempting to reconnect.

If a child server connection goes down, the current sink-request handler aborts, but the next incoming request will automatically create a new sink connection.

PlugIn connections are periodically automatically restarted based upon the timeout period.  Successful activity resets the timeout clock so as to retain proven connections for efficiency.  Inactivity for the timeout period causes the plugin to automatically close and reopen its plugin connection.  Thus, even if a connection has an undetected problem, it is automatically repaired at the next reconnect interval.

Sink connections are implemented as separate threads to handle multiple simultaneous requests in parallel.  Sink threads are put in a stack to be re-used only if they have successfully completed the previous request. A sink thread is considered stale and is discarded if it has not been used in the specified timeout period. Thus, bad or hung connections are abandoned, yet good connections are sustained for efficiency.