# S.O.V.O.R.A.: A Distributed Wireless Operating System
## 3 S.O.V.O.R.A. Wireless Distributed Systems
### The Orchestrator  
The OR is a process that runs periodically on the fog controller node(s) in the user space at the top of the OS. As a centralized controller, the main tasks are: (i) to collect the status information from each node to build an overview of the distributed system's status, and (ii) to send the commands to compose the workload or user requests to the distributed applications.  
The Ad hoc mode supports communications between the local agents and the applications on the system. It has the following microservices:  
* Server: It is a microservice that create a server multi-thread for the communication between nodes and applications.
* Client: A microservice managed by the local agent that creates a multi-thread client to collect information about the node applications, send messages to deploy applications, and set the throughput and the resources consumption in each node.
* B.A.T.M.A.N. protocol: Proactive network protocol that works on ad hoc mode on IEEE 802.11 standard. The Protocol allows for communication between nodes and orchestrator due to the best route based on transmission quality factor. The communication is a multi hop on the cluster.  
\begin{table}
\begin{tabular}{l l} \hline \hline  & \multicolumn{2}{c}{**Local Agent**} \\ \hline is\_alive()[options-node, ip] & Verify the nodes on line and linked with SOVORA \\ \hline node()[options-node,ip] & show information about the node resources, IP and UUID \\ \hline process()[options-node,ip] & Show the process running on execution time on local node \\ \hline \multicolumn{2}{c}{**Orchestrator**} \\ \hline sstatus [options][ip, port] & Shows the system status \\ \hline nstatus [options][ip, port] & Show the MANET status \\ \hline \multicolumn{2}{c}{**SOVORA**} \\ \hline server [options][ip, port] & Create a multi thread server on specific node \\ \hline global()[options-said] & Shows the node member on the MANET cluster \\ \hline org()[options-said] & Shows the network organization \\ \hline gglobal()[options-nodes] & Create a communication group between local agents \\ \hline disk()[options-app] & Provision disk space \\ \hline cpu()[options-app] & Provision a thread \\ \hline mem()[options-app] & Provision distributed memory \\ \hline io()[options-app] & Provision I/O devices connection \\ \hline pidg()[options-nodes] & Shows the process on all systems nodes \\ \hline dprocess()[options-node,ip] & Create a process on specific node \\ \hline mess()[options] & Create a broadcast message \\ \hline clock()[options] & Set the systems clock \\ \hline \hline \end{tabular}
\end{table}
Table 1: S.O.V.O.R.A. terminal commands.  
* Alfred Service: A microservice used as module to enable the node discovery service, on the network through B.A.T.M.A.N. protocol that allows signaling and to identify the orchestrator on the network.
* Server Apps: It is a microservice that receives the information or results from the applications and sends it to the user or destination node.  
The orchestrator has the policies with the information about the current state of the system, which is the desired state. To reach it, the task distributor microservice program the tasks via the scheduler and the network manager that has the information about the network state and the identification of the nodes.  
The resource manager is a module that has microservices to monitor and make the assignment of computing resources in the network, deploying more services among MANET clusters. Microservices are applications, containers (Docker containers used to deploy distributed applications), networks, and computing resources.