# Research and Design of a Decentralized Edge-Computing-Assisted LoRa Gateway
## 3 Design of the EC-Assisted LoRa Gateway
### Distributed Task Execution Mode in the LoRa Gateway  
The symbols applied in this paper are shown in Table 1.  
We set the characteristics of \(EN_{k}=\{i_{k},u_{k},a_{k},e_{k}\}\), where \(i_{k}\) denotes the \(i\)th edge node with the execution request. \(u_{k}\) denotes the workload, \(a_{k}\) denotes the size of task-related data, and \(e_{k}\) denotes the deadline of the task. The task \(EN_{k}=\{\delta_{1},\delta_{2}\ldots\ldots\delta_{n}\}\), without any limitations. These subtasks may be undertaken concurrently on several edge nodes without a specific order. In Table 1, the significant equation variables are shown. The required resources are provided in (\(e_{k}\)) time to complete the task faster than its objective, in order to process an edge node network subtask and ensure a fair procedure. For the sake of this paper, we will consider each task's required CPU time as a resource. For one subtask of the task \(EN_{k}\), \(Ci\) millions of instructions (MI) were required. The following subtasks \(\delta_{i}\) will be loaded. \[u\delta_{i}=\sum_{i=1}^{n}C_{i} \tag{1}\] \begin{table}
\begin{tabular}{c l} \hline \hline
**Symbol** & **Description** \\ \hline \(EN_{k}\) & The LoRa gateway tasks to be processed \\ \(i_{k}\) & The LoRa gateway receives the task transmitted by the \(i\)th edge node \\ \(u_{k}\) & The LoRa gateway presently allocated tasks \\ \(u_{car}\) & The LoRa gateway task load at time \(t\) \\ \(u_{need}\) & The LoRa gateway needed task load at time \(t\) \\ \(a_{k}\) & Size of task-related data \\ \(e_{k}\) & Processing deadline for task \\ \(t_{e\delta_{i}}\) & CPU time required for a subtask to be completed at edge node \(e\) \\ \(\delta_{n}\) & The \(n\)th subtask \\ \(N_{i}\) & Instructions required to complete a subtask \\ \(\delta_{p}\) & Execution rate of edge nodes \\ \(Y\) & Amount of edge nodes executing subtasks \\ \(REN_{k}\) & The resources presently allocated for task \(EN_{k}\) at time \(t\) \\ \(\sum R\) & The total resources allotted to the task at time \(t\) \\ \(DEN_{k}\) & The current resource requirement of the task at time \(t\) \\ \(SEN_{k}\) & Task share all available resources \\ \(E\) & The group of nodes connected to the edge network \\ \(Rs\) & Requirements for the level of reliability between nodes and their neighbors \\ \(G_{i}^{e}(EN)\) & The task in the \(i\)th end nodes group that need to be completed are \(EN\) \\ \(E^{o}\) & Organizer of edge nodes \\ \(Q\) & Network of edge nodes \\ \(G\) & Edge node group \\ \(\sum EN\) & The resource designed to handle \(EN\) \\ \(\sum ae_{i}\) & The \(i\)th edge node requires processing resources \\ \(T\) & The full processing time required to complete all subtasks \(\delta_{i}\) \\ \(t_{EN}\) & The time needed to complete task \(EN\) in processing \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Symbols applied in this article. On the basis of speed \(\delta_{p}\), the CPU time (\(t_{e\delta_{i}}\)) required for processing the \(EN_{i}\) on the edge of the network \(e\) is shown below. \[t_{e\delta_{i}^{c}}=\frac{u\delta_{i}}{\delta_{p}} \tag{2}\]  
For the \(EN_{k}\) consisting of \(n\) subtasks, the LoRa gateway processes the tasks on \(Y\) edge nodes in a distributed manner. \(REN_{k}(t)\) denotes the resources (CPU time) required to process the tasks at the edge nodes at time \(t\). \(\sum REN(t)\) will be:  
\[\sum REN(t)=\int_{0}^{t}REN_{k}(t)dt \tag{3}\]  
\(U_{k}\) denotes the resources required to complete all the tasks of a single edge node, \(U_{R}\) denotes the resources allocated to the tasks processed by the edge node at the current moment \(t\), and the remaining required resources \(U_{need}\) are denoted as follows. \[U_{need}=U_{k}-U_{R} \tag{4}\]  
The current resource demand was given by \(DEN(t)\) at time \(t\). For the \(k\)th \(EN_{k}\) at time \(t\), \(SEN(t)\) describes all resources that are currently accessible.