Service Embedding in IoT Networks

The Internet of Things (IoT) is the cornerstone of smart applications such as smart buildings, smart factories, home automation, and healthcare automation. These smart applications express their demands in terms of high-level requests. Application requests in service-oriented IoT architectures are translated into a business process (BP) workflow. In this paper, we model such a BP as a virtual network containing a set of virtual nodes and links connected in a specific topology. These virtual nodes represent the requested processing and locations where sensing and/or actuation are needed. The virtual links capture the requested communication requirements between nodes. We introduce a framework, optimized using mixed integer linear programming (MILP), that embeds the BPs from the virtual layer into a lower-level implementation at the IoT physical layer. We formulate the problem of finding the optimal set of IoT nodes and links to embed BPs into the IoT layer considering three objective functions: i) minimizing network and processing power consumption only, ii) minimizing mean traffic latency only, iii) minimizing a weighted combination of power consumption and traffic latency to study the trade-off between minimizing the power consumption and minimizing the traffic latency. We have established, as reference, a scenario where service embedding is performed to meet all the demands with no consideration to power consumption or latency. Compared to this reference scenario, our results indicate that the power savings achieved by our energy efficient embedding scenario is 42% compared with the energy-latency unaware service embedding (ELUSE) reference scenario, while our low latency embedding reduced the traffic latency by an average of 47% compared to the ELUSE scenario. Our combined energy efficient low latency service embedding approach achieved high optimality by jointly realizing 91% of the power and latency reductions obtained under the single objective of minimizing power consumption or latency.


INTRODUCTION
In the near future, a considerably large number of physical objects will contain sensors and actuators and will have the ability to communicate, forming the basis for the Internet of Things (IoT) [1].IoT has motivated many global establishments to research and invest in this area and in its promising use in healthcare, transportation, and other smart building applications [2].However, these promises of IoT come with considerable challenges.One of these challenges is the energy used and its effects on the environment and the expenditure involved [3], [4].Although each IoT device consumes low power, it is predicted that the number of IoT nodes will reach approximately 50 billion by the year 2020 [5], a massive number that can cause a high aggregate power consumption, as smart cities and smart building applications for example are expected to use a large number of IoT devices across cities [6].Therefore, minimising the energy consumed by such applications can play a significant role in reducing the total energy consumed by IoT.
In this study, we investigated solutions that can enable IoT to enhance real-world applications in a smart building.A smart building setup consists of a system for the monitoring and control of certain specific applications in the public or private areas of the building.The monitoring and control system consists of distinct types of sensors and actuators such as motion detectors, sound detectors, light detectors, smoke detectors, alarms, and gate controllers.These sensors and actuators, by means of wireless nodes, are connected in the building through a mesh topology.In a smart building, there are distinct applications that use the same resources in the monitoring and control system.For example, both a security application and an energy saving application may use motion detectors, radio frequency identification (RFID) tags, and light detectors for monitoring simultaneously.To be successful, the smart building concept needs to be supported by various applications and has to be adopted by a range of industries, service providers, and administrations.It has to be applied efficiently in a mutual pattern for these sectors [7].An essential phase toward the realisation of the smart building concept involves the improvement of the communication infrastructure.The IoT paradigm is capable of collecting data from a massive assortment of distinct devices uniformly and seamlessly.The decentralised and heterogeneous properties of IoT devices capable of providing multiple functions require an efficient architecture that hides such heterogeneity from higher-level applications and provides interoperability for information exchange with other IoT devices [8].A Service Oriented Architecture (SOA) is potentially a viable middleware between users' applications and the IoT physical layer and can achieve interoperability between these heterogeneous IoT devices [9].SOA enables the abstraction of IoT device functions that can then be translated into basic services, which in turn can be composed of complex services and exploited in the upper application layer.Figure 1 depicts the SOA middleware for IoT, which is composed of three sub-layers [1], [2], [10]: (i) object abstraction layer that enables IoT devices to provide their functions to the upper layers; (ii) service management layer to enable dynamic object discovery, status monitoring, and mapping of the available services to the IoT devices' abstracted functions; and (iii) service composition layer where complex services, referred to as the business process (BP) workflow, are created from the basic services provided by the service management layer [11,12].

