created new PDF file

This commit is contained in:
2024-12-10 23:54:47 +00:00
parent 32863c57f8
commit 9d9c484d07
2 changed files with 31 additions and 31 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
% Created 2024-12-10 Tue 23:38
% Created 2024-12-10 Tue 23:54
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
@@ -27,41 +27,41 @@
\tableofcontents
\section{P2PRC tracking home server}
\label{sec:org64aa45e}
\label{sec:org5106d20}
\subsection{Abstract}
\label{sec:org3d87056}
This is a libary on top of P2PRC to create easier abstractions
\label{sec:org119e303}
This is a library on top of P2PRC to create easier abstractions
to setup servers on spare laptops at home and run applications
which can exibit a monolithic behavoir (Ex: Self hosted
jitsi, Indvidious). The motivation is to ensure users can
which can exhibit a monolithic behaviour (Ex: Self hosted
jitsi, Invidious). The motivation is to ensure users can
share self hosted infrastructure with friends and can design
a really simple replicatable instances of servers.
\subsection{Problems being addressed}
\label{sec:org553bb54}
\label{sec:orgb2d89d0}
\begin{enumerate}
\item Remembering ports mapped and stateful restart. Rather than the OS remember
information of the processes. The P2P network should also track it and
propogate it to other nodes in the network. This is to ensure when a process
fails there is a formally representable reason which can appropirate corrective
propagate it to other nodes in the network. This is to ensure when a process
fails there is a formally representable reason which can appropriate corrective
actions.
\item Arbitary instructions used to start a process and should be remembered to reproduce a
\item Arbitrary instructions used to start a process and should be remembered to reproduce a
process if a node is down.
\end{enumerate}
\subsection{What are attempting to do}
\label{sec:org7867a81}
The section below describes in detail the ideal startegy of addressing the problems stated
\label{sec:org0f074f0}
The section below describes in detail the ideal strategy of addressing the problems stated
above.
\subsubsection{Building Abstraction}
\label{sec:org4988e19}
We are proposting to build a library of the Haskell bindings which do the following:
\label{sec:orgaee85d9}
We are proposing to build a library of the Haskell bindings which do the following:
\begin{itemize}
\item Creating a P2PRC process and allowing users to modify it's behavoir in functional manner with for instance
\item Creating a P2PRC process and allowing users to modify it's behaviour in functional manner with for instance
immutable datatypes.
\item Allowing users to run this abstraction in a reproducable manner or constrainting it to run on precise
\item Allowing users to run this abstraction in a reproducible manner or constraining it to run on precise
sets of machines.
\item Should be able to represent the deployment strategy used (ex: Nix, Ansible etc\ldots{}). This keeps the
deployment agnostic and not vendor specific.
@@ -69,24 +69,24 @@ deployment agnostic and not vendor specific.
\end{itemize}
\subsubsection{Building it for only home server users}
\label{sec:orge2d540d}
\label{sec:orgffcf4bf}
\begin{itemize}
\item The use case is to ensure it's easier to setup a set of servers and shuffle P2PRC processes around
when needed. We intend to do this by ensuring a process is represented as type.
\item Targets initially with the assumption that there is only 1 reliable root node to relay traffic to the make the setup
easier. Future plans will create a DNS layer which can make root nodes and P2PRC processes reproducable.
easier. Future plans will create a DNS layer which can make root nodes and P2PRC processes reproducible.
\end{itemize}
\subsubsection{Linient rules}
\label{sec:orge1dc5da}
\subsubsection{Lenient rules}
\label{sec:orgfdab7c9}
\begin{itemize}
\item This library is built for home users, therefore the library will be setup for P2PRC using the \href{https://github.com/Akilan1999/p2p-rendering-computation/pull/115}{unsafe mode} which will ensure that all public
keys will be added to the \href{https://www.ssh.com/academy/ssh/authorized-keys-file\#:\~:text=The\%20authorized\_keys\%20file\%20in\%20SSH,keys\%20and\%20needs\%20proper\%20management}{SSH auth list} of all nodes avaliable in the network. While this is not secure it
keys will be added to the \href{https://www.ssh.com/academy/ssh/authorized-keys-file\#:\~:text=The\%20authorized\_keys\%20file\%20in\%20SSH,keys\%20and\%20needs\%20proper\%20management}{SSH auth list} of all nodes available in the network. While this is not secure it
comes with pre-assumption that all nodes joining the network are home servers and are needed to access each other
with limited rules (set by user permission from the OS side).
\item We assume that all P2PRC processes run on a bare-metal machine without any virtualisation.
This is because most users run on machines which they own and we offload to the users
reponsibility to choose a tool that can support reproducable builds like \href{https://nixos.org/}{Nix}.
responsibility to choose a tool that can support reproducible builds like \href{https://nixos.org/}{Nix}.
\end{itemize}
\begin{center}
@@ -94,12 +94,12 @@ reponsibility to choose a tool that can support reproducable builds like \href{h
\end{center}
\subsection{Plan}
\label{sec:org7e9ebcb}
\label{sec:org75ecafe}
Based on the \href{https://github.com/Akilan1999/p2p-rendering-computation/tree/master/haskell}{Haskell bindings} to build an extended library (There are still changes needed
in the Haskell bindings before the addon can be built).
in the Haskell bindings before the add-on can be built).
\subsubsection{Handle more cases than machine name}
\label{sec:org0007684}
\label{sec:org7ed06ae}
The current haskell library seems to only support 1 type Machine name which is parseable from
the config file. We would need to handle conditions such as handling types such as \href{https://github.com/Akilan1999/p2p-rendering-computation/blob/67165d4bf63d82794a1a264edf843295b727c226/config/config.go\#L39}{Baremetal} and \href{https://github.com/Akilan1999/p2p-rendering-computation/blob/67165d4bf63d82794a1a264edf843295b727c226/config/config.go\#L40}{UnsafeMode}.
On this proposed library they would both be set to true.
@@ -118,7 +118,7 @@ parseJSON _ = mzero
\end{verbatim}
\subsubsection{Representation of a process}
\label{sec:org07241c8}
\label{sec:orgd88a8e7}
To design a data structure that can represent current set of properties:
\begin{enumerate}
\item IP address (string)
@@ -133,7 +133,7 @@ To design a data structure that can represent current set of properties:
\end{enumerate}
\subsubsection{Representation of a node:}
\label{sec:org7837ede}
\label{sec:orga084f25}
Follows the implemented Haskell data structure from the bindings:
\begin{verbatim}
instance FromJSON ServerInfo where
@@ -154,7 +154,7 @@ parseJSON = withObject "ServerInfo" $
\end{verbatim}
\subsubsection{Function expected to be built:}
\label{sec:org27760db}
\label{sec:org4644889}
The following refers to the functions we would be building for our abstraction:
\begin{enumerate}
\item SpinProcess(<P2PRC process type>,<Node Type>)
@@ -164,8 +164,8 @@ The following refers to the functions we would be building for our abstraction:
\end{enumerate}
\subsection{Terms}
\label{sec:org2f4d383}
P2PRC process: A p2prc process refers to potencially an instance (i.e web-server or any task). This process
\label{sec:orgd859ef0}
P2PRC process: A p2prc process refers to potentially an instance (i.e web-server or any task). This process
stores information such as:
\begin{itemize}
\item Memory usage.
@@ -173,5 +173,5 @@ stores information such as:
\end{itemize}
Root node: Refers to a node running P2PRC with a public IPV4 address to relay traffic through for nodes
behind NAT and can potencially even act a proxy for nodes(Used for domain name mapping) in the P2P network.
behind NAT and can potentially even act a proxy for nodes(Used for domain name mapping) in the P2P network.
\end{document}