Akilan1999 / p2p-rendering-computation

p2p network to enable running distributed computation and rendering.
https://p2prc.akilan.io/
GNU General Public License v2.0
28 stars 10 forks source link

[Feature] Added new feature mapped ports taken are mentioned #77

Closed Akilan1999 closed 3 years ago

Akilan1999 commented 3 years ago

Brief understanding of the PR

When a plugin is executed. Each plugin might require a set of different ports based on what they are doing. In previous PR (i.e #73) it's mapped to a port is preset when a container is created. To ensure the container can be reused to execute other plugins. We created a field in the struct docker container called IsUsed bool `json:"IsUsed".

{
  "Port": [
    {
      "PortName": "<Port name>",
      "InternalPort": <internal port>,
      "Type": "<tcp/udp>",
      "ExternalPort": <external port>,
      "IsUsed": "<boolean value (i.e true or false)>", --> New field 
      "Description": "<description about the port>"
    }, ... n
  ]
}

fig 1.0 mentions about the struct docker.Port

In the plugins design structure we have introduced a new file called ports.json. The ports.json file has the number ports the plugins requires. At the current implementation they refer to TCP ports only.

{
  "NumOfPorts": <number of ports>
}