added manual installation documentation

This commit is contained in:
2025-06-06 15:59:37 +01:00
parent 4c7deb948f
commit d4e73e9d34
2 changed files with 258 additions and 203 deletions

View File

@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2025-06-03 Tue 15:09 -->
<!-- 2025-06-06 Fri 15:58 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
@@ -26,12 +26,12 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#org5ae96a4">1. Guide through video</a>
<li><a href="#org83aee26">1. Guide through video</a>
<ul>
<li>
<ul>
<li><a href="#org1c275f4">1.0.1. The video below shows the setup and usage of P2PRC.</a></li>
<li><a href="#org3a4b010">1.0.2. Source code: https://github.com/Akilan1999/p2p-rendering-computation</a></li>
<li><a href="#orgef435f7">1.0.1. The video below shows the setup and usage of P2PRC.</a></li>
<li><a href="#orgfbd90d5">1.0.2. Source code: https://github.com/Akilan1999/p2p-rendering-computation</a></li>
</ul>
</li>
</ul>
@@ -55,106 +55,110 @@
</li>
</ul>
</li>
<li><a href="#org063e081">4. Nix Flake</a>
<li><a href="#orgcd65bd3">4. Nix Flake</a>
<ul>
<li><a href="#org03ddd4a">4.1. P2PRC core Go language repo</a></li>
<li><a href="#org4355679">4.1. P2PRC core Go language repo</a></li>
<li><a href="#orgd344c6a">4.2. P2PRC Haskell library</a>
<ul>
<li><a href="#orgc7021eb">4.2.1. Nix:</a></li>
</ul>
</li>
<li><a href="#orgd325fb1">5. P2PRC Haskell library</a></li>
<li><a href="#using-basic-commands">6. Using basic commands</a>
</ul>
</li>
<li><a href="#using-basic-commands">5. Using basic commands</a>
<ul>
<li>
<ul>
<li><a href="#start-as-a-server">6.0.1. Start as a server</a></li>
<li><a href="#view-server-specification">6.0.2. View server Specification</a></li>
<li><a href="#run-container">6.0.3. Run container</a></li>
<li><a href="#remove-container">6.0.4. Remove container</a></li>
<li><a href="#adding-servers-to-ip-table">6.0.5. Adding servers to ip table</a></li>
<li><a href="#update-ip-table">6.0.6. Update ip table</a></li>
<li><a href="#list-servers">6.0.7. List Servers</a></li>
<li><a href="#view-network-interfaces">6.0.8. View Network interfaces</a></li>
<li><a href="#viewing-containers-created-client-side">6.0.9. Viewing Containers created Client side</a></li>
<li><a href="#running-plugin">6.0.10. Running plugin</a></li>
<li><a href="#create-group">6.0.11. Create group</a></li>
<li><a href="#add-container-to-group">6.0.12. Add container to group</a></li>
<li><a href="#view-groups">6.0.13. View groups</a></li>
<li><a href="#view-specific-group">6.0.14. View specific group</a></li>
<li><a href="#delete-container-from-group">6.0.15. Delete container from group</a></li>
<li><a href="#delete-entire-group">6.0.16. Delete entire group</a></li>
<li><a href="#pulling-plugin-from-a-remote-repo">6.0.17. Pulling plugin from a remote repo</a></li>
<li><a href="#deleting-plugin-from-the-plugin-directory">6.0.18. Deleting plugin from the plugin directory</a></li>
<li><a href="#added-custom-metadata-about-the-current-node">6.0.19. Added custom metadata about the current node</a></li>
<li><a href="#org0ff0e8f">6.0.20. MapPort and link to domain name</a></li>
<li><a href="#orga11da41">6.0.21. Add root node</a></li>
<li><a href="#start-as-a-server">5.0.1. Start as a server</a></li>
<li><a href="#view-server-specification">5.0.2. View server Specification</a></li>
<li><a href="#run-container">5.0.3. Run container</a></li>
<li><a href="#remove-container">5.0.4. Remove container</a></li>
<li><a href="#adding-servers-to-ip-table">5.0.5. Adding servers to ip table</a></li>
<li><a href="#update-ip-table">5.0.6. Update ip table</a></li>
<li><a href="#list-servers">5.0.7. List Servers</a></li>
<li><a href="#view-network-interfaces">5.0.8. View Network interfaces</a></li>
<li><a href="#viewing-containers-created-client-side">5.0.9. Viewing Containers created Client side</a></li>
<li><a href="#running-plugin">5.0.10. Running plugin</a></li>
<li><a href="#create-group">5.0.11. Create group</a></li>
<li><a href="#add-container-to-group">5.0.12. Add container to group</a></li>
<li><a href="#view-groups">5.0.13. View groups</a></li>
<li><a href="#view-specific-group">5.0.14. View specific group</a></li>
<li><a href="#delete-container-from-group">5.0.15. Delete container from group</a></li>
<li><a href="#delete-entire-group">5.0.16. Delete entire group</a></li>
<li><a href="#pulling-plugin-from-a-remote-repo">5.0.17. Pulling plugin from a remote repo</a></li>
<li><a href="#deleting-plugin-from-the-plugin-directory">5.0.18. Deleting plugin from the plugin directory</a></li>
<li><a href="#added-custom-metadata-about-the-current-node">5.0.19. Added custom metadata about the current node</a></li>
<li><a href="#orgb48671e">5.0.20. MapPort and link to domain name</a></li>
<li><a href="#orgaff0c4a">5.0.21. Add root node</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#p2p-module-implementation">7. P2P Module Implementation</a>
<li><a href="#p2p-module-implementation">6. P2P Module Implementation</a>
<ul>
<li><a href="#ip-table">7.1. IP Table</a>
<li><a href="#ip-table">6.1. IP Table</a>
<ul>
<li><a href="#latency">7.1.1. Latency</a></li>
<li><a href="#latency">6.1.1. Latency</a></li>
</ul>
</li>
<li><a href="#nat-traversal">7.2. NAT Traversal</a></li>
<li><a href="#turn">7.3. TURN</a>
<li><a href="#nat-traversal">6.2. NAT Traversal</a></li>
<li><a href="#turn">6.3. TURN</a>
<ul>
<li><a href="#client-mode">7.3.1. Client mode</a></li>
<li><a href="#client-mode">6.3.1. Client mode</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#language-bindings">8. Language Bindings</a>
<li><a href="#language-bindings">7. Language Bindings</a>
<ul>
<li><a href="#how-to-build-shared-object-files">8.1. How to build shared object files</a></li>
<li><a href="#workings-under-the-hood">8.2. Workings under the hood</a>
<li><a href="#how-to-build-shared-object-files">7.1. How to build shared object files</a></li>
<li><a href="#workings-under-the-hood">7.2. Workings under the hood</a>
<ul>
<li><a href="#in-client-go">8.2.1. In Client go</a></li>
<li><a href="#in-client-go">7.2.1. In Client go</a></li>
</ul>
</li>
<li><a href="#current-languages-supported">8.3. Current languages supported</a>
<li><a href="#current-languages-supported">7.3. Current languages supported</a>
<ul>
<li><a href="#org09de7a6">8.3.1. Python</a></li>
<li><a href="#orgf570b5b">8.3.2. Haskell</a></li>
<li><a href="#org0510a4d">7.3.1. Python</a></li>
<li><a href="#org302f45e">7.3.2. Haskell</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#config-implementation">9. Config Implementation</a></li>
<li><a href="#abstractions">10. Abstractions</a>
<li><a href="#config-implementation">8. Config Implementation</a></li>
<li><a href="#abstractions">9. Abstractions</a>
<ul>
<li><a href="#functions">10.1. Functions</a></li>
<li><a href="#functions">9.1. Functions</a></li>
</ul>
</li>
<li><a href="#nat-traversal">11. NAT Traversal</a>
<li><a href="#nat-traversal">10. NAT Traversal</a>
<ul>
<li><a href="#turn">11.1. TURN</a></li>
<li><a href="#turn">10.1. TURN</a></li>
</ul>
</li>
<li><a href="#client-mode">12. Client mode</a></li>
<li><a href="#org058be47">13. Simulation</a>
<li><a href="#client-mode">11. Client mode</a></li>
<li><a href="#orgb4e4128">12. Simulation</a>
<ul>
<li><a href="#orgfc74e36">13.1. Command</a></li>
<li><a href="#org5bffbee">13.2. Sample bash instructions</a></li>
<li><a href="#orgb46a347">12.1. Command</a></li>
<li><a href="#org957ced1">12.2. Sample bash instructions</a></li>
</ul>
</li>
<li><a href="#org414b118">14. Blog posts</a>
<li><a href="#orge9884f6">13. Blog posts</a>
<ul>
<li><a href="#org0d6eba8">14.1. Self host within 5 minutes any program</a>
<li><a href="#org5949e70">13.1. Self host within 5 minutes any program</a>
<ul>
<li><a href="#org0647a0a">14.1.1. 1. Find a program you want to run</a></li>
<li><a href="#orgb09fce9">13.1.1. 1. Find a program you want to run</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org96c3f4c">15. Ideas for future potencial features</a>
<li><a href="#org43ad7b6">14. Ideas for future potencial features</a>
<ul>
<li><a href="#org42e9db0">15.1. To support hetrogenous set of Nodes that cannot run P2PRC</a>
<li><a href="#org2c16a64">14.1. To support hetrogenous set of Nodes that cannot run P2PRC</a>
<ul>
<li><a href="#org898fc5e">15.1.1. Assumptions:</a></li>
<li><a href="#org89661a1">15.1.2. Set of interesting possible:</a></li>
<li><a href="#orga50bb5c">15.1.3. Implementation</a></li>
<li><a href="#orga08c755">14.1.1. Assumptions:</a></li>
<li><a href="#orgd4d4360">14.1.2. Set of interesting possible:</a></li>
<li><a href="#org025089f">14.1.3. Implementation</a></li>
</ul>
</li>
</ul>
@@ -163,26 +167,26 @@
</div>
</div>
<div id="org37d0501" class="figure">
<div id="orge607c98" class="figure">
<p><img src="./Colored-On-Light-Image.png" alt="Colored-On-Light-Image.png" width="300px" />
</p>
</div>
<div id="outline-container-org5ae96a4" class="outline-2">
<h2 id="org5ae96a4"><span class="section-number-2">1.</span> Guide through video</h2>
<div id="outline-container-org83aee26" class="outline-2">
<h2 id="org83aee26"><span class="section-number-2">1.</span> Guide through video</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-org1c275f4" class="outline-4">
<h4 id="org1c275f4"><span class="section-number-4">1.0.1.</span> The video below shows the setup and usage of P2PRC.</h4>
<div id="outline-container-orgef435f7" class="outline-4">
<h4 id="orgef435f7"><span class="section-number-4">1.0.1.</span> The video below shows the setup and usage of P2PRC.</h4>
<div class="outline-text-4" id="text-1-0-1">
<div id="org588d31d" class="figure">
<div id="org51a8870" class="figure">
<p><a href="https://www.youtube.com/watch?v=OMwCpedu5cs" class="video"><img src="https://i3.ytimg.com/vi/OMwCpedu5cs/maxresdefault.jpg" alt="maxresdefault.jpg" class="video" /></a>
</p>
</div>
</div>
</div>
<div id="outline-container-org3a4b010" class="outline-4">
<h4 id="org3a4b010"><span class="section-number-4">1.0.2.</span> Source code: <a href="https://github.com/Akilan1999/p2p-rendering-computation">https://github.com/Akilan1999/p2p-rendering-computation</a></h4>
<div id="outline-container-orgfbd90d5" class="outline-4">
<h4 id="orgfbd90d5"><span class="section-number-4">1.0.2.</span> Source code: <a href="https://github.com/Akilan1999/p2p-rendering-computation">https://github.com/Akilan1999/p2p-rendering-computation</a></h4>
</div>
</div>
<div id="outline-container-chapter1-introduction" class="outline-2">
@@ -271,7 +275,7 @@ Go API to create and interact with the containers.
to install docker GPU</a>
</p>
<pre class="example" id="org3c0f852">
<pre class="example" id="org1a00cfe">
// Do ensure that the docker command does not need sudo to run
sudo chmod 666 /var/run/docker.sock
</pre>
@@ -285,7 +289,7 @@ To set up the internal dependencies and build the entire go code into a
single binary
</p>
<pre class="example" id="orgc6ee67f">
<pre class="example" id="org02370c4">
make
</pre>
</div>
@@ -297,7 +301,7 @@ To set up P2PRC on Windows, simply run this batch file. <b>Make sure you
are not in admin mode when running this.</b>
</p>
<pre class="example" id="org8b9c01a">
<pre class="example" id="org8fe5ac0">
.\install.bat
</pre>
</div>
@@ -307,7 +311,7 @@ are not in admin mode when running this.</b>
<div id="outline-container-add-appropriate-paths-to-.bashrc" class="outline-4">
<h4 id="add-appropriate-paths-to-.bashrc"><span class="section-number-4">3.2.4.</span> Add appropriate paths to <code>.bashrc</code></h4>
<div class="outline-text-4" id="text-add-appropriate-paths-to-.bashrc">
<pre class="example" id="orge603434">
<pre class="example" id="org989d1c4">
export P2PRC=/&lt;PATH&gt;/p2p-rendering-computation
export PATH=/&lt;PATH&gt;/p2p-rendering-computation:${PATH}
</pre>
@@ -316,14 +320,14 @@ export PATH=/&lt;PATH&gt;/p2p-rendering-computation:${PATH}
<div id="outline-container-test-if-binary-works" class="outline-4">
<h4 id="test-if-binary-works"><span class="section-number-4">3.2.5.</span> Test if binary works</h4>
<div class="outline-text-4" id="text-test-if-binary-works">
<pre class="example" id="org5ea2f6c">
<pre class="example" id="orgc2f407e">
p2prc --help
</pre>
</div>
<ol class="org-ol">
<li><a id="output"></a>Output:<br />
<div class="outline-text-5" id="text-output">
<pre class="example" id="orgf0c13a3">
<pre class="example" id="org03705a4">
NAME:
p2p-rendering-computation - p2p cli application to create and access VMs in other servers
@@ -378,8 +382,8 @@ GLOBAL OPTIONS:
</div>
</div>
</div>
<div id="outline-container-org063e081" class="outline-2">
<h2 id="org063e081"><span class="section-number-2">4.</span> Nix Flake</h2>
<div id="outline-container-orgcd65bd3" class="outline-2">
<h2 id="orgcd65bd3"><span class="section-number-2">4.</span> Nix Flake</h2>
<div class="outline-text-2" id="text-4">
<p>
Nix is a growing ecosystem that allows flexibility on how you develop, build and package software and configurations. It brings all programming languages (and all other tooling) to an equal footing, despite deep design differences. More importantly, integrates all the "packaging" into the context of a "pure" function.
@@ -395,8 +399,8 @@ P2PRC aims to become a utility that can be used in various flexible manners and
Nix Flake is a format, within the Nix ecosystem, intentionally designed to encourage a standard in packaging distribution. The current packaging assumes that you have "nix flake" installed because it is currently an experimental feature of Nix.
</p>
</div>
<div id="outline-container-org03ddd4a" class="outline-3">
<h3 id="org03ddd4a"><span class="section-number-3">4.1.</span> P2PRC core Go language repo</h3>
<div id="outline-container-org4355679" class="outline-3">
<h3 id="org4355679"><span class="section-number-3">4.1.</span> P2PRC core Go language repo</h3>
<div class="outline-text-3" id="text-4-1">
<p>
In case you want to develop, build or integrate using nix, you just need to run either "nix develop" or "nix run" from the command line locally in a cloned git repository or by running "nix run github:akilan1999/p2p-rendering-computation &#x2013; &#x2013;help"
@@ -407,7 +411,7 @@ In case you want to develop, build or integrate using nix, you just need to run
P2PRC library also is ready to be imported into other nix flakes. To accomplish that please make sure to override the target nixpkgs environment in the following manner;
</p>
<pre class="example" id="orgfac03eb">
<pre class="example" id="org8e70a5b">
pkgs = import nixpkgs {
inherit system;
overlays = [
@@ -422,15 +426,18 @@ This will make the p2prc executable available in the environment of any applicat
</p>
</div>
</div>
<div id="outline-container-orgd344c6a" class="outline-3">
<h3 id="orgd344c6a"><span class="section-number-3">4.2.</span> P2PRC Haskell library</h3>
<div class="outline-text-3" id="text-4-2">
</div>
<div id="outline-container-orgd325fb1" class="outline-2">
<h2 id="orgd325fb1"><span class="section-number-2">5.</span> P2PRC Haskell library</h2>
<div class="outline-text-2" id="text-5">
<div id="outline-container-orgc7021eb" class="outline-4">
<h4 id="orgc7021eb"><span class="section-number-4">4.2.1.</span> Nix:</h4>
<div class="outline-text-4" id="text-4-2-1">
<p>
The project is structured to provide language bindings to any programming language. The first one being supported in this manner is the Haskell programming language. It provides a bootstrapping script for a new Cabal project with p2prc binary available in the environment and, more relevantly, the Haskell library bindings available in the virtual environment cabal environment.
</p>
<pre class="example" id="org58f2144">
<pre class="example" id="org46c0a04">
nix run git+https://github.com/akilan1999/p2p-rendering-computation#initHaskellProject -- &lt;PROJECT_NAME&gt;
</pre>
@@ -444,7 +451,7 @@ This will generate a new haskell project setup to automatically work with the p2
Once completed, you should go into the project directory and copy the nix flake template, necessary to define the project's environment.
</p>
<pre class="example" id="org54b3a10">
<pre class="example" id="org49aaae5">
nix flake init -t github:akilan1999/p2p-rendering-computation#haskell
</pre>
@@ -452,7 +459,7 @@ nix flake init -t github:akilan1999/p2p-rendering-computation#haskell
The previous command sets up the flake environment and its dependencies. It will look like the following
</p>
<pre class="example" id="org5dd0d18">
<pre class="example" id="orgdac8bac">
{
description = "Start of Haskell P2PRC flake";
@@ -508,187 +515,189 @@ The template uses Cabal2Nix which manages the Haskell virtual environment automa
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-using-basic-commands" class="outline-2">
<h2 id="using-basic-commands"><span class="section-number-2">6.</span> Using basic commands</h2>
<h2 id="using-basic-commands"><span class="section-number-2">5.</span> Using basic commands</h2>
<div class="outline-text-2" id="text-using-basic-commands">
</div>
<div id="outline-container-start-as-a-server" class="outline-4">
<h4 id="start-as-a-server"><span class="section-number-4">6.0.1.</span> Start as a server</h4>
<h4 id="start-as-a-server"><span class="section-number-4">5.0.1.</span> Start as a server</h4>
<div class="outline-text-4" id="text-start-as-a-server">
<pre class="example" id="orgea2a2c0">
<pre class="example" id="orgbbe725f">
p2prc -s
</pre>
</div>
</div>
<div id="outline-container-view-server-specification" class="outline-4">
<h4 id="view-server-specification"><span class="section-number-4">6.0.2.</span> View server Specification</h4>
<h4 id="view-server-specification"><span class="section-number-4">5.0.2.</span> View server Specification</h4>
<div class="outline-text-4" id="text-view-server-specification">
<pre class="example" id="orgdd54cc4">
<pre class="example" id="org5951225">
p2prc --specs=&lt;ip address&gt;
</pre>
</div>
</div>
<div id="outline-container-run-container" class="outline-4">
<h4 id="run-container"><span class="section-number-4">6.0.3.</span> Run container</h4>
<h4 id="run-container"><span class="section-number-4">5.0.3.</span> Run container</h4>
<div class="outline-text-4" id="text-run-container">
<p>
use the <code>--gpu</code> if you know the other machine has a gpu.
</p>
<pre class="example" id="org6778bb9">
<pre class="example" id="org7434b63">
p2prc --touch=&lt;server ip address&gt; -p &lt;number of ports&gt; --gpu
</pre>
</div>
</div>
<div id="outline-container-remove-container" class="outline-4">
<h4 id="remove-container"><span class="section-number-4">6.0.4.</span> Remove container</h4>
<h4 id="remove-container"><span class="section-number-4">5.0.4.</span> Remove container</h4>
<div class="outline-text-4" id="text-remove-container">
<p>
The docker id is present in the output where you create a container
</p>
<pre class="example" id="orga5dcb92">
<pre class="example" id="orgc5e6e6f">
p2prc --rm=&lt;server ip address&gt; --id=&lt;docker container id&gt;
</pre>
</div>
</div>
<div id="outline-container-adding-servers-to-ip-table" class="outline-4">
<h4 id="adding-servers-to-ip-table"><span class="section-number-4">6.0.5.</span> Adding servers to ip table</h4>
<h4 id="adding-servers-to-ip-table"><span class="section-number-4">5.0.5.</span> Adding servers to ip table</h4>
<div class="outline-text-4" id="text-adding-servers-to-ip-table">
<pre class="example" id="org4458381">
<pre class="example" id="org5c2f2ce">
p2prc --as=&lt;server ip address you want to add&gt;
</pre>
</div>
</div>
<div id="outline-container-update-ip-table" class="outline-4">
<h4 id="update-ip-table"><span class="section-number-4">6.0.6.</span> Update ip table</h4>
<h4 id="update-ip-table"><span class="section-number-4">5.0.6.</span> Update ip table</h4>
<div class="outline-text-4" id="text-update-ip-table">
<pre class="example" id="orgbf24151">
<pre class="example" id="org6fa88dc">
p2prc --us
</pre>
</div>
</div>
<div id="outline-container-list-servers" class="outline-4">
<h4 id="list-servers"><span class="section-number-4">6.0.7.</span> List Servers</h4>
<h4 id="list-servers"><span class="section-number-4">5.0.7.</span> List Servers</h4>
<div class="outline-text-4" id="text-list-servers">
<pre class="example" id="orgd2bfac6">
<pre class="example" id="org426b4dc">
p2prc --ls
</pre>
</div>
</div>
<div id="outline-container-view-network-interfaces" class="outline-4">
<h4 id="view-network-interfaces"><span class="section-number-4">6.0.8.</span> View Network interfaces</h4>
<h4 id="view-network-interfaces"><span class="section-number-4">5.0.8.</span> View Network interfaces</h4>
<div class="outline-text-4" id="text-view-network-interfaces">
<pre class="example" id="org3a2ac75">
<pre class="example" id="orgb0df739">
p2prc --ni
</pre>
</div>
</div>
<div id="outline-container-viewing-containers-created-client-side" class="outline-4">
<h4 id="viewing-containers-created-client-side"><span class="section-number-4">6.0.9.</span> Viewing Containers created Client side</h4>
<h4 id="viewing-containers-created-client-side"><span class="section-number-4">5.0.9.</span> Viewing Containers created Client side</h4>
<div class="outline-text-4" id="text-viewing-containers-created-client-side">
<pre class="example" id="org8bf83cd">
<pre class="example" id="org44f09d9">
p2prc --tc
</pre>
</div>
</div>
<div id="outline-container-running-plugin" class="outline-4">
<h4 id="running-plugin"><span class="section-number-4">6.0.10.</span> Running plugin</h4>
<h4 id="running-plugin"><span class="section-number-4">5.0.10.</span> Running plugin</h4>
<div class="outline-text-4" id="text-running-plugin">
<pre class="example" id="orgc821389">
<pre class="example" id="org3a2e5bc">
p2prc --plugin &lt;plugin name&gt; --id &lt;container id or group id&gt;
</pre>
</div>
</div>
<div id="outline-container-create-group" class="outline-4">
<h4 id="create-group"><span class="section-number-4">6.0.11.</span> Create group</h4>
<h4 id="create-group"><span class="section-number-4">5.0.11.</span> Create group</h4>
<div class="outline-text-4" id="text-create-group">
<pre class="example" id="org09e953c">
<pre class="example" id="orgc07fe44">
p2prc --cgroup
</pre>
</div>
</div>
<div id="outline-container-add-container-to-group" class="outline-4">
<h4 id="add-container-to-group"><span class="section-number-4">6.0.12.</span> Add container to group</h4>
<h4 id="add-container-to-group"><span class="section-number-4">5.0.12.</span> Add container to group</h4>
<div class="outline-text-4" id="text-add-container-to-group">
<pre class="example" id="org363e83d">
<pre class="example" id="org52f6654">
p2prc --group &lt;group id&gt; --id &lt;container id&gt;
</pre>
</div>
</div>
<div id="outline-container-view-groups" class="outline-4">
<h4 id="view-groups"><span class="section-number-4">6.0.13.</span> View groups</h4>
<h4 id="view-groups"><span class="section-number-4">5.0.13.</span> View groups</h4>
<div class="outline-text-4" id="text-view-groups">
<pre class="example" id="org7b713d2">
<pre class="example" id="org436efb1">
p2prc --groups
</pre>
</div>
</div>
<div id="outline-container-view-specific-group" class="outline-4">
<h4 id="view-specific-group"><span class="section-number-4">6.0.14.</span> View specific group</h4>
<h4 id="view-specific-group"><span class="section-number-4">5.0.14.</span> View specific group</h4>
<div class="outline-text-4" id="text-view-specific-group">
<pre class="example" id="org23052fc">
<pre class="example" id="orge1325bb">
p2prc --group &lt;group id&gt;
</pre>
</div>
</div>
<div id="outline-container-delete-container-from-group" class="outline-4">
<h4 id="delete-container-from-group"><span class="section-number-4">6.0.15.</span> Delete container from group</h4>
<h4 id="delete-container-from-group"><span class="section-number-4">5.0.15.</span> Delete container from group</h4>
<div class="outline-text-4" id="text-delete-container-from-group">
<pre class="example" id="org2e8ad3c">
<pre class="example" id="org1a51f77">
p2prc --rmcgroup --group &lt;group id&gt; --id &lt;container id&gt;
</pre>
</div>
</div>
<div id="outline-container-delete-entire-group" class="outline-4">
<h4 id="delete-entire-group"><span class="section-number-4">6.0.16.</span> Delete entire group</h4>
<h4 id="delete-entire-group"><span class="section-number-4">5.0.16.</span> Delete entire group</h4>
<div class="outline-text-4" id="text-delete-entire-group">
<pre class="example" id="orgdddbfcc">
<pre class="example" id="orgc1b8579">
p2prc --rmgroup &lt;group id&gt;
</pre>
</div>
</div>
<div id="outline-container-pulling-plugin-from-a-remote-repo" class="outline-4">
<h4 id="pulling-plugin-from-a-remote-repo"><span class="section-number-4">6.0.17.</span> Pulling plugin from a remote repo</h4>
<h4 id="pulling-plugin-from-a-remote-repo"><span class="section-number-4">5.0.17.</span> Pulling plugin from a remote repo</h4>
<div class="outline-text-4" id="text-pulling-plugin-from-a-remote-repo">
<pre class="example" id="org5705dde">
<pre class="example" id="org351b013">
p2prc --pp &lt;repo link&gt;
</pre>
</div>
</div>
<div id="outline-container-deleting-plugin-from-the-plugin-directory" class="outline-4">
<h4 id="deleting-plugin-from-the-plugin-directory"><span class="section-number-4">6.0.18.</span> Deleting plugin from the plugin directory</h4>
<h4 id="deleting-plugin-from-the-plugin-directory"><span class="section-number-4">5.0.18.</span> Deleting plugin from the plugin directory</h4>
<div class="outline-text-4" id="text-deleting-plugin-from-the-plugin-directory">
<pre class="example" id="org181fddf">
<pre class="example" id="org4278226">
p2prc --rp &lt;plugin name&gt;
</pre>
</div>
</div>
<div id="outline-container-added-custom-metadata-about-the-current-node" class="outline-4">
<h4 id="added-custom-metadata-about-the-current-node"><span class="section-number-4">6.0.19.</span> Added custom metadata about the current node</h4>
<h4 id="added-custom-metadata-about-the-current-node"><span class="section-number-4">5.0.19.</span> Added custom metadata about the current node</h4>
<div class="outline-text-4" id="text-added-custom-metadata-about-the-current-node">
<pre class="example" id="orge239bfb">
<pre class="example" id="orgb0498fd">
p2prc --amd "custom metadata"
</pre>
</div>
</div>
<div id="outline-container-org0ff0e8f" class="outline-4">
<h4 id="org0ff0e8f"><span class="section-number-4">6.0.20.</span> MapPort and link to domain name</h4>
<div class="outline-text-4" id="text-6-0-20">
<div id="outline-container-orgb48671e" class="outline-4">
<h4 id="orgb48671e"><span class="section-number-4">5.0.20.</span> MapPort and link to domain name</h4>
<div class="outline-text-4" id="text-5-0-20">
<p>
Allows to expose remote ports from a machine in the P2P network.
</p>
<pre class="example" id="orgcd9acdd">
<pre class="example" id="org1c67316">
p2prc --mp &lt;port no to map&gt; --dn &lt;domain name to link Mapped port against&gt;
</pre>
</div>
<ol class="org-ol">
<li><a id="org0c88141"></a>MapPort in remote machine<br />
<div class="outline-text-5" id="text-6-0-20-1">
<li><a id="org0a9679b"></a>MapPort in remote machine<br />
<div class="outline-text-5" id="text-5-0-20-1">
<p>
This is to ensure ports on remote machines on the P2PRC can be easily opened.
</p>
<pre class="example" id="orgbac2a54">
<pre class="example" id="orgd0762a8">
p2prc --mp &lt;port no to map&gt; --dn &lt;domain name to link Mapped port against&gt; --ra &lt;remote server address&gt;
</pre>
@@ -697,22 +706,22 @@ p2prc --mp &lt;port no to map&gt; --dn &lt;domain name to link Mapped port again
</li>
</ol>
</div>
<div id="outline-container-orga11da41" class="outline-4">
<h4 id="orga11da41"><span class="section-number-4">6.0.21.</span> Add root node</h4>
<div class="outline-text-4" id="text-6-0-21">
<div id="outline-container-orgaff0c4a" class="outline-4">
<h4 id="orgaff0c4a"><span class="section-number-4">5.0.21.</span> Add root node</h4>
<div class="outline-text-4" id="text-5-0-21">
<p>
Adds a root node to P2RRC and overwrites all other nodes in the ip table.
To be only added before the network is started and with
the intention of a fresh instance.
</p>
<pre class="example" id="orga37e461">
<pre class="example" id="org793c639">
p2prc --arn --ip &lt;root node ip address&gt; -p &lt;root node port no&gt;
</pre>
</div>
</div>
</div>
<div id="outline-container-p2p-module-implementation" class="outline-2">
<h2 id="p2p-module-implementation"><span class="section-number-2">7.</span> P2P Module Implementation</h2>
<h2 id="p2p-module-implementation"><span class="section-number-2">6.</span> P2P Module Implementation</h2>
<div class="outline-text-2" id="text-p2p-module-implementation">
<p>
The P2P module is for managing server information within the network.
@@ -739,7 +748,7 @@ implementations of each functionality in depth.
</p>
</div>
<div id="outline-container-ip-table" class="outline-3">
<h3 id="ip-table"><span class="section-number-3">7.1.</span> IP Table</h3>
<h3 id="ip-table"><span class="section-number-3">6.1.</span> IP Table</h3>
<div class="outline-text-3" id="text-ip-table">
<p>
The ip table file is a json as the format with a list of servers ip
@@ -778,7 +787,7 @@ configuration module.
</div>
</div>
<div id="outline-container-latency" class="outline-4">
<h4 id="latency"><span class="section-number-4">7.1.1.</span> Latency</h4>
<h4 id="latency"><span class="section-number-4">6.1.1.</span> Latency</h4>
<div class="outline-text-4" id="text-latency">
<p>
The latency is measured in milliseconds. The route /server<sub>info</sub> is
@@ -789,7 +798,7 @@ recorded.
</div>
</div>
<div id="outline-container-nat-traversal" class="outline-3">
<h3 id="nat-traversal"><span class="section-number-3">7.2.</span> NAT Traversal</h3>
<h3 id="nat-traversal"><span class="section-number-3">6.2.</span> NAT Traversal</h3>
<div class="outline-text-3" id="text-nat-traversal">
<p>
P2PRC currently supports TURN for NAT traversal.
@@ -797,7 +806,7 @@ P2PRC currently supports TURN for NAT traversal.
</div>
</div>
<div id="outline-container-turn" class="outline-3">
<h3 id="turn"><span class="section-number-3">7.3.</span> TURN</h3>
<h3 id="turn"><span class="section-number-3">6.3.</span> TURN</h3>
<div class="outline-text-3" id="text-turn">
<p>
The current TURN implementation used is FRP. The TURN server is also
@@ -810,13 +819,13 @@ from the TURN server. The flow below describes the workflow.
</p>
</div>
<div id="outline-container-client-mode" class="outline-4">
<h4 id="client-mode"><span class="section-number-4">7.3.1.</span> Client mode</h4>
<h4 id="client-mode"><span class="section-number-4">6.3.1.</span> Client mode</h4>
<div class="outline-text-4" id="text-client-mode">
<ul class="org-ul">
<li>Call <code>/FRPPort</code></li>
</ul>
<pre class="example" id="org1bde940">
<pre class="example" id="org2b7feb5">
http://&lt;turn server ip&gt;:&lt;server port no&gt;/FRPport
</pre>
@@ -850,7 +859,7 @@ func main() {
</div>
</div>
<div id="outline-container-language-bindings" class="outline-2">
<h2 id="language-bindings"><span class="section-number-2">8.</span> Language Bindings</h2>
<h2 id="language-bindings"><span class="section-number-2">7.</span> Language Bindings</h2>
<div class="outline-text-2" id="text-language-bindings">
<p>
<a href="https://en.wikipedia.org/wiki/Language_binding">Language bindings</a>
@@ -861,7 +870,7 @@ compiler.
</p>
</div>
<div id="outline-container-how-to-build-shared-object-files" class="outline-3">
<h3 id="how-to-build-shared-object-files"><span class="section-number-3">8.1.</span> How to build shared object files</h3>
<h3 id="how-to-build-shared-object-files"><span class="section-number-3">7.1.</span> How to build shared object files</h3>
<div class="outline-text-3" id="text-how-to-build-shared-object-files">
</div>
<ol class="org-ol">
@@ -899,13 +908,13 @@ p2prc.h p2prc.so
</ol>
</div>
<div id="outline-container-workings-under-the-hood" class="outline-3">
<h3 id="workings-under-the-hood"><span class="section-number-3">8.2.</span> Workings under the hood</h3>
<h3 id="workings-under-the-hood"><span class="section-number-3">7.2.</span> Workings under the hood</h3>
<div class="outline-text-3" id="text-workings-under-the-hood">
<p>
Below are a sample set of commands to open the bindings implementation.
</p>
<pre class="example" id="org3166fb0">
<pre class="example" id="org6e4f702">
# run
cd Bindings/
# list files
@@ -915,7 +924,7 @@ Client.go
</pre>
</div>
<div id="outline-container-in-client-go" class="outline-4">
<h4 id="in-client-go"><span class="section-number-4">8.2.1.</span> In Client go</h4>
<h4 id="in-client-go"><span class="section-number-4">7.2.1.</span> In Client go</h4>
<div class="outline-text-4" id="text-in-client-go">
<p>
There a few things to notice which are different from your standard Go
@@ -993,7 +1002,7 @@ that convert a go object to JSON string initially and converts it to
</li>
<li><a id="a-pseudo-code-to-refer-to-the-common-function-implementation-shape-could-be-represented-as"></a>A Pseudo code to refer to the common function implementation shape could be represented as:<br />
<div class="outline-text-5" id="text-a-pseudo-code-to-refer-to-the-common-function-implementation-shape-could-be-represented-as">
<pre class="example" id="org4a2f044">
<pre class="example" id="orga62c5f5">
func &lt;Function name&gt; (output *C.char) {
&lt;response&gt;,&lt;error&gt; := &lt;P2PRC function name&gt;(&lt;parameters if needed&gt;)
if &lt;error&gt; != nil {
@@ -1008,12 +1017,12 @@ func &lt;Function name&gt; (output *C.char) {
</div>
</div>
<div id="outline-container-current-languages-supported" class="outline-3">
<h3 id="current-languages-supported"><span class="section-number-3">8.3.</span> Current languages supported</h3>
<h3 id="current-languages-supported"><span class="section-number-3">7.3.</span> Current languages supported</h3>
<div class="outline-text-3" id="text-current-languages-supported">
</div>
<div id="outline-container-org09de7a6" class="outline-4">
<h4 id="org09de7a6"><span class="section-number-4">8.3.1.</span> Python</h4>
<div class="outline-text-4" id="text-8-3-1">
<div id="outline-container-org0510a4d" class="outline-4">
<h4 id="org0510a4d"><span class="section-number-4">7.3.1.</span> Python</h4>
<div class="outline-text-4" id="text-7-3-1">
</div>
<ol class="org-ol">
<li><a id="build-sample-python-program"></a>Build sample python program<br />
@@ -1049,23 +1058,52 @@ called from other programming languages.
</li>
</ol>
</div>
<div id="outline-container-orgf570b5b" class="outline-4">
<h4 id="orgf570b5b"><span class="section-number-4">8.3.2.</span> Haskell</h4>
<div class="outline-text-4" id="text-8-3-2">
<div id="outline-container-org302f45e" class="outline-4">
<h4 id="org302f45e"><span class="section-number-4">7.3.2.</span> Haskell</h4>
<div class="outline-text-4" id="text-7-3-2">
<p>
P2PRC officially supports Haskell bindings and will further support
project using Haskell to build orchestrators on top of P2PRC.
</p>
</div>
<ol class="org-ol">
<li><a id="org9fbc13d"></a>Local machine without Nix<br />
<div class="outline-text-5" id="text-7-3-2-1">
<p>
On the local machine we just create a folder as exports which copies the p2prc haskell bindings
and the latest build of the p2prc binary. After the binary is copied it runs the &#x2013;dc in p2prc to setup the
basic p2prc configurations. To do the following just do:
</p>
<pre class="example" id="org92d2a05">
make haskell
</pre>
</div>
</li>
<li><a id="org2493688"></a>Directory to enter into<br />
<div class="outline-text-5" id="text-7-3-2-2">
<pre class="example" id="org9e32621">
cd Bindings/Haskell/exports
</pre>
</div>
</li>
<li><a id="orgfd249c0"></a>Run<br />
<div class="outline-text-5" id="text-7-3-2-3">
<pre class="example" id="org95bed95">
- cabal build
- cabal run
</pre>
<p>
<a href="https://p2prc.akilan.io/Docs/haskell">Read more&#x2026;</a>
<a href="https://p2prc.akilan.io/haskell">Read more&#x2026;</a>
</p>
</div>
</li>
</ol>
</div>
</div>
</div>
<div id="outline-container-config-implementation" class="outline-2">
<h2 id="config-implementation"><span class="section-number-2">9.</span> Config Implementation</h2>
<h2 id="config-implementation"><span class="section-number-2">8.</span> Config Implementation</h2>
<div class="outline-text-2" id="text-config-implementation">
<p>
The configuration module is responsible to store basic information of
@@ -1114,14 +1152,14 @@ configuration file was generated using JSON format.
</div>
</div>
<div id="outline-container-abstractions" class="outline-2">
<h2 id="abstractions"><span class="section-number-2">10.</span> Abstractions</h2>
<h2 id="abstractions"><span class="section-number-2">9.</span> Abstractions</h2>
<div class="outline-text-2" id="text-abstractions">
<p>
The Abstractions package consists of black-boxed functions for P2PRC.
</p>
</div>
<div id="outline-container-functions" class="outline-3">
<h3 id="functions"><span class="section-number-3">10.1.</span> Functions</h3>
<h3 id="functions"><span class="section-number-3">9.1.</span> Functions</h3>
<div class="outline-text-3" id="text-functions">
<ul class="org-ul">
<li><code>Init(&lt;Project name&gt;)</code>: Initializes P2PRC with all the needed
@@ -1144,14 +1182,14 @@ faster.</li>
</div>
</div>
<div id="outline-container-nat-traversal" class="outline-2">
<h2 id="nat-traversal"><span class="section-number-2">11.</span> NAT Traversal</h2>
<h2 id="nat-traversal"><span class="section-number-2">10.</span> NAT Traversal</h2>
<div class="outline-text-2" id="text-nat-traversal">
<p>
P2PRC currently supports TURN for NAT traversal.
</p>
</div>
<div id="outline-container-turn" class="outline-3">
<h3 id="turn"><span class="section-number-3">11.1.</span> TURN</h3>
<h3 id="turn"><span class="section-number-3">10.1.</span> TURN</h3>
<div class="outline-text-3" id="text-turn">
<p>
The current TURN implementation used is FRP. The TURN server is also
@@ -1166,13 +1204,13 @@ from the TURN server. The flow below describes the workflow.
</div>
</div>
<div id="outline-container-client-mode" class="outline-2">
<h2 id="client-mode"><span class="section-number-2">12.</span> Client mode</h2>
<h2 id="client-mode"><span class="section-number-2">11.</span> Client mode</h2>
<div class="outline-text-2" id="text-client-mode">
<ul class="org-ul">
<li>Call <code>/FRPPort</code></li>
</ul>
<pre class="example" id="orgc95f594">
<pre class="example" id="org40983fc">
http://&lt;turn server ip&gt;:&lt;server port no&gt;/FRPport
</pre>
@@ -1203,9 +1241,9 @@ func main() {
</div>
</div>
</div>
<div id="outline-container-org058be47" class="outline-2">
<h2 id="org058be47"><span class="section-number-2">13.</span> Simulation</h2>
<div class="outline-text-2" id="text-13">
<div id="outline-container-orgb4e4128" class="outline-2">
<h2 id="orgb4e4128"><span class="section-number-2">12.</span> Simulation</h2>
<div class="outline-text-2" id="text-12">
<p>
The simulation library is a really simple library to locally
run serveral instances of P2PRC to test the functionality
@@ -1214,9 +1252,9 @@ the Node discovery mechanism. There are current 5 commands
which can be used as shown below:
</p>
</div>
<div id="outline-container-orgfc74e36" class="outline-3">
<h3 id="orgfc74e36"><span class="section-number-3">13.1.</span> Command</h3>
<div class="outline-text-3" id="text-13-1">
<div id="outline-container-orgb46a347" class="outline-3">
<h3 id="orgb46a347"><span class="section-number-3">12.1.</span> Command</h3>
<div class="outline-text-3" id="text-12-1">
<ul class="org-ul">
<li><b><b><b>P2PRC instances "number of instances"</b></b></b> : Starts p2prc processes
based on the number of number instances provided. This includes
@@ -1233,9 +1271,9 @@ testing the generated P2PRC instances.</li>
</ul>
</div>
</div>
<div id="outline-container-org5bffbee" class="outline-3">
<h3 id="org5bffbee"><span class="section-number-3">13.2.</span> Sample bash instructions</h3>
<div class="outline-text-3" id="text-13-2">
<div id="outline-container-org957ced1" class="outline-3">
<h3 id="org957ced1"><span class="section-number-3">12.2.</span> Sample bash instructions</h3>
<div class="outline-text-3" id="text-12-2">
<div class="org-src-container">
<pre class="src src-bash"># Unset default P2PRC env path
unset P2PRC
@@ -1262,13 +1300,13 @@ Source code: <a href="https://github.com/Akilan1999/p2p-rendering-computation/bl
</div>
</div>
</div>
<div id="outline-container-org414b118" class="outline-2">
<h2 id="org414b118"><span class="section-number-2">14.</span> Blog posts</h2>
<div class="outline-text-2" id="text-14">
<div id="outline-container-orge9884f6" class="outline-2">
<h2 id="orge9884f6"><span class="section-number-2">13.</span> Blog posts</h2>
<div class="outline-text-2" id="text-13">
</div>
<div id="outline-container-org0d6eba8" class="outline-3">
<h3 id="org0d6eba8"><span class="section-number-3">14.1.</span> Self host within 5 minutes any program</h3>
<div class="outline-text-3" id="text-14-1">
<div id="outline-container-org5949e70" class="outline-3">
<h3 id="org5949e70"><span class="section-number-3">13.1.</span> Self host within 5 minutes any program</h3>
<div class="outline-text-3" id="text-13-1">
<ul class="org-ul">
<li>Author: <a href="http://akilan.io/">Akilan Selvacoumar</a></li>
<li>Date: 28-01-2025</li>
@@ -1279,7 +1317,7 @@ Source code: <a href="https://github.com/Akilan1999/p2p-rendering-computation/bl
<li>Video tutorial:</li>
</ul>
<div id="org10d4775" class="figure">
<div id="orgf8e00fc" class="figure">
<p><a href="https://youtu.be/rN4SiVowg5E" class="video"><img src="https://i3.ytimg.com/vi/rN4SiVowg5E/maxresdefault.jpg" alt="maxresdefault.jpg" class="video" /></a>
</p>
</div>
@@ -1289,9 +1327,9 @@ This is a fun expirement for anyone to try to quickly run a server and
quickly do a map port and domain name mapping in a single command.
</p>
</div>
<div id="outline-container-org0647a0a" class="outline-4">
<h4 id="org0647a0a"><span class="section-number-4">14.1.1.</span> 1. Find a program you want to run</h4>
<div class="outline-text-4" id="text-14-1-1">
<div id="outline-container-orgb09fce9" class="outline-4">
<h4 id="orgb09fce9"><span class="section-number-4">13.1.1.</span> 1. Find a program you want to run</h4>
<div class="outline-text-4" id="text-13-1-1">
<p>
Let's try to setup a really easy program (Let's do with Linkwarden
with docker compose :) ). This is under the assumption you have docker
@@ -1299,8 +1337,8 @@ compose installed on your local machine.
</p>
</div>
<ol class="org-ol">
<li><a id="orgfe2c658"></a>Let's run Linkwarden using docker compose and P2PRC<br />
<div class="outline-text-5" id="text-14-1-1-1">
<li><a id="orgb4e349e"></a>Let's run Linkwarden using docker compose and P2PRC<br />
<div class="outline-text-5" id="text-13-1-1-1">
<p>
<a href="https://docs.linkwarden.app/self-hosting/installation">Installation instructions</a>:
</p>
@@ -1388,17 +1426,17 @@ ex: <a href="https://linkwarden.akilan.io">https://linkwarden.akilan.io</a>
</div>
</div>
</div>
<div id="outline-container-org96c3f4c" class="outline-2">
<h2 id="org96c3f4c"><span class="section-number-2">15.</span> Ideas for future potencial features</h2>
<div class="outline-text-2" id="text-15">
<div id="outline-container-org43ad7b6" class="outline-2">
<h2 id="org43ad7b6"><span class="section-number-2">14.</span> Ideas for future potencial features</h2>
<div class="outline-text-2" id="text-14">
<p>
Consists of personal loideas for the future of P2PRC.
At moment only has main contributors writiing to this.
</p>
</div>
<div id="outline-container-org42e9db0" class="outline-3">
<h3 id="org42e9db0"><span class="section-number-3">15.1.</span> To support hetrogenous set of Nodes that cannot run P2PRC</h3>
<div class="outline-text-3" id="text-15-1">
<div id="outline-container-org2c16a64" class="outline-3">
<h3 id="org2c16a64"><span class="section-number-3">14.1.</span> To support hetrogenous set of Nodes that cannot run P2PRC</h3>
<div class="outline-text-3" id="text-14-1">
<p>
This stems from a personal issue I have when doing research
on <a href="https://github.com/CTSRD-CHERI/cheribsd">CheriBSD</a> kernel. For my research I am using the ARM morello
@@ -1413,9 +1451,9 @@ and would introduce a new layer fault tolerance within a local
network nodes.
</p>
</div>
<div id="outline-container-org898fc5e" class="outline-4">
<h4 id="org898fc5e"><span class="section-number-4">15.1.1.</span> Assumptions:</h4>
<div class="outline-text-4" id="text-15-1-1">
<div id="outline-container-orga08c755" class="outline-4">
<h4 id="orga08c755"><span class="section-number-4">14.1.1.</span> Assumptions:</h4>
<div class="outline-text-4" id="text-14-1-1">
<ul class="org-ul">
<li>I have a Morello board that cannot run P2PRC</li>
<li>The Morello has a local IP address (ex: 192.168.0.10)</li>
@@ -1427,9 +1465,9 @@ as well look into custom tasks into the hetrogenous hardware.</li>
</ul>
</div>
</div>
<div id="outline-container-org89661a1" class="outline-4">
<h4 id="org89661a1"><span class="section-number-4">15.1.2.</span> Set of interesting possible:</h4>
<div class="outline-text-4" id="text-15-1-2">
<div id="outline-container-orgd4d4360" class="outline-4">
<h4 id="orgd4d4360"><span class="section-number-4">14.1.2.</span> Set of interesting possible:</h4>
<div class="outline-text-4" id="text-14-1-2">
<p>
We build a cool set possibilities before and use this to build up the implementation
plan.
@@ -1445,9 +1483,9 @@ weight hypervisors.</li>
</ul>
</div>
</div>
<div id="outline-container-orga50bb5c" class="outline-4">
<h4 id="orga50bb5c"><span class="section-number-4">15.1.3.</span> Implementation</h4>
<div class="outline-text-4" id="text-15-1-3">
<div id="outline-container-org025089f" class="outline-4">
<h4 id="org025089f"><span class="section-number-4">14.1.3.</span> Implementation</h4>
<div class="outline-text-4" id="text-14-1-3">
<ul class="org-ul">
<li>To use implementations similar to <a href="https://linux.die.net/man/1/socat">socat</a> to ensure we can bind address of local
nodes to a node running P2PRC and the node running P2PRC can do a local map port.</li>
@@ -1460,7 +1498,7 @@ other nodes can access the Morello board who have permission access.</li>
</ul>
<div id="org18379aa" class="figure">
<div id="orge0b77a7" class="figure">
<p><img src="./images/P2PRCRemoteNodes.png" alt="P2PRCRemoteNodes.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Implementation idea (To be improved upon)</p>
@@ -1472,7 +1510,7 @@ other nodes can access the Morello board who have permission access.</li>
</div>
<div id="postamble" class="status">
<p class="author">Author: Akilan</p>
<p class="date">Created: 2025-06-03 Tue 15:09</p>
<p class="date">Created: 2025-06-06 Fri 15:58</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@@ -212,9 +212,9 @@ pkgs = import nixpkgs {
This will make the p2prc executable available in the environment of any application you use.
* P2PRC Haskell library
** P2PRC Haskell library
*** Nix:
The project is structured to provide language bindings to any programming language. The first one being supported in this manner is the Haskell programming language. It provides a bootstrapping script for a new Cabal project with p2prc binary available in the environment and, more relevantly, the Haskell library bindings available in the virtual environment cabal environment.
#+begin_example
@@ -772,7 +772,24 @@ called from other programming languages.
P2PRC officially supports Haskell bindings and will further support
project using Haskell to build orchestrators on top of P2PRC.
[[https://p2prc.akilan.io/Docs/haskell][Read more...]]
**** Local machine without Nix
On the local machine we just create a folder as exports which copies the p2prc haskell bindings
and the latest build of the p2prc binary. After the binary is copied it runs the --dc in p2prc to setup the
basic p2prc configurations. To do the following just do:
#+begin_example
make haskell
#+end_example
**** Directory to enter into
#+begin_example
cd Bindings/Haskell/exports
#+end_example
**** Run
#+begin_example
- cabal build
- cabal run
#+end_example
[[https://p2prc.akilan.io/haskell][Read more...]]
* Config Implementation
:PROPERTIES: