... | ... | @@ -39,15 +39,18 @@ Each gateway has a busClient that implements this library and opens a [MQTT](htt |
|
|
|
|
|
Also part of the router is the busManager which organizes the creation and access to rooms. It communicates with the [switchBoard](https://gitlab.zhdk.ch/telemersion/telemersive-switchBoard).
|
|
|
|
|
|
On the server the router is running each room gets a port-range allocated. For example: If the room number is 11, the port range allocated starts with 11'000 and ends with 11'999. The switchBoard is responsible for starting a set of proxyScripts inside that range.
|
|
|
On the server the router is running each room gets a port-range allocated. For example: If the room number is 11, the port range allocated starts with 11'000 and ends with 11'999. The switchBoard is responsible for starting a set of proxyScripts inside that range. Currently only the first 200 ports in the allocated range are used:
|
|
|
|
|
|
![Diagram](svg/PortRangesV5.svg "PortRange")
|
|
|
|
|
|
Depending of the type of proxyScript, the script opens one or two ports on which the gateways can send and/or receive data. The scripts are relatively dumb and simply pass on the UDP packages they receive to the connected gateways, depending on their type:
|
|
|
|
|
|
* one to one bidirectional - receives and sends on the same port
|
|
|
* one to many monodirectional - receives on one and sends on another port
|
|
|
* one to many bidirectional - a port for the 'one' and a port for the 'many'
|
|
|
* many to many bidirectional - receives and sends on the same port
|
|
|
|
|
|
The holepuncher is used for a special ultragrid connection: While it is possible to establish one to many connections via the switchboard, its also possible to create direct peer to peer connections without the rerouting over the router. Holepuncher is the service running on the router that makes this possible.
|
|
|
|
|
|
# Implementation
|
|
|
|
|
|
## telemersive-gateway
|
... | ... | @@ -66,6 +69,8 @@ The Userinterface makes the configuration of the CLI apps very simple and user f |
|
|
|
|
|
## busClient
|
|
|
|
|
|
The busClient is a more simplyfied solution with a reduced functionality compared to the gateway, but it doesn't require the access to a telemersive-router.
|
|
|
|
|
|
![Diagram](svg/DiagramSimpleRouter.svg "Solution")
|
|
|
|
|
|
As previously mentioned, at the core of the telemersive-gateway lies the busClient, the nodejs client based on the telemersive-bus. The busClient can be running bare bones and thus give direct access to the more limited functionality the telemersive-bus provides, which includes
|
... | ... | |