diff --git a/Docs/index.html b/Docs/index.html index 13fccc8..88d1493 100644 --- a/Docs/index.html +++ b/Docs/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +
+// Do ensure that the docker command does not need sudo to run sudo chmod 666 /var/run/docker.sock@@ -285,7 +289,7 @@ To set up the internal dependencies and build the entire go code into a single binary -+make
+.\install.bat
.bashrc
+
export P2PRC=/<PATH>/p2p-rendering-computation
export PATH=/<PATH>/p2p-rendering-computation:${PATH}
@@ -316,14 +320,14 @@ export PATH=/<PATH>/p2p-rendering-computation:${PATH}
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.
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 – –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;
-
+
pkgs = import nixpkgs {
inherit system;
overlays = [
@@ -422,15 +426,18 @@ This will make the p2prc executable available in the environment of any applicat
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.
-+nix run git+https://github.com/akilan1999/p2p-rendering-computation#initHaskellProject -- <PROJECT_NAME>@@ -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. -+nix flake init -t github:akilan1999/p2p-rendering-computation#haskell@@ -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 -+{ description = "Start of Haskell P2PRC flake"; @@ -508,187 +515,189 @@ The template uses Cabal2Nix which manages the Haskell virtual environment automa
+p2prc -s
+p2prc --specs=<ip address>
use the --gpu if you know the other machine has a gpu.
+p2prc --touch=<server ip address> -p <number of ports> --gpu
The docker id is present in the output where you create a container
-+p2prc --rm=<server ip address> --id=<docker container id>
+p2prc --as=<server ip address you want to add>
+p2prc --us
+p2prc --ls
+p2prc --ni
+p2prc --tc
+p2prc --plugin <plugin name> --id <container id or group id>
+p2prc --cgroup
+p2prc --group <group id> --id <container id>
+p2prc --groups
+p2prc --group <group id>
+p2prc --rmcgroup --group <group id> --id <container id>
+p2prc --rmgroup <group id>
+p2prc --pp <repo link>
+p2prc --rp <plugin name>
+p2prc --amd "custom metadata"
Allows to expose remote ports from a machine in the P2P network.
-+p2prc --mp <port no to map> --dn <domain name to link Mapped port against>
This is to ensure ports on remote machines on the P2PRC can be easily opened.
-+p2prc --mp <port no to map> --dn <domain name to link Mapped port against> --ra <remote server address>@@ -697,22 +706,22 @@ p2prc --mp <port no to map> --dn <domain name to link Mapped port again
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.
-+p2prc --arn --ip <root node ip address> -p <root node port no>
The P2P module is for managing server information within the network. @@ -739,7 +748,7 @@ implementations of each functionality in depth.
The ip table file is a json as the format with a list of servers ip @@ -778,7 +787,7 @@ configuration module.
The latency is measured in milliseconds. The route /serverinfo is @@ -789,7 +798,7 @@ recorded.
P2PRC currently supports TURN for NAT traversal. @@ -797,7 +806,7 @@ P2PRC currently supports TURN for NAT traversal.
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.
/FRPPort+http://<turn server ip>:<server port no>/FRPport@@ -850,7 +859,7 @@ func main() {
Language bindings @@ -861,7 +870,7 @@ compiler.
Below are a sample set of commands to open the bindings implementation.
-+# run cd Bindings/ # list files @@ -915,7 +924,7 @@ Client.go
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
+
func <Function name> (output *C.char) {
<response>,<error> := <P2PRC function name>(<parameters if needed>)
if <error> != nil {
@@ -1008,12 +1017,12 @@ func <Function name> (output *C.char) {
P2PRC officially supports Haskell bindings and will further support project using Haskell to build orchestrators on top of P2PRC.
++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: +
++make haskell ++
+cd Bindings/Haskell/exports ++
+- cabal build +- cabal run +
The configuration module is responsible to store basic information of @@ -1114,14 +1152,14 @@ configuration file was generated using JSON format.
The Abstractions package consists of black-boxed functions for P2PRC.
Init(<Project name>): Initializes P2PRC with all the needed
@@ -1144,14 +1182,14 @@ faster.P2PRC currently supports TURN for NAT traversal.
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.
/FRPPort+http://<turn server ip>:<server port no>/FRPport@@ -1203,9 +1241,9 @@ func main() {
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:
# Unset default P2PRC env path unset P2PRC @@ -1262,13 +1300,13 @@ Source code: -14. Blog posts
-++13. Blog posts
+--14.1. Self host within 5 minutes any program
-++13.1. Self host within 5 minutes any program
+-
- Author: Akilan Selvacoumar
- Date: 28-01-2025
@@ -1279,7 +1317,7 @@ Source code: + @@ -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.-14.1.1. 1. Find a program you want to run
-++-13.1.1. 1. Find a program you want to run
+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.
-
- Let's run Linkwarden using docker compose and P2PRC
-+- Let's run Linkwarden using docker compose and P2PRC
+@@ -1388,17 +1426,17 @@ ex: https://linkwarden.akilan.io-15. Ideas for future potencial features
-++14. Ideas for future potencial features
+-Consists of personal loideas for the future of P2PRC. At moment only has main contributors writiing to this.
-15.1. To support hetrogenous set of Nodes that cannot run P2PRC
-++14.1. To support hetrogenous set of Nodes that cannot run P2PRC
+-This stems from a personal issue I have when doing research on CheriBSD 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.
-15.1.1. Assumptions:
-++-14.1.1. Assumptions:
+
- I have a Morello board that cannot run P2PRC
- The Morello has a local IP address (ex: 192.168.0.10)
@@ -1427,9 +1465,9 @@ as well look into custom tasks into the hetrogenous hardware.-15.1.2. Set of interesting possible:
-++-14.1.2. Set of interesting possible:
+We build a cool set possibilities before and use this to build up the implementation plan. @@ -1445,9 +1483,9 @@ weight hypervisors.
-15.1.3. Implementation
-++14.1.3. Implementation
+-
- To use implementations similar to socat 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.
@@ -1460,7 +1498,7 @@ other nodes can access the Morello board who have permission access.+diff --git a/Docs/index.org b/Docs/index.org index ac44b3a..2ed38c3 100644 --- a/Docs/index.org +++ b/Docs/index.org @@ -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:
![]()
Figure 1: Implementation idea (To be improved upon)
@@ -1472,7 +1510,7 @@ other nodes can access the Morello board who have permission access.