University of Leeds, UK
With the use of SOA, devices can be reused or upgraded individually, leading to several advantages such as extensibility, scalability, and modularity along with the aforementioned interoperability among IoT devices [6,13].
Because of these advantages of SOA, in [14], the authors presented an energy-centred and Quality of Service (QoS)-aware services selection algorithm (EQSA) for the composition of IoT services.They proposed a model that selects the services by using a lexicographic optimisation strategy and a QoS constraint relaxation technique.The authors of [15] surveyed the recent development of SOA models for IoT and reviewed their fundamental technologies.The authors of [16] proposed a reference architecture based on SOA concepts by integrating the IoT, cloud, and edge technologies with the existing infrastructure.The authors of [17] surveyed the recent development of energy-efficient solutions for wireless sensors networks and reviewed some existing topologies that allow trade-offs between multiple requirements to be achieved for efficient and sustainable sensor networks.The authors of [18] presented a QoS message scheduling algorithm in IoT network-based SOA, which is targeted more toward service provisioning with the idea of service differentiation by classifying the messages into high-priority and best-effort messages.The authors of [19] surveyed the state of QoS methodologies in wireless terrestrial sensor networks to attain the delay and reliability requirements in critical applications.These authors emphasised the main challenges in implementing QoS protocols in Wireless Sensors Networks (WSN) applications.The authors of [20], [21] developed strategies to improve the energy efficiency of Internet of Things, while [22], [23] considered the virtualisation of such networks.Processing the sensor data and the use of analytics based on such big data was surveyed in [24], with [25] using these analytics for effective actuation in the network.Greening these big data networks was introduced and discussed in [26], [27]whereas improving the energy efficiency of the clouds and their interconnecting networks that process the IoT data was evaluated in [28], [29] with the energy efficiency of content sharing optimised in [29] and [30].The energy efficiency of the networks supporting different services was optimised in [31][32][33][34][35][36][37][38][39].Resilience is essential for a range of services, hence [40]and [41] introduce strategies to improve resilience with energy efficiency.
In the present study, we formulated the problem of finding the optimal set of IoT nodes and links to embed BPs into the IoT layer by considering the following three objective functions: i) minimising only the network and processing power consumption, ii) minimising only the mean traffic latency, and iii) minimising a weighted combination of the power consumption and the traffic latency.This problem was formulated using mixed integer linear programming (MILP).We benefit from our track record in energy efficiency and networks virtualization, eg.[42][43][44] The rest of this paper is organised as follows: In Section II, we introduce our framework of service embedding in IoT networks.Section III discusses the service embedding evaluation and its results.Finally, Section IV concludes this paper.

THE FRAMEWORK OF SERVICE EMBEDDING IN IOT NETWORKS
In the smart building setting, many services employ IoT nodes such as: security services employing motion detectors, RFID, display screens and alarms; energy saving services employing motion detection, temperature sensors; fire protection services employing temperature sensors, smoke detectors, water sprinklers and alarms; entertainment services employing noise detectors, and temperature sensors; administration services employing motion detectors, temperature sensors, door actuators, and alarms.These services and other services can share the same sensing and actuating facilities like sensors for motion, temperature, sound, smoke detectors in addition to the processing modules of the IoT nodes.IoT networks are capable of providing multiple services but they require an efficient architecture that hides such heterogeneity from higher level services and provides interoperability for information exchange with other IoT devices.
The SOA enables the abstraction of the IoT node functions and their translated into basic services which in turn can be composed into complex services and exploited by the upper application layer.
We develop a framework to embed service requests into a substrate network of IoT nodes.These requests are implemented following the SOA in the form of a BP.A BP is a virtual topology that consists of virtual nodes and links.The virtual nodes encapsulate the requested processing demand, sensing/actuating functions.The virtual links carry traffic between virtual nodes.The embedding process maps the virtual nodes and virtual links of each BP into nodes and links of the IoT layer.Each BP is defined as a set of virtual nodes and links.Each virtual node has a function that requires processing and memory.Virtual nodes need to be embedded in a certain geographical zones.
Virtual links carry traffic demands between virtual nodes.Each IoT node is characterised by the following modules as shown in figure 2: -A processing module hosting CPU and RAM.
-A network module hosting a wireless traffic transceiver (Tx/Rx circuit and a Tx power amplifier).-A function module that provides interfaces to a set of supported sensors and actuators.
Figure 3: Service embedding layers in IoT networks Figure 3 gives an example of embedding two BPs.The framework embeds the virtual nodes of BP1 (A1-A2-A3) in the physical IoT nodes (P1-P2-P7), respectively; and chooses the path (P1-P2-P5-P7) to link the embedding IoT nodes.Each virtual node is embedded into an IoT node that satisfies the virtual node's requirements.An IoT node that embeds a certain virtual node of a certain BP can at the same time work as a relay node for the traffic associated with another BP.This is shown in the second embedding example where IoT node P5 which is an embedding node for BP1 and at the same time works as a relay node for the traffic associated with BP2.
We consider a typical IoT setting where the power consumption of IoT nodes is mainly attributed to the processing and network modules while the sensing and actuating modules are externally powered.
As the traffic between IoT nodes is routed via a multi-hop network, we consider the queuing and transmission latency which dominate over the propagation delay as a network performance metric referred to it as traffic mean latency.
To study the power consumption and traffic mean delay resulting from embedding BPs into the IoT network, we formulate the embedding problem as a MILP model considering three different objective functions: -Minimising the total power consumption.
-Minimising both total power consumption and traffic mean latency in a multi-objective manner.
A. Framework definitions Before we give these objective functions and the constraints imposed on the embedding of BPs, we introduce the sets, parameters and variables used in the formulations:

