**1. Introduction**

Over the last few years, the health sector has understood that the internet can be an essential support instrument in searching for a better quality of life and conditions for patient care [1]. Among other advantages associated with using the internet in the health field, the analysis, and processing of data in real-time through remote servers have been highlighted. A smart model that provides storage and processing of applications over the internet refers to the idea of cloud computing. The cloud can be described as a collection of software and hardware services that are delivered through the network to end-users. The users will have resources (both from hardware and software perspectives) with increasing capacity without requiring significant financial capital investments to acquire, maintain, and manage such resources.

Cloud computing acts as a support to enable the Internet of Things (IoT) applications. IoT environments are composed of hundreds or thousands of devices that constantly generate requests for collected data to be later analyzed. This process

naturally generates heavy requests that would be sent to a central processing server, flooding that server's network, and requiring computational power that a single computer would often not be able to supply. Here, cloud computing can be used as a processing medium for IoT scenarios to leverage its scalability and payas-you-go business model. However, sending requests from an IoT device to a cloud server adds network latency overhead to the communication that cannot be accepted in some cases. For example, we can cite some e-health scenarios, such as those addressing remote electrocardiogram (ECG), where data collecting and processing times are critical to the correct system functioning. We often cannot wait for a message to be sent, processed in the cloud, and returned, as the time involved in these procedures is prohibitive and can influence essential aspects such as a person's life or death. Furthermore, even with a highly scalable cloud computing environment, scaling it to serve many requests would result in additional power consumption.

To allow better scalability of IoT systems, it is necessary to design new architectures and solutions that simultaneously handle many devices and requests, maintaining the Quality of Service (QoS). Aligned with this sentence, fog computing expands the services the traditional cloud model offers to be closer to the data generators. Also, edge computing enters here to enable some processing and decision support precisely on the network's border, that is, close to the IoT device itself. Computing in fog or edge has as its main characteristics low latency, better support to collect the geographic distribution of data, and mobility over many nodes in the network. Thus, with predominantly wireless access, we have the execution of applications in real-time and more significant support for device heterogeneity. Data read by the sensors is collected, processed, and stored in a temporary database instead of delivered to the cloud, avoiding round-trip delays in network traffic.

A combination of cloud, fog, and the edge is especially pertinent to provide an architecture to answer pandemic research such as the case of COVID-19. More significantly, we are entering a period where long-COVID-19 research is mainstream, where the purpose is to continuously monitor the vital signs of those who were contaminated by the virus beforehand [2]. Most vital sign monitoring systems follow a generalized three-tier architecture composed of sensing devices, a gateway, and a cloud. By analyzing the current initiatives in the literature, they do not address all issues concomitantly as follows: (i) person's traceability, both in terms of historical view of vital signs or places visited in a smart city; (ii) artificial intelligence to execute health services proactively, generating value for end-users, in addition to hospitals and public sector; and (iii) state-of-the-art mechanisms to address QoS, elastic processing capability and an efficient and scalable message notification system.

In this context, this book chapter:


Our idea is to show details of the proposed architecture, detailing the modules and how multiple edge instances interact with fog nodes. In particular, we will offer vital signs-based services in the fog nodes and the cloud. These services can target a single

## *On Defining and Deploying Health Services in Fog-Cloud Architectures DOI: http://dx.doi.org/10.5772/intechopen.109570*

person, generating personal insights and notifications, and multiple persons. In this last case, we provide health information regarding a community or district of a city [3]. Thus, we capture data from the citizens and process them in the edge and fog nodes, generating appropriate notifications. Finally, we show future directions regarding healthcare services (in particular to monitor long COVID-19 situations), which will execute in a combination of edge and fog resources depending on person priority and service priority (for example, teens and older people, and critical services like ECG or non-critical services like fever detection). We understand the new era of 5G communication will burst and favor scalable IoT data collection, bringing pertinent issues such as reliability, performance, and scalability to the assembly of the proper digital health in intelligent cities.
