Cognitive Load Balancing Approach for 6G MEC Serving IoT Mashups

: The sixth generation (6G) of communication networks represents more of a revolution than an evolution of the previous generations, providing new directions and innovative approaches to face the network challenges of the future. A crucial aspect is to make the best use of available resources for the support of an entirely new generation of services. From this viewpoint, the Web of Things (WoT), which enables Things to become Web Things to chain, use and re-use in IoT mashups, allows interoperability among IoT platforms. At the same time, Multi-access Edge Computing (MEC) brings computing and data storage to the edge of the network, which creates the so-called distributed and collective edge intelligence. Such intelligence is created in order to deal with the huge amount of data to be collected, analyzed and processed, from real word contexts, such as smart cities, which are evolving into dynamic and networked systems of people and things. To better exploit this architecture, it is crucial to break monolithic applications into modular microservices, which can be executed independently. Here, we propose an approach based on complex network theory and two weighted and interdependent multiplex networks to address the Microservices-compliant Load Balancing (McLB) problem in MEC infrastructure. Our ﬁndings show that the multiplex network representation represents an extra dimension of analysis, allowing to capture the complexity in WoT mashup organization and its impact on the organizational aspect of MEC servers. The impact of this extracted knowledge on the cognitive organization of MEC is quantiﬁed, through the use of heuristics that are engineered to guarantee load balancing and, consequently, QoS.


Introduction
The forthcoming 6G will attempt to rewrite the communication networks' perspective, focusing on a paradigm shift in the way technologies and services are conceived, integrated and used. The 6G technology has the ambition to provide new directions for dealing with future network challenges. It will address the constraints and the performance requirements of emerging applications and services, many of which have increasing resource needs, through innovative approaches [1,2], such as complex network and bioinspired methods [3][4][5][6]. A context in which this will be quite prominent is the application of the Internet of Things (IoT) to smart cities, which is now attracting attention from both academia and industry. Such environments frequently become difficult to manage because networked Things and people are highly dynamic. One step that can be taken to make this management easier, and to effectively address certain needs, is to adopt efficient resource discovery and access mechanisms. The Web of Things (WoT) has emerged from such a need. WoT effectively allows Things to become Web Things that are accessible via Representational State Transfer (REST) Application Programming Interfaces (APIs) [7].
More precisely, the idea of the WoT is to reuse and leverage widely popular Web protocols, standards and blueprints, to make data and services offered by objects accessible to Web developers. Things expose their data and services as Web resources, allowing reading (e.g., temperature) and/or updates (e.g., trigger an actuation) by client applications/users [8].
The WoT is intended to enable interoperability across IoT platforms and application domains, enabling the discovery of Things for interaction with other Things or applications. This type of Thing exposure facilitates the creation of mashups, where services/data from one or multiple Things are combined with virtual Web resources, e.g., to decide on an actuation [9]. In the context of smart cities and related systems, as more Things become available and mashups are built, more data will be collected, analyzed and processed, which brings storage and processing capability challenges. One way to solve this is to use cloud infrastructures, as proposed in [9,10]. However, cloud computing layers involve high delays, mainly due to the distance between the devices and cloud data centers. This can be avoided if developers push processing of sensed data to edge devices close to the physical Things, reducing latency and saving energy. Edge computing is the paradigm to use in order to achieve this goal, as it brings computing and data storage closer to where it is needed. Many emerging IoT services are expected to benefit from such a paradigm, since low latency and processing, e.g., for security purposes, will be critical requirements in many scenarios [11], e.g., emergency services [12]. Within mobile networks, this is handled by Multi-access Edge Computing (MEC) infrastructures that are expected to be incorporated into future 6G networks, creating the so-called distributed and collective edge intelligence [13,14]. Edge devices become intelligent hubs that are able to deliver highly personalized services directly from the edge of the network, enabling applications to perform at their best. These types of architectures strongly benefit from breaking monolithic applications into loosely coupled microservices for greater flexibility and robustness of IoT applications, improving their performance.
In this article, the Microservices-compliant Load Balancing (McLB) problem in MEC infrastructures is addressed, and a solution is proposed that joins complex network theory with multiplex dimension representation and analysis of these networks. This approach represents a change of perspective that allows multiplexity to capture the complexity of WoT mashup organizations, both in terms of their internal interdependencies and their impact on the cognitive organizational aspect of MEC devices/servers [15,16]. The aforementioned scenario is modeled using two interdependent and weighted multiplex networks [17][18][19]. The first refers to WoT mashups, while the second is populated by MEC servers whose computational load depends on the way in which Web resources are organized, used and, if possible, reused in order to provide the final mashup applications. The impact of the extracted knowledge is quantified through the use of heuristics that are engineered to guarantee load balancing and, consequently, Quality of Service (QoS).
The contributions of this article include: • Modeling approach to address the McLB problem in MEC infrastructures. The approach allows for the unveiling of the interplay between WoT mashups (their use, reuse and chaining) and related computational loads at the MEC. • Definition of a weight system for WoT resources, at one of the weighted multiplex networks, by taking into account the concept of input heterogeneity. How such a weight system influences the workload of the second multiplex network is also pointed out. For the second weighted multiplex network, an interaction weight system is defined that is based on computing capabilities of MEC server pairs. • Evaluation of the interplay between computational loads at MEC servers and multiplex structural properties, through the definition of a complex involvement that takes into account a participation coefficient, the strength of links, and the reuse of WoT resources. • Evaluation of time and energy overhead for both local computation and offloading to neighboring MEC servers, shedding light on the impact of complex involvement measurements in triggering distributed cognitive-based decision mechanisms. This awareness makes it possible to reduce costs and improve QoS.
The remainder of this paper is organized as follows. In Section 2, some background and methods are discussed to highlight the importance of MEC, WoT and microservicesbased deployments as key enabling factors for 6G. Multiplex networks and complex theory perspective in 6G are also introduced. Section 3 provides WoT and microservicesrelated definitions and assumptions, to clarify how smart city mashups would be deployed, and then dives into the analytical approach that was taken to model the McLB problem. Section 4 presents results and discussion, and Section 5 concludes the article and proposes future work.

MEC for Smart City Applications
Cities are evolving into constantly changing systems of networked Things and people, and the introduction of MEC represents a pivotal point in developing innovative and cognitive urban applications [13,14]. Together with Artificial Intelligence (AI), the MEC is able to assure the intelligence required to process data accurately and efficiently, at the edge, creating a powerful distributed computing environment. Networks get self organizing and sustaining capabilities, in order to satisfy the dynamically changing services' requests and make more efficient use of resources. Typical 6G applications, such as self-driving cars, traffic and logistic management systems, telepresence and virtual, augmented or extended reality, require real-time feedback to be effective in addressing challenges from real-world scenarios. These aspects are particularly challenging and require efficient distributed models, data re-utilization and dynamic decision mechanisms based on all the knowledge available from different models and data sources [1,20]. For these reasons, the interest in modern interdisciplinary concepts, known as Edge Intelligence (EI), is growing and it is now a key pillar aspect of 6G [13].
Research activities are now shifting from traditional cloud-based architectures to collaborative, distributed, low-latency and reliable ones, calling for a shift from centralized/cloudbased systems to new EI-based designs. In the latter case, however, data are distributed across heterogeneous end devices, both Base Stations (BSs) and/or mobile devices (e.g., phones, cameras, vehicles, drones), characterized by limited computation and storage capabilities. Mobile end devices, for example, can be hand-held or wearable systems that are powered by capacity-limited batteries and storage. For these devices to stay cheap, it is crucial to rely on additional systems that acquire, cache, process and analyze data close to their source. These additional systems can form a distributed support network, shared by many systems, allowing for scalability, adaptability and resilience. Another crucial aspect is to make the best use of resources at the edge of the network, for the support of an entirely new generation of services. As an example, power consumption and latency issues are still open questions in MEC networks, and have a significant impact on the smart city application support.
In a nutshell, it is crucial to allow software to be "liquid" for continuous "flow" across devices and relocation of computation after design time, instead of making any kind of reservation "a priori". Microservices are a software development methodology that goes in this direction [21,22]. Modular lightweight application components are individually deployed on-demand, contrary to monolithic software applications whose modules cannot be independently executed, becoming more suitable for distributed systems. Microservices are cohesive, autonomic, replaceable and deployable independent processes interacting with each other through standardized interfaces [23].

Multiplex Networks
Key concepts in complex systems theory, such as adaptability, resilience, decentralization, self-organization and self-optimization, become crucial for 6G communication networks, which are characterized by a high level of interdependence among their highly heterogeneous components and by dense deployments. Complex systems analysis can be considered as the science that studies how elements of a system act collectively, to determine the emerging behavior of the whole system, and how they interact with the environment. For these reasons, the complex system approach represents an effective and useful tool to monitor, model and design the previously mentioned networks [2].
Complex systems are totally described by their connectedness: elements having connections of a certain relationship type. This means that network representations of complex systems include nodes that interact with each other through multiple links. A traditional monolayer approach can be used to describe the network, leading to the analysis of a single graph including all links. As this approach assumes a single kind of link, relevant information ends up being neglected and knowledge about the structural complexity and connectivity of the system is lost. In fact, in many real applications the relationships between nodes may differ in relevance, context and meaning [17][18][19]. In order to preserve and extract this knowledge, it is crucial to introduce a multi-dimensional network analysis, which allows an in-depth assessment (in structural terms) of the encoded information. Multilayer networks are a generalization of traditional graphs and provide a novel framework to model environments where nodes are connected differently in different layers [17,18]. That is, there will be intra-layer connections (within a layer) and inter-layer connections (between layers).
A multiplex network is a particular kind of multilayer network where the set of nodes is the same for all layers, and a node can be adjacent to another in the same layer, through intra-layer edges, or to its counterpart in another layer, through inter-layer edges [17,18,24]. Complexity in connections can be explored more deeply when weighted multiplex networks are used, where weights reflect intensity of interactions. On the basis of these premises, links between nodes can be distinguished not only by the kind of interaction but also by their intensity [19]. Therefore, multiplexity adds an additional dimension of analysis that allows non-trivial dynamics, phenomena and interdependencies of many real-world systems to be unveiled. More information and knowledge are extracted in order to understand a phenomena, to identify mechanisms and to inspire the design of such systems.
The relevance of multiplex network modeling is unquestionable and the scientific interest around applications is growing in several areas: biological, social and technological systems, social networks and telecommunication ones, epidemics and social contagions, transportation networks and brain computing dynamics [24][25][26]. Its application to smart cities, involving WoT devices supported by an MEC distributed infrastructure, allows for the engineering of heuristics that guarantee load balancing and, consequently, QoS to applications.

Smart City Mashup Scenario
IoT cameras made available in a smart city can be used by visitors, to take videos/photos, while acting alongside other sensors (e.g., motion or smoke detectors) for security purposes or to ensure that safety regulations are followed. Other applications may include video analytics, location services, augmented reality, object recognition, etc. The devices will be shared by client applications building mashups, for use by locals or anyone around the world. Such mashups can integrate processing tasks to improve processes/services or to create new ones. MEC can create a powerful distributed computing environment that can be deployed to support low-latency services and IoT applications. Scenarios, such as industrial automation, smart homes, smart vehicles, among others, are envisioned as 6G use cases due to their strict latency and reliability requirements. Applications with coordination and contextualization needs, such as Intelligent Transportation and Logistics, are also expected to benefit from 6G.

Basic Definitions and Assumptions
The core idea of the WoT is that Things will be exposing services and data through RESTful APIs that other developers and devices can easily understand and use. REST is a resource-oriented architecture where every component of a system (sensor, sampling frequency, variable, etc.) is called a resource, which can be individually addressed using a Uniform Resource Identifier (URI) standard scheme [7]. Resources can also enforce processing or decision tasks [27].
Definition 1 (Task). Resource implementing autonomous processing or decision logic on certain inputs and returning an output value. Besides simple logic, complex processing (eventually integrating other info; e.g., historical data) can be performed. The overall set of different tasks is denoted by T .
The exposure of Thing resources facilitates the creation of mashups. In general, a mashup is a way to compose a new service from existing services [28]. While this definition is focused mainly on information services, recent efforts on WoT standardization by W3C (see [8]) are allowing Thing resources to become part of mashups [9,29]. Recently, Rule resources have been introduced to implement observe-evaluate-actuate patterns, which are required in mashups [27].
Definition 2 (Rule Resource). Collection including a reference to a set of input resources, a task, and a set of output resources where task results should be placed. It is a REST-compliant mechanism to build observe-evaluate-actuate workflows. For a given rule R i , the set of inputs is denoted by I(R i ), the set of outputs by O(R i ), and the task by t(R i ) ∈ T (see Figure 1). Note that every element of the Rule collection (inputs, task, outputs) supports Create, Read, Update and Delete (CRUD) operations, which means that these can be modified on-the-fly (see [27] for more details). The task feeds on the set of Rule input resources, and this set can change. Each input resource can also go through some format conversion or special treatment. The set of Rule output resources can also change on-the-fly, and notification templates are used for format adaptation. Rule inputs and outputs are Web resources, I(R i ) ⊆ W and O(R i ) ⊆ W, where W denotes the overall set of Web resources, which means that Rule inputs, task and outputs can be hosted in different URIs and physical locations.

Definition 3 (Web Mashup).
Workflow linking Web resources, which are identifiable digital, physical or abstract entities. A mashup S i can be seen as a set of Rule resources and, therefore, can be denoted by S i = {R 1 , R 2 , ..., R |S i | }.
Note that a Rule resource can be part of multiple mashups because there can be multiple Rule outputs, each with its own format, for participation in different workflows.
In future MEC network architectures there will be authorized third parties, such as application developers and content providers, which will be able to use application servers integrated at the Radio Access Network (RAN), which causes a multi-tenancy run-time and hosting environment for applications to emerge. Since MEC is a distributed cloud platform, breaking a monolithic application into loosely coupled microservices can bring significant gains in the performance, flexibility and robustness of IoT applications, as it is possible to relocate or replicate microservices. Microservices also have the advantage of being reusable across applications. Thus, an IoT related task can be implemented monolithically, or it can be broken down into microservices (e.g., data processing, log file or database update).

Definition 4 (Microservices)
. Independently deployable services communicating through a welldefined lightweight mechanism. A set of microservices serves a certain business goal/task. The available microservices are denoted by V, and the set of microservices involved in task t ∈ T is denoted by V t .
Definition 5 (Distributed MEC). Network solution providing services and computing functions required by clients at the edge. The set of application servers, or data centers, is denoted by D. Each d ∈ D provides computing resources, storage capacity, connectivity and access to RAN information, and will be hosting microservices instances running as virtual appliances.
In short, a microservices architecture can better ensure that applications are always on, due to replication, while a MEC infrastructure ensures a low end-to-end latency. This type of architecture, together with the uncoupling of Rule collection components, provides the key elements for edge computing to work properly. Mashups can be built independently by the client, using a Rule-like mechanism, and processing/service tasks inside Rules can be moved to the MEC. Naturally, the MEC would benefit from load balancing across application servers, which would have to take into account interdependencies among microservices, i.e., the load on a successor microservice instance depends on the load from predecessor microservice instances [30].
Load balancing becomes the challenge that needs to be solved and aspects such as MEC virtualization facilities and interdependencies among microservices have to considered. This problem is defined as follows.
Definition 6 (Microservices-compliant Load Balancing (McLB) problem). Given a distributed MEC serving a set of client mashups, whose tasks involve one or more microservice instances hosted at MEC servers, plan for an adequate cooperative server MEC environment where load balancing is ensured.
In this article, multiplex network modeling is used to address this problem, as explained next.

General Formalization of Multiplex Networks
In general, a multiplex network M is defined as a set of L networks representing the different layers. Each network is denoted by the graph G α = (N , E α ), where N is the set of nodes/vertices, the same in every layer, and E α is the set of links/edges, which changes according to the layer α ∈ {1, ..., L} [17,19].
A network G α can be described by its adjacency matrix denoted by A α , where a α ij = 1 if there is a link from i to j, and a α ij = 0 otherwise. In weighted multiplex networks, a link ij in E α will be characterized by the weight w α ij . This means that a α ij = w α ij whenever there is a weighted link between i and j, and a α ij = 0 otherwise [19]. Weighted multiplex networks allow node properties to be defined: (i) k α i , for degree; (ii) s α i , for strength; and (iii) o i , for the overlapping degree; where i is a node in layer α. These are defined as follows [17,19] (see Figure 2): The Z-score is a measure associated with o i , and is calculated as: where o is the average overlapping degree of the nodes in the system, and σ o is the corresponding standard deviation [31]. The examination of Z-score variation among nodes is crucial to introduce a classification of nodes that is based on the quantification of multiplex network properties. Another information of interest is the heterogeneity of the number of neighbors across layers, called the multiplex participation coefficient [17] for node i, which is measured using: where P i = 1 when the links incident on node i are equally distributed across the layers, and P i = 0 when the node is active on only one layer. Taking into account the mentioned multiplex network properties, two interdependent weighted multiplex networks are proposed to model the McLB problem: M 1 , denoting a multiplex network that models the WoT section; and M 2 , denoting a multiplex network that models the MEC section. These networks are shown in Figure 3, and their role is clarified next.

WoT Multiplex Network
The multiplex network M 1 is intended for WoT section modeling, where client mashups are built. Therefore, its nodes represent Rule resources exposed by Things, while its links/edges represent workflow wiring together such Rule resources. Rule resources can be part of multiple mashups, and M 1 layers are the reflection of these structural interconnections.Thus, for a set of up and running mashups, the network graph at layer β, for M 1 , is denoted by G WoT  A Rule resource R i is a Web resource of a particular type, available at some URI. As stated in Definition 3, the task performed by a Rule uses input Web resources, denoted by I(R i ), and after performing some task the output is placed at one or more output URIs, O(R i ), which will feed into other Rules. According to [27], the overall execution logic of the Rule resource is the following: every time a Rule input is updated, the Rule task is executed and if its state changes from False to True then notifications are sent to the output resources. When abstracting ourselves from intermediate URIs, it is possible to state that R i task execution is triggered by Rules that precede Rule R i in the workflow, within the same layer or in other layers, and this influence will be modeled as follows. For a weighted multiplex network M 1 , it is assumed that the relevance of a link is greater when its endpoints have greater difference on the number of inputs. The weights of M 1 interactions will be the following: Definition 7 (Interaction weights in M 1 ). In a weighted multiplex network M 1 , the weight of a link between endpoints R i and R j in layer α, denoted by w α R i ,R j , is given by: where k α R i and k α R j are the degrees of the R i and R j nodes in layer α, respectively.
The degree of a node is the number of interactions in layer α. Figure 4 illustrates such intra-layer interaction weights. This property is useful to shape interactions among nodes in a layer, allowing re-usability and chaining of resources to be improved. In addition, Rule resources interact with their counterparts in other layers. This is so because Rule resources are not only chained for the creation of a specific mashup, but also contribute to the formation of other mashups. This is captured by the interdependent layers of the multiplex network M 2 .

MEC Multiplex Network
The multiplex network M 2 is intended for MEC section modeling, where application servers or data centers are placed. While the network is populated by the set of application servers/data centers (network nodes), the layers refer to the microservices. In each layer, an n ∈ N will be hosting microservices instances running as virtual appliances. Multiplex representations allow us to establish relationships and to shed light on complex interdependence between microservices with respect to load distribution, reusability, computing capability of hosting nodes and time involved. Therefore, links between nodes in M 2 will have weights defined as follows.

Definition 8 (Interaction weights in M 2 ).
Referring to the weighted multiplex network M 2 , the weight of the link w α ij is given by: where f α i and f α j represent the computing capability of data centers i and j (CPU/cycles per second [32]), respectively, which is dedicated to the microservice α. This accounts for multiple microservice instances.

WoT and MEC Interplay
By assuming that WoT applications can share Rules, when building their workflows, and that Rule tasks can be decomposed into small and light components/microservices, it becomes possible to distribute microservices across servers. This leads to complex interactions between MEC servers and, given the chains of resource requirements involved, multiple levels of abstractions with complex interactions can emerge. To capture the connection between Rule resources in M 1 and microservices distributed across servers populating M 2 , the complex load for each node i in M 2 is defined. This represents the computation overhead due to the involvement of MEC nodes in the multiplex network representation. The complexity measure (b i ) M 2 is defined as follows: Definition 9 (Complex involvement of server i in M 2 ).
where L 1 and L 2 denote the number of layers in M 1 and M 2 , respectively, while N 1 denotes the set of nodes in M 1 .
Note that (P i ) M 2 in Equation (8) is the multiplex participation coefficient of a node i ∈ N 2 , a set of nodes in M 2 , measuring the involvement of MEC servers' resources in different microservices/layers. The higher the participation coefficient, the higher the computation load at the server, due to the fact that the node actively participates in multiple microservices. The is the sum of the strengths of node i, calculated for each layer α ∈ {1, ..., L 2 }. This measure depends on the importance of links, which has to do with the computing capability difference of its nodes. The last component of Equation (8) is the Reuse function for Rule resources in M 1 , where summing the strengths of nodes in M 1 over all layers β ∈ {1, ..., L 1 }, takes into account the heterogeneity of links as a consequence of M 1 's weights (see Section 3.3.2). A greater strength implies greater heterogeneity at Rule resource inputs and, consequently, additional loading for MEC servers in M 2 . The (P j ) M 1 is the multiplex participation coefficient of node j ∈ N 1 , from the WoT-based multiplex network M 1 , and it represents a measure of how Rule resources in M 1 are reused and chained in different mashups. The greater the multiplex participation coefficient, the more Rules are involved in different mashups, with no additional computation required on MEC servers. The (b i ) M 2 ends up measuring the commitment of MEC node i and, therefore, the probability of opting for local computation or offloading to neighboring nodes. Thanks to this complex measure, an estimation is made regarding the probability that a node in M 2 will compute locally or not.

Impact on Energy and Time
To measure the impact on both energy and time associated with computing that is held locally and offloaded, a cost function must be defined. As specified in Definition 4, each task t ∈ T can be served by a set of microservices V t and, for the sake of simplicity, it is assumed here that such a data load is initially distributed across microservices and MEC nodes (layers and nodes in M 2 , respectively) using a hypothetical distribution that depends on the degree k α i . Let x it ∈ {0, 1} denote the offloading decision for node i regarding the task t ∈ T . That is, x it = 0 if the MEC server goes for the local computation, and x it = 1 in case of offloading. According to such a decision, the energy and time cost is defined as follows.
Definition 10 (Decision Impact on Energy and Time). The total cost associated with decisions stored in matrix X |N 1 |×|T | is defined by: where E it is the required energy and H it the execution time for task t initially allocated at node i. As operations will be performed locally or offloaded: whose components are defined as follows [32]: where c it is the number of CPU cycles, l it is the task load and f i is the computing capability of node i in M 2 , where f j refers to the computing capability of node j in M 2 , to which the task load is offloaded, and r i = B × ln(1 + p i ω 0 B ) is the uplink rate for bandwidth B, p i is the transmission power, and ω 0 is the channel noise, with v i energy per CPU cycle and, finally,

Scenario Setup
Simulations were conducted considering a multiplex network M 1 with L 1 = 3 layers, with each layer representing an IoT mashup, which models three distinct kinds of weighted interactions and connectivity among the |N 1 | = 1000 nodes (Rule resources). A variable population for M 2 , 50 ≤ |N 2 | ≤ 500 nodes (MEC servers), and a variable number for L 2 (microservices layers), 3 ≤ L 2 ≤ 9, are assumed. Each layer of both weighted multiplex networks has a Scale-Free (SF) network topology [33]. SF networks are highly heterogeneous networks, characterized by a power-law degree distribution, with a high degree of correlation between nodes and degree distribution having a long tail. SF networks fit many real-world networks and are characterized by preferential attachment and growth; new nodes are added to the existing ones with a probability of attachment that is proportional to the degree of older nodes in the network.
Regarding the remaining simulation parameters, it is assumed that the size/load of tasks is in the range [0, 20], i.e., l it ∈ [0, 20] MB, and that tasks are spread across nodes following the hypothetical distribution described in Section 3.3.5. The energy consumption per CPU cycle is set to ν i = (0.20 × 10 (11) ) Joules per cycle. For the number of CPU cycles it is considered that there will be c it = 500 cycles per bit. In order to take into account the heterogeneous computing capability of servers, a random computing capability, f i ∈ {0.5, 0.6, ..., 1} GHz, is used. The device's transmission power, channel bandwidth and background noise are p i = 0.1 W, B = 20 MHz and ω 0 = −100 dBm, respectively [32].
To build the model, perform computation and obtain results, the programming language R and IDE RStudio were used. Figures were generated using the Plotly and ggplot2 packages [34][35][36]. Simulations ran on a personal computer with Intel(R) Core(TM) i7-8750H CPU, 8 GB RAM capacity and 2.20GHz frequency. The employed simulation settings are summarized in Table 1. Packages Plotly and ggplot2 [34,35] Figure 5a shows a cartography of the node roles in the multiplex network M 2 , plotting for each node i the multiplex participation coefficient (P i ) M 2 versus the Z-score (z(o i )) M 2 of the total overlapping degree. Since the overlapping degree of a node represents its overall importance in terms of number of incident edges, while the multiplex participation coefficient gives information about the distribution of incident edges across the layers, this cartography allows us to classify nodes merely in terms of their structural role in the multiplex network (see [17,31]).

Evaluation
In general, representing nodes as points in the P i − z(o i ) plane allows us to identify three classes of nodes: (i) focused, comprising the nodes for which 0 ≤ P i ≤ 1 3 ; (ii) mixed, comprising nodes having 1 3 ≤ P i ≤ 2 3 ; (iii) multiplex nodes, comprising nodes with P i > 2 3 . Regarding the Z-score of their overlapping degree, it is possible to distinguish: (i) hubs, for which z(o i ) ≥ 2; (ii) regular nodes, for which z(o i ) < 2. Moreover, through the color of each node it is possible to show the variation of the mean strength distribution s i M 2 and through its size, the complex involvement (b i ) M 2 is shown.
A finding from such a cartography is that greater values of complex involvement (b i ) M 2 can be noticed in nodes classified as regular multiplex, confirming that the multiplex network representation is quite suitable to capture the complexity of the considered scenario, where computation is shifted to the edge. These nodes are regular because they have a low number of incident edges and multiplex as their links are well distributed across the layers (microservices in which they are involved). This means these nodes are involved in many microservices but their computation is not crucial for any of them. Furthermore, we can deepen the analysis, evaluating not only the number of nodes' incident links and their distribution across the layers but also the distribution of their average strengths. The strength is a function of weights (see Equation (2)  The complex involvement (b i ) M 2 represents the interplay between the two multiplex networks M 1 and M 2 (see Section 3.3.4) and strictly depends on the way in which the resources are organized and reused in the Wot-based M 1 , represented through the Reuse function. For this reason, Figure 5b shows the cartography in the plane P i − z(o i ) for the nodes in M 1 . This time, the size represents the distribution of the average strength s i M 1 , while the color is the variation of the Reuse function. This cartography sheds light on how the multiplex network analysis results in a deepened understanding of the hidden organization of Web resources, their use and re-use in IoT mashups, which impacts the computational load of MEC nodes in M 2 . In this case, considering an SF as the network topology, it is possible to see that the most used and re-used Web resources are those classified as multiplex regular nodes. These Web resources participate in several IoT mashups but do not present a high number of incident links in any of them. The nodes with lower values of the Reuse function are the most critical nodes in terms of computation because they are characterized by high values of both (P i ) M 1 and (z(o i )) M 1 (multiplex hubs). This means that they are involved in many IoT mashups and, at the same time, in some of them they are important in terms of the number of incident links. In addition, those with high average strength are even more critical because they introduce further heterogeneity in computation (see Definition 7). Figure 6a shows the cost for the case of |N 2 | = 300 nodes and L 2 = 3 layers. Points in the graph represent the cost (energy and time) associated with nodes for the following three cases: (i) nodes always choose local computation (orange points in the plot); (ii) nodes always decide on offloading (pink points in the plot); (iii) the decision about computation is made in accordance with the values of the complex involvement (b i ) M 2 (referred to as the cognitive case; green points in the plot). In order to provide a heuristic (non-optimal solution) to the McLB problem in a distributed and collective way, the mean values of costs related to the three cases are shown. From such information it is possible to state that the cognitive case represents the most profitable approach for the whole system, presenting the lowest mean cost. Figure 6b indicates the trend of the computing time, and it is clear that, in terms of time, the complex involvement choice is also quite convenient. This approach can be particularly suited to those distributed and mobile network contexts whose services require priority and are extremely sensitive to delay. The mean and standard deviations, of both computing time and total cost, are reported in Table 2 for the following three cases: local computation, offloading to neighbors and cognitive computing decision. The heatmap in Figure 7 displays a comparison of the total cost for the local, offloading or cognitive computation cases. Different population sizes are used for the multiplex network M 2 , |N 2 | ranging from 50 to 500 nodes. The number of layers, L 2 , also varies and L 2 = 3, L 2 = 5, L 2 = 7 and L 2 = 9 cases are considered. The figure shows that the case where a computation decision is taken according to the knowledge extracted from the multiplex network representation, through the measure (b i ) M 2 , the cognitive case presents the most profitable values for the whole system. Furthermore, as the population and the number of layers grow, this approach becomes increasingly convenient. In particular, for L 2 = 9 it is possible to see that a high number of layers means that the MEC nodes in M 2 are involved in a large number of microservices, resulting in a major computation load and cost. Increasing the population, in the cognitive case, provides more capacity for self-organization, increasing the probability to go for the most profitable choice in terms of cost. In other words, a richer multiplex structure in terms of layers and nodes, even if it initially involves a higher computational load and cost, allows the exploitation of more knowledge, which results in a significant cost reduction. Figure 7. Heatmap of total cost sensitivity. For each computing decision considered (offloading to neighbors, local computation, cognitive computing), the heatmap is displayed considering a population size |N 2 | basis (ranging from 50 to 500) and different numbers of layers (L 2 = 3, L 2 = 5, L 2 = 7 and L 2 = 9), where colors (ranging from yellow to blue) indicate the total cost values.

Conclusions and Future Work
This work presents an innovative multiplex networks-based approach to solve the Microservices-compliant Load Balancing (McLB) problem in MEC infrastructures. The novelty of the approach consists in introducing key features able to fully describe and capture the complexity of 6G ecosystems. These ecosystems involve WoT platforms characterized by heterogeneous Web resources and MEC servers devoted to computation. The aim is to achieve a connected intelligence from the network design, and control service construction and QoS, through the introduction of novel algorithms able to dynamically manage applications.
The results put in evidence that the multiplex network representation provides a suitable tool to capture the complex interactions and interdependence within MEC and WoT mashups, highlighting critical issues in Web resource usage and triggering cognitive decision mechanisms about the computation, with an impact on final services' QoS.
As future work, we envisage complex scenarios including also learning aspects and collective/evolutionary dynamics, such as cooperation through Evolutionary Game Theory, and mesoscopic analysis such as multilink communities detection, with the aim of improving performance in provided services.
Author Contributions: All the authors have equally contributed to the conceptualization, methodology, software, validation, formal analysis, investigation, resources, data curation, writing-original draft preparation and funding acquisition. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.