B. Framework objective functions 1) Energy efficient service embedding
This embedding scenario has an objective function whose goal is to minimise the total power consumption as follows: Objective: minimise TNP where TPP is total processing power and given by: where is a binary variable that indicates the activity of the processing module in IoT node c , is the idle processing power parameter of IoT node c in mW, is a binary variable that indicates if a virtual node a in BP i has been embedded in IoT node c, is a parameter that gives the maximum CPU power consumption in each IoT node c in mW, is a parameter whose value gives the processing requirement of the virtual node a in BP a in MHz, and is a parameter that specifies the processing capability of the IoT node c in MHz.The processing power consumption is considered to follow a linear profile versus the load with an idle power consumption.The total traffic power consumption of the network, TNP, and given by: where f is neighbour IoT node of e and is included in , is the neighbours subset of IoT node e , is a binary variable that indicates the activity of the network module in the IoT node, is the idle network power parameter of IoT node e , is a variable that specifies the traffic between neighbouring IoT nodes e and f in kbps, is a parameter that gives the energy per bit for each IoT link e, f in mW/kbps, is a parameter that specifies the distance between the neighbouring IoT nodes pair (e, f) in meters, and is the transmit amplifier factor [18] for each IoT link e, f in mW/kbps/m2.The network power consumption is a function of the traffic and distance between the source and destination nodes.The network power consumption of each link consists of the idle power, the power consumed per bit by the electronics in the transmitter and the receiver, and the transmitter amplifier power consumption which is calculated based on the radio energy needed based on Frii's free-space equation in our setting (note that higher propagation factors beyond Frii's square law, e.g.cubic or higher, can be considered, and are a straight forward extensions of our equations, but are not considered here) [4,44,45].

2) Low latency service embedding
The second scenario in our framework is concerned with minimising the total traffic mean latency of the service embedding.The framework minimises the traffic mean latency in the IoT network using the following objective function:

Objective: minimise
where TL is the total traffic mean latency in the network given by: Our network is modelled as an open Jackson network of multiple M/M/1 queues where the utilisation is less than 1 at every queue [46].For simplicity, we consider each node as an M/M/1 queue.The M/M/1 model refers to a system with a single server, where arrivals are determined by a Poisson process and job service times have an exponential distribution as shown in figure 4. The mean latency is the average time that the packet takes to pass through queue and server, which is given by: = The arrival rate represents the average rate of successful packets transfer to the node through physical links per time unit.
Mathematically, the arrival rate is the summation of data rates delivered to the node in the network.
In our framework, we considered that the service rate is fixed for each IoT nodes in the network.The service rate is the transmission rate of the network module.A variable, is created to calculate the summation of packet arrival at each IoT device.Since we are using linear programming, equation ( 6) must be converted to a linear format.To facilitate this, we use a lookup table indexed-variable to calculate the traffic mean latency.The lookup table indexed-variables method depends on generating lambda indicator as a binary variable according to the traffic value of for each node.Based on this indicator, the traffic mean latency for IoT nodes is given as the value corresponding to the indicator in the lookup table.

