# An IoT-Based Computational Framework for Healthcare Monitoring in Mobile Environments
## 4 Case Study
### Distributed Processing  
For many amateur sports, the objective of the system is only to present the information to the user and create a database with historical data. But for professional athletes for whom greater physical exertion is required, other more elaborate calculations are needed. The development of mobile computing has enabled to compute complex applications and methods in mobile devices. This is the case of portable Personal Computers (PC) or laptops, tablets or even modern smartphones. The latter has experienced a spectacular computer power increase to face the demanding requirements of new commercial Apps [101]. In addition, the ubiquitous nature for computing and sensing make them suitable devices for some healthcare applications. Some of the techniques and methods reviewed on the state-of-the-art section could be processed on smartphones [102; 103; 104]. However, there are important shortcomings for computing advanced healthcare applications on mobile devices. In first place, the battery life of these devices is an important issue and it does not allow a high intensity processing for a long time. In addition, the smartphone or other mobile devices are too heavy and sized to be worn by athletes in professional sports. Secondly, although the medical staff or coach team can handle this kind of devices for health monitoring, the power performance is not enough for simultaneously monitoring a numerous group of athletes. In addition, for some scenarios, the deployment of powerful workstations or accessing to external cloud computing resources are not available options. In the proposed case study, the biomedical data needs to be processed as quickly as possible to obtain a result that allows medical staff to react rapidly. Moreover, the health information obtained could also be used for performance assessment of the sport activity. Three working scenarios are described to show the flexibility of the framework in handling variable workload and distributing the processing. * Application context A consists of a single athlete in a training session. * Application context B consists of a training session of a group of 11 athletes. In this case, all footballers must be analyzed at the same time. * Application context C represents a football match where there are two teams of 11 athletes and four referees to monitor. That is 26 athletes in total. Due to the different and exhaustive medical checks that are performed on footballer's hearts in addition to the treadmill exercise stress tests, all the good and bad heart rates should be known for each of the players and the referees. This volume of data could outperform the computing capabilities of the mobile devices for processing the whole application. The application tasks shown in Figure 3 need to be processed on the fly to provide the right information on time. For early SD prevention, a few seconds is needed by the cardiologist team to make the right decision and save the footballer's life. The system provides medical staff with more elaborate data and alerts in high risk situations. The proposed framework can overcome these drawbacks by providing a distributed computation approach. However, the decision on what tasks may be computed on the BAN's devices is not trivial. Wearable devices, such as smartwatches, do not have enough computing power for performing complex calculations. Their contribution in the processing will not be great, but sufficient for helping in providing the results on time. The idea of sharing the processing makes that part of each algorithm were processed by each athlete at the same time. Note that this is not a scaling problem, instead, flexibility is needed. The capability for handling the complex IoT scenarios provided by the proposed system is independent of the amount of data to be processed at the same time. For example, a marathon in which thousands of runners participate could be monitored in a similar way.