Networking
The algorithm container is deployed in an isolated network to prevent it from reaching unwanted destinations. There are two exceptions:
  1. 1.
    When the VPN feature is enabled on the server all algorithm containers are able to reach each other using an ip and port.
  2. 2.
    The central server is reachable through a local proxy service. In the algorithm you can use the HOST, POST and API_PATH to find the address of the server.
We are currently working on a whitelisting feature which allows a node to configure addresses that the algorithm container is able to reach.

VPN connection

Algorithm containers can expose one or more ports. These ports can then be used by other algorithm containers to exchange data. The infrastructure uses the Dockerfile from which the algorithm has been build to determine to which ports are used by the algorithm. This is done by using the EXPOSE and LABEL directives.
For example when an algorithm uses two ports, one port for communication com and one port for data exchange data. The following block should be added to you algorithm Dockerfile:
# port 8888 is used by the algorithm for communication purposes
EXPOSE 8888
LABEL p8888 = "com"
# port 8889 is used by the algorithm for data-exchange
EXPOSE 8889
LABEL p8889 = "data"
Port 8888 and 8889 are the internal ports to which the algorithm container listens. When another container want to communicate with this container it can retrieve the IP and external port from the central server by using the result_id and the label of the port you want to use (com or data in this case)
Export as PDF
Copy link
Edit on GitHub