# An IoT-Based Computational Framework for Healthcare Monitoring in Mobile Environments
## 3 Distributed Computational Framework
### Framework Specification  
The framework provides a method to successfully design and configure the distribution and sharing of the application workload. Table 3 gives a general overview of the inputs and outputs for each design stage. As can be appreciated, the design of distributed applications under the proposed framework consists of three main steps: (i) application analysis for task and data flow break down; (ii) resource planning and (iii) deployment and empirical adjustments. Next, explanations on how the framework works are provided. The example used corresponds with the SD detection in mobile environments. This methodology can be exported to other advanced healthcare monitoring applications or other contexts, especially those where intensive data acquisition and high processing needs take place. The applications based on ECG analysis, and in particular, the SD detection have been reviewed in the state-of-the-art section to show the importance of providing solutions able to be deployed in mobile environments where a hospital monitoring context is not available. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Technology** & **Frequency** & **Data Rate \({}^{*}\)** & **Range \({}^{*}\)** & **Target Applications** \\ (**Release Date**) & **Band** & & & \\ \hline
802.11n (2009) & 2.4; 54 GHz & 600 Kbps & 30 m & Standard scenarios. \\
802.11 ac (2014) & 5.4 GHz & 1.3 Mbps & 30 m & High speed scenarios (i.e., home, hotels, airports, etc.) \\
801.11 ad (2012) & 60 GHz & 7 Gbps & 10 m & High density and/or extra-high speed indoor \\  & & & & & scenarios (i.e., conference room, department). \\
802.11 ah (2016) & 0.9 GHz & 100 Kbps & 1000 m & Indoor/outdoor IoT scenarios. \\ \hline \hline \end{tabular}  
* The data depend on the installation scenario and environmental conditions: i.e., indoor, outdoor, presence of walls and obstacles, etc.  
\end{table} 
Table 2: Current WLAN standards features. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Design Stages** & **Inputs** & **Outputs** \\ \hline \multirow{5}{*}{(i) Application analysis for tasks and dataflows break down} & \(\bullet\) & Implementations & \(\bullet\) & Application partitioning \\  & \(\bullet\) & State\_of\_the\_art techniques & \(\bullet\) & Granularity unit \\  & \(\bullet\) & Application requirements & \(\bullet\) & Data-flow diagrams \\  & \(\bullet\) & Working environment constraints & \\ \hline \hline \multirow{5}{*}{(ii) Resource planning} & \(\bullet\) & Cloud market & \(\bullet\) & IoT environment configuration: sensors, wearables, mobile \\  & \(\bullet\) & IoT environment & & devices, etc. \\ \hline \multirow{5}{*}{(iii) Deployment and calibration of the system} & \(\bullet\) & Configuration set up. & \(\bullet\) & Distributed architecture for IoT environment \\  & \(\bullet\) & Test & & IoT environment \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Framework methodology. Application analysis for task and data flow decomposition  
There are different ways in which the overall activity of the application can be decomposed in different tasks. This work depends on the application area and the type of application. There are two key features in this step. Firstly, a proper application partitioning to distribute the code for local and remote computation must be designed. The methodology can be static or dynamic: the static approach establishes the parts of the candidate application to be processed by smart sensors at the design stage; the dynamic approach requires analyzing the application code on the fly to determine which part can be processed out of the device. Secondly, the granularity unit needs to be defined. This feature determines the size unit of the application that can be computed separately. The usual options are module, process, class, component and method. This granularity is used for partitioning the application. This aspect is closely related to the abstraction level and data transmission requirements.