3) Energy efficient -Low latency service embedding
In this scenario, we consider a multi-objective MILP model to optimise the service embedding in IoT networks to achieve a trade-off between minimising the power consumption and minimising the traffic mean latency.The objective function is given as: Objective: minimise (7) where , and are weight factors with the following units 1/ms, 1/mW, 1/mW respectively used to emphasise the importance of the different components of the objective function.

C. Framework Constraints
The framework performs the embedding operation through two parts as follows: Embedding of virtual nodes (8) Constraint (8) ensures that each virtual node in a BP is embedded in a single IoT node only.Constraint (9) states that each IoT node is not allowed to host more than one virtual node in each BP.This is considered as a coexistence constraint that is not used in all scenarios such as controller node virtualisation.
Constraints ( 10) and ( 11) build (include / add) a processing module in IoT node if that node is chosen for embedding at least one virtual node in BP or more, where M is a large enough unitless number to ensure that = 1 when is greater than zero.
∀ c ∈ P ∀ c ∈ P Constraints ( 12) and ( 13) represent the processing and memory capacity constraints, respectively.They ensure that the embedded processing and memory workloads in an IoT node do not exceed the MCU and memory capacities, respectively.14) and ( 15) ensure that the required function of each virtual node in BP is provided by its hosting IoT node.Constraints ( 16) and (17) ensure that the required zone of each virtual node in a BP is matched by the zone of the hosting IoT node.Embedding of virtual links Constraint (18) ensures that neighbouring virtual nodes and of in are also connected in the embedding IoT nodes and .We achieve this by introducing a binary variable which is only equal to 1 if and are exclusively equal to 1 otherwise it is zero, is an auxiliary variable.
Constraint (19) generates the path's traffic matrix resulting from embedding the virtual nodes and into the IoT nodes and .
Constraint (20) represents the flow conservation constraint for the traffic flows in the IoT network.
Constraint ( 21) estimates link's traffic between the neighbouring IoT nodes and d.
Constraint (22) states that the total traffic flows of the IoT node should not exceed the node capacity i.e. 250 kbps.

f f
The constraints ( 23) and ( 24) build a path between the embedding IoT nodes and through the neighbouring IoT nodes and , where if there is a traffic path between the IoT nodes and that passes through the neighbouring IoT nodes and , where M is a large enough unitless number which ensure that = 1 when is greater than zero.
Constraint (25) ensures that traffic splitting is prevented for each path between the embedding IoT nodes and , such that the maximum number of physical links between neighbouring IoT nodes e and f is one.
∀ e ∈ P ∀ e ∈ P Constraints ( 26) and ( 27) build a network module in IoT node if that IoT node is chosen to send/receive traffic at least for one link or more, where M is a large enough unitless number to ensure that =1 when is greater than zero.Constrain (31) estimates the mean traffic latency for each IoT ( .The MILP optimisation model was solved using CPLEX running on personal computer with processor core i5 -3.2 GHz and 16 GB RAM and on the university Polaris servers using 24 cores and 128GB RAM.

RESULTS AND EVALUATIONS
To evaluate the performance of the proposed model and heuristic, we consider a smart building scheme (for example in an enterprise campus) where the physical layer is composed of 30 IoT nodes connected by 89 bidirectional wireless links.These IoT nodes are distributed across an area 500 m 500 m and can carry various functions with the following assumptions: -There is a set of 9 distinct functions, 4 sensing functions, one control function and 4 actuating functions.Each IoT node can provide 2 sensing functions, 2 actuating functions, and one controlling function (present only in one type of processor).The virtual node of each BP requests one function only.-There is a set of five geographical zones that represent the sub-sections of the smart building (e.g.departments or sections in the enterprise campus).Each zone is equipped with six IoT nodes.All the functions and processor types exist in each zone.The virtual node requests an embedding location in one of these five zones.-The IoT nodes processing capability is uniformly distributed among five processing capacities (8, 16, 16, 25, 25, 48 MHz) representing microcontrollers as shown in Table 1.Each virtual node has a specific processing demand that varies between 4 and 30 MHz. -Each IoT node contains wireless transceiver modules [47].The network modules used are low cost, low power, and are compatible with the ZigBee protocol stack for IoT networks [44].The traffic demands of the virtual links vary from 50 to 200 packets per second with a packet size of 1 kb.
We study the embedding of 12 BPs arriving sequentially, two at a time.Each BP has three virtual nodes (sensor, controller and actuator) connected sequentially.The sensor is connected to the controller and the controller is connected to the actuator.The sensor virtual node requests a specific sensing function, the control virtual node requires processing capacity and the actuator virtual node requests a specific actuating function.The sensor and actuator virtual nodes of a BP need to be embedded in a specific zone while the controller virtual node can be embedded into any geographical zone.
Table 1: Processing modules power specifications and power consumption in active mode We evaluate the power consumption and traffic mean latency resulting from embedding the BPs using the MILP model considering the three objective functions.

A. Energy efficient service embedding
In this section, we evaluate the results of embedding BPs in terms of power consumption and traffic mean latency under three scenarios.In the first scenario, referred to as energy-latency unaware service embedding (ELUSE), BPs are embedded in physical nodes and links that satisfy their requirements where objective function's goal is to ensure that all requests for embedding are met.
In the second and third scenarios, the objective is to minimise the total power consumption.However, in the second scenario, referred to as re-provisioning, each time a new BPs arrives, previously embedded BPs are re-embedded while in the third scenario, referred to as sequential embedding, arriving BPs are embedded without interrupting the existing BPs.We also study the coexistence constraints of the embedding and their effects on the results of the energy efficient service embedding.

1) Service embedding on same geographical zone
In this subsection, we considered that the sensor and actuator nodes of a BP need to be embedded in the same specific geographical zone.We also study embedding BPs with and without coexistence constraints.Under coexistence constrains, the virtual nodes of the BP cannot coexist in the same IoT node.
The goal here is to improve the resilience of the BPs under single node failure.Figure 5 shows the total power consumption of embedding BPs in which the sensing and actuating nodes are to be embedded in the same zone.The results show that the energy efficient re-provisioning embedding scenario resulted in saving an average of 63% of the power consumption compared to the ELUSE scenario.Under energy efficient embedding, fewer IoT nodes and links are activated to embed BPs compared to embedding under the ELUSE scenario.As no coexistence constraints apply, all the virtual nodes of a BP can be embedded in a single IoT node confining the virtual links traffic within this node and reducing the number of activated IoT nodes.The saving achieved by the energy efficient embedding decreases to 58% under the sequential scenario as the sequential approach builds on existing embedding decisions that become suboptimal with the arrival of new BPs.The optimal use of resources under the re-provisioning scenario resources resulted in successfully embedding 12 BPs while only 8 BPs were successfully embedded under sequential embedding.Note that the power savings decrease as the number of embedded BPs increases.This is because the higher the load on the network the fewer the possible embedding solutions therefore narrowing the gap between energy efficient embedding and ELUSE.Figure 6 shows the power consumption of embedding BPs in the same zone under coexistence constraints.The coexistence constraints reduce the power savings achieved by the energy efficient embedding scenarios to 36% and 29% for re-provisioning and sequential embedding, respectively.This reduction in power savings is due to the need to activate more IoT nodes to meet the coexistence requirements and the traffic between these nodes.The results in figure 7 display the average traffic mean latency resulting from embedding BPs without coexistence constraint.The re-provisioning embedding and the sequential embedding have reduced the average traffic mean latency by 62% and 60% respectively compared with ELUSE scenario.This is because energy efficient embedding selects routes of minimum hops and consequently lower traffic mean latency compared to random routing in ELUSE.However, energy efficient embedding does not produce the minimum traffic mean latency as energy efficient embedding tries to highly utilise the activated IoT nodes resulting in high traffic mean latency in these nodes.Similar trends to those in figure 7 are observed in figure 8 for the average traffic mean latency resulting from embedding with coexistence constraints.The results show that the re-provisional embedding and the sequential embedding have reduced the average traffic mean latency by 27% compared with the ELUSE scenario.Comparing figure 7 and 8 shows that embedding BP on the same zone with coexistence constraint results in higher traffic mean latency compared to embedding without coexistence constraint.This is because without the coexistence constraint, the traffic of a BP can experience no traffic latency by embedding all the virtual nodes of the BP in a single IoT node.

2) Service embedding across geographical zone
The previous results evaluated the power consumption and mean latency of embedding BPs where the sensor and actuator nodes need to be embedded in the same geographical zone.In this section we examine embedding BPs that require the sensor and actuator nodes to be embedded in distinct geographical zones.We study also the performance with and without coexistence constraints on the controller node.Under coexistence constrains, the controller cannot coexist in the same IoT node with the sensor or actuator node.Figure 9 displays the power consumption of embedding BPs across different geographical zones without coexistence constraint.The power savings achieved by energy efficient embedding under the re-provisioning scenario and the sequential scenario when embedding across different zones are lower than those achieved for same zone embedding in figure 6.This is because energy efficient embedding in the distinct zones cannot select to embed the sensor and actuator in the same node although coexistence constraints do not apply.The power savings achieved by the energy efficient embedding scenarios are 42% and 22% for re-provisioning and sequential scenarios, respectively.The less efficient use of resources in embedding across zones reduces the number of BPs that can be embedded under the sequential scenario to 6 BPs, while the re-provisioning embedding still succeeds to embed all the 12 BPs.Figure 10 summarises the power consumption results when embedding BP's into the physical IoT network with the coexistence constraint.The power savings achieved by the energy efficient embedding scenarios are reduced to 34% and 17% for re-provisioning and sequential cases, respectively.This reduction is due to embedding of virtual nodes of a BP in different IoT nodes as explained above.

B. Low latency service embedding in IoT networks
In this subsection, we evaluate the low traffic mean latency when embedding of BPs across different zones with and without the coexistence constraint and also assess the power consumption.Figure 13 shows that the re-provisioning low latency embedding resulted in reducing the traffic latency by an average of 47% compared to the ELUSE scenario.The low latency embedding model optimises the selection of IoT nodes and distributes the traffic so that the arrival rate at nodes and consequently the traffic latency is minimised.Under energy efficient embedding, fewer IoT nodes and links are activated to embed BPs compared to embedding under the ELUSE scenario.
The traffic latency reduction achieved by the energy efficient embedding decreases to 20% under the sequential scenario as the sequential approach builds on existing embedding decisions as explained in Section (A).The optimal use of resources under the re-provisioning scenario resulted in successfully embedding 12 BPs while only 6 BPs were successfully embedded under sequential embedding.The results in figure 15 show the power consumption resulting from low latency embedding across distinct zones without coexistence constraint.Distributing the traffic to reduce the delay increased the power consumption by 28% compared to the energy efficient re-provisioning embedding in figure 9 as more nodes are activated.However, compared to the ELUSE scenario the power consumption is reduced by 18% and 10% under low latency re-provisioning and low latency sequential embedding, respectively.
Figure 16: Power consumption of low latency service embedding across distinct zones with coexistence constraint.
Under the coexistence constraint in figure 16, the increase in power consumption resulting from low latency embedding compared to the energy efficient embedding increased the consumption by 20% compared to the energy efficient re-provisioning embedding in figure 10.However, compared to the ELUSE scenario the power consumption is reduced by 14% under low latency re-provisioning and sequential embedding.

C. Energy efficient-Low latency service embedding in IoT networks
Minimum power consumption is achieved by consolidating the embedding of virtual nodes in as few as possible energy efficient IoT nodes.On the other hand, minimum traffic mean latency is achieved by distributing the traffic into multiple paths to reduce the arrival rate at the individual IoT nodes.As explained in the previous section, the trade-off between minimising the power consumption and minimising the traffic mean latency is achieved through a multi-objective MILP model.We define a metric referred to as "embedding optimality" to compare the performance of the multi-objective embedding to single objective embedding.The embedding optimality is defined as follows:   7)).Note that the numerical value of power consumption and traffic latency are comparable, therefore the weight is used to prioritise traffic latency, while the other two weights in equation ( 7) are set to one.We obtain equal optimality for power savings and mean traffic latency of 91% at =30, i.e. this is the weight needed to achieve the trade-off.Figure 18 and 19 compare the power consumption and delay, respectively of the energy efficient-low latency service embedding scenario with to those of the energy efficient service embedding and low latency service embedding scenarios.Note that the low latency scenario increases the power consumption by 20% compared to the energy efficient scenario (figure 18) and the energy efficient scenario increases the traffic mean delay by 22% compared to the low latency scenario (figure 19).

D. Real time energy efficient service embedding heuristic
The flowchart of the RESE heuristic is shown in figure 20.The input to the heuristic is the IoT network topology and the BPs.The heuristic starts by sorting the IoT nodes according to the processing power efficiency in descending order and the BPs according to the processing demand of the controller node in ascending order.
The heuristic picks a BP form the ordered list and embeds its nodes one by one considering the IoT node with the highest energy efficiency that satisfies the embedding requirements in terms of function, zone and coexistence.By doing so the heuristic tries to consolidate virtual nodes into the most energy efficient IoT node that meets its demand before activating another IoT node.The available processing capacity of the IoT nodes is updated after the embedding of a virtual node and another virtual node of the BP is selected to be embedded.After embedding all the virtual nodes of a BP, the traffic between the virtual nodes is routed based on shortest path routing [48].This process is repeated for all BPs and the total power consumption (IoT nodes and network) and traffic mean latency resulting from embedding all the BPs are calculated.

E. Real time low latency service embedding heuristic
The RLSE heuristic reduces the traffic mean latency by setting a threshold on the node transmission capacity utilisation.When routing the traffic between virtual nodes of a BP, the heuristic does not exceed this threshold which grantees distributing the traffic over multiple links.The flowchart of the RLSE heuristic is given in figure 20.The threshold is set to 60% of the maximum node capacity.Different thresholds were examined and this threshold value was identified as the maximum threshold before the latency per node starts increasing fast.Figure 13 to 16 show that the performance of the RLSE heuristic approaches that of the sequential low latency MILP model for embedding across different zones.Table 3 summarises the average performance gap between the RLSE heuristic and the sequential model.Table3: Traffic mean latency gap between the RLSE heuristic and the sequential model.

SUMMARY
This paper has investigated the power consumption and traffic mean latency of service embedding in the IoT network for a smart building setting and has introduced a framework for their minimisation.The services to be embedded are represented by a virtual topology (virtual nodes and links) following a business processes workflow dictated by the SOA paradigm.We developed a MILP framework and a real-time heuristic to optimise the selection of IoT nodes to embed the virtual nodes; and to route the traffic between virtual nodes considering three different objective functions: (i) minimising the total power consumption, (ii) minimising traffic mean latency, (iii) minimising both total power consumption and traffic mean latency in multi-objective manner.
We considered embedding BPs where all the sensor and actuator nodes exist in the same geographical zone and also considered embedding across different zones.We also studied embedding with and without constraints on the coexistence of virtual nodes in the same IoT node.We used the MILP model to optimise the embedding in two scenarios: (i) re-provisioning scenario where each time a new BPs arrives, previously embedded BPs are re-embedded, (ii) sequential embedding where arriving BPs are embedded without interrupting the existing BPs.
In the energy efficient service embedding scenario, the re-provisioning scenario produces higher average power saving compared with the sequential embedding scenario.In the low latency service embedding scenario, re-provisional embedding reduced the average traffic mean latency compared with the sequential embedding scenario.The multi-objective optimisation shows that it is possible to optimise the embedding of BPs to achieve high optimality of 91% for both power savings and traffic latency.

f
Constraint(28) estimates the arrival traffic for each IoT node.f Constraint (29) is an arrival rate indicator of arrival rate for each IoT node Constraint(30) ensures that each IoT node has no more than one arrival rate indicator.

Figure 5 :
Figure 5: Power consumption of energy efficient service embedding in same zone without coexistence constraint.

Figure 6 :
Figure 6: Power consumption of energy efficient service embedding in the same zone with coexistence constraint.

Figure 7 :
Figure 7: Average traffic mean latency of energy efficient service embedding in same zone without coexistence constraint.

Figure 8 :
Figure 8: Average traffic mean latency of energy efficient service embedding in same zone with coexistence constraint

Figure 9 :
Figure 9: Power consumption of energy efficient service embedding across different zones without coexistence constraint.

Figure 10 :
Figure 10: Power consumption of energy efficient service embedding across different zones with coexistence constraint.

Figure 11 :
Figure 11: Average latency of energy efficient service embedding across different zones without coexistence constraint.The traffic mean latency resulting from embedding BPs across distinct zones without coexistence constraints are shown in figure 11.The re-provisioning and sequential embedding have reduced the average traffic mean latency by 32% and 15% compared with ELUSE scenario.

Figure 12 :
Figure 12: Average latency of energy efficient service embedding across different zones with coexistence constraint.

Figure 12
Figure 12 displays the traffic mean latency resulting from embedding BPs across distinct zones without coexistence constraints.The re-provisioning and sequential embedding have reduced the average traffic mean latency to 22% and 13% compared with ELUSE scenario.

Figure 13 :
Figure 13: Average traffic mean latency of low latency service embedding across different zones without coexistence constraint.

Figure 14 :
Figure 14: Average traffic mean latency of low latency service embedding across different zones with coexistence constraint.

Figure 14
Figure 14 displays the traffic mean latency of low latency BPs embedding across different zones with the coexistence constraint.Adding the coexistence constraint reduced the traffic latency achieved by the re-provisioning and sequential embedding to 34% and 19%, respectively compared to the ELUSE scenario as more traffic traverses the network due to the fact that multiple virtual nodes of the same BP cannot coexist on the same IoT node.

Figure 15 :
Figure 15: Power consumption of low latency service embedding across distinct zones without coexistence constraint.

Figure 17 :
Optimality of (a) power saving and (b) traffic mean latency of embedding in distinct zones with coexistence constraint.

Figure 17
Figure 17 displays the power saving (figure 17(a)) and traffic mean latency (figure 17(b)) average optimality of energy efficient-low

Figure 18 :
Figure 18: Power consumption of embedding in distinct zones with coexistence constraint.

Figure 19 :
Figure 19: Average traffic mean latency of embedding in distinct zones with coexistence constraint.
If the network module of IoT node is powered on, otherwise.Total processing power in the IoT network in mW.Total network power in the IoT network in mW.Total traffic mean latency in ms.
SetsSet of business processes (BPs) in the virtual layer Set of virtual nodes in each BP Set of neighbours of each virtual node in each BP P Set of IoT nodes in the physical layer Set of neighbours of IoT nodes F Set of functions supported by IoT nodes Z Set of zones in the IoT physical layer Set of arrival rates Set of traffic mean latency per arrival rate (j If the IoT node is located in zone , otherwise.Processing capability of the IoT node in MHz.Memory capability of the IoT node in kB.Distance between the neighbouring IoT node pair ( ) in meters.Idle processor power in each IoT node in mW.Maximum processor power consumption in each IoT node in mW.Idle network power consumption in each IoT node in mW.Energy per bit for each IoT link in mW/kbps.M Large number ( ).Link capacity for each IoT node in kbps.Transmit amplifier factor for each IoT link in mW/kbps/ .

No Yes Start Input incoming BP's and IoT network topology Sort IoT nodes in ascending order based on power efficiency Can the IoT node satisfy the demand of virtual node Is this the last virtual node in BP? Embed the Virtual Node of BP in to IoT node Select IoT node from the ordered list Update the remaining processing capacity Select BP from ordered list Select Virtual node of BP Is this the last BP? Yes Yes No No A Sort BP's in descending order based on processing demand of controller node Route the traffic between the embedded virtual node of the BP's based on shortest path routing Select two IoT nodes thus embedded virtual nodes as source and destination Update the node traffic capacity Calculate the total processing and network power consumption Is this the last BP? End Yes No
Figure9to 12 show that the performance of the RESE heuristic approaches that of the sequential energy efficient MILP model for embedding across different zones.Table2summarises the average performance gap between the RESE heuristic and the sequential model.

Table 2 :
Power consumption gap between the RLSE heuristic and the sequential model.