A Multi-Population Genetic Algorithm For Adaptive Qos-Aware Service Composition in Fog-Iot Healthcare Environment
A Multi-Population Genetic Algorithm For Adaptive Qos-Aware Service Composition in Fog-Iot Healthcare Environment
Abstract: The growth of Internet of Thing (IoT) implies the availability of a very large number of services which may be similar
or the same, managing the Quality of Service (QoS) helps to differentiate one service from another. The service composition
provides the ability to perform complex activities by combining the functionality of several services within a single process. Very
few works have presented an adaptive service composition solution managing QoS attributes, moreover in the field of healthcare,
which is one of the most difficult and delicate as it concerns the precious human life.In this paper, we will present an adaptive
QoS-Aware Service Composition Approach (P-MPGA) based on multi-population genetic algorithm in Fog-IoT healthcare
environment. To enhance Cloud-IoT architecture, we introduce a Fog-IoT 5-layared architecture. Secondly, we implement a
QoS-Aware Multi-Population Genetic Algorithm (P-MPGA), we considered 12 QoS dimensions, i.e., Availability (A), Cost (C),
Documentation (D), Location (L), Memory Resources (M), Precision (P), Reliability (R), Response time (Rt), Reputation (Rp),
Security (S), Service Classification (Sc), Success rate (Sr), Throughput (T). Our P-MPGA algorithm implements a smart selection
method which allows us to select the right service. Also, P-MPGA implements a monitoring system that monitors services to
manage dynamic change of IoT environments. Experimental results show the excellent results of P-MPGA in terms of execution
time, average fitness values and execution time / best fitness value ratio despite the increase in population. P-MPGA can quickly
achieve a composite service satisfying user’s QoS needs, which makes it suitable for a large scale IoT environment.
Keywords: IoT, service composition, adaptability, context; QoS, Fog-IoT computing, Healthcare.
lives around the world due to the backlog in healthcare service failure making the system adaptative and a
emergency services (traffic problem, location, etc.,). potential candidate for IoT environments where
The adaptability will play a very important role in this frequent service failures are observed, however, the
dynamic IoT environment where a large number of latency due to the events managing increases linearly
volatile services are available, it will provide the with the increase in the number of sensors. Also, there
possibility for the application (or composite service) to is no managing of QoS and their monitoring system only
constantly change in order to meet new contextual reports hardware failures and does not detect incorrect
constraints. sensor data or software failures.
Adaptation is important in IoT service composition, In [33], a QoS-Aware Selection of IoT services is
but to produce an optimal solution for any service proposed for Electro Cardio Graphy (ECG) monitoring
composition a Quality of Service (QoS) management system. The authors considered IoT framework as a
must be done. QoS attributes allow us to do the composition of three major components: things,
difference between each IoT services, so it’s essential to computing, and communication, QoS attributes are
evaluate them to avoid poor quality service associated with each of the three components. The
composition. Many different IoT architectures have selection framework evaluates the relative importance
been proposed and the IoT-Cloud architecture was the of the QoS criteria to rank the IoT services. However,
most piratical method, but as the number of devices only the selection part of service composition was
using the cloud grows, more problems appear. In our presented, no adaptability framework was illustrated.
study case, the most of data must be processed in real Outside the healthcare field, other adaptive
time, this is due to the fact that most services do not have approaches have been proposed in [6, 12, 16, 19, 20, 21,
enough memory to keep all the collected data or they 37, 38, 39, 41].
have to make the decision themselves (low unit of In [38], a novel Petri net-based service composition
calculation). These problems encountered by the Cloud- algorithm has been proposed. To manage dynamic
IoT computing led to the development of the Fog-IoT change of the environments, the authors proposed a
architecture, the Fog represents a mediator between the monitoring algorithm to monitor the IoT system in a
IoT services and the cloud [1]. The Fog-IoT architecture cheapest way. A QoS evaluation is used, but only
was mainly introduced to enhance the architecture of concern three quality properties, i.e., reliability,
Cloud-IoT systems [30] and it represents a response time and cost. Experimental results have
decentralisation of Cloud-IoT for getting the better of proved the soundness and correctness of the algorithms
Cloud-IoT architecture obstacles. but there was no evaluation in real-world service system
Considering factors such as QoS attributes, the in IoT.
selection of IoT services for service composition is In [20, 39], a middleware approach for IoT service
reduced to a multi-objective optimization problem. The composition has been proposed. The authors use a
optimization is to made use of the resource in most monitoring system with only a few surveillance
efficient way. It means maximising or minimising some resources to monitor and ensure operations and the
attribute through an objective function [17], Heuristic robustness of the system. Each component service is
algorithms such as Genetic Algorithm (GA), Ant represented by an agent, which is responsible for
Colony Optimization (ACO), and Particle Swarm maintaining the QoS information (price, time,
Optimization (PSO) are adopted to find the optimal reliability, reputation degree, availability) of each
composition of the IoT service. service. Experiments evaluated the correctness and
According to our study entitled (Service composition robustness of the models and algorithms, but there was
approaches for internet of things: a review) [5], where no evaluation in real-world service system in IoT.
we evaluated the most popular service composition In [21], a probabilistic service composition approach
approaches in the IoT based on several criteria, we have has been proposed. To monitor the system and make this
seen that very few works have presented an adaptive approach adaptative, the authors use alternative
service composition solution managing QoS attributes, candidate in case of failure (when the probability of
moreover in the field of healthcare, which is one of the success of the selected service is not very high). Also,
most difficult and delicate as it concerns the precious during the service selection, the Authors describe and
human life. analyse QoS attributes (reliability and cost). However,
In Dar et al. [10, 9], an adaptive service composition this approach is centralized and does not deal with the
has been proposed for an Assisted Living System (ALS) constraint of real time.
[25], the system is supposed to support people with In [19], an adaptive approach for service composition
chronic illness or those who need it for constant medical in IoT has been proposed. The proposed selection
monitoring (e.g., the elderly) so that they can continue mechanism is based on an optimization technique to
to live independently at home. The proposed detect situations where certain compositional
architecture uses an event management mechanism to requirements are not met or certain services become
propagate the context information of IoT devices, a unavailable or when failures/ exceptions occur. This
dynamic service replacement function is used in case of method tries to reduce the need for human intervention
466 The International Arab Journal of Information Technology, Vol. 18, No. 3A, Special Issue 2021
in reconfiguration of the composition. However, the layared architecture implemented on a Fog-IoT system.
monitoring system is centralized and use a list of We believe that this important aspect of service
unavailable services. The author also manages some selection and architecture framework should be
QoS attributes (response time, reliability, availability, necessarily defined before designing a service
location, battery level and reputation) but it’s extremely composition algorithm.
demanding and demands an intensive computing. Here in this paper, we have identified few more QoS
In [12], an adaptative service composition approach attributes that describes service selection along with
for IoT is proposed. The generation of the composition those in the previous work. Like in our previous work
scheme is partially achieved at runtime using abstract [4], our main objective is to propose an approach for the
services provided at design time, this allows flexibility adaptive composition of services, user-centric, which
and adaptability without having to build a service mix adapts to the different situations in the IoT environment
from scratch. However, no monitoring system for and most importantly, this approach can handle our
identification and resolution has been proposed. Also, ambulance emergency study case. Hence, the major
no specific QoS management was cited in this work. contribution of this work, which makes it novel, can be
In [37], an event-aware service composition summarized as follows:
approach for IoT is proposed. The authors present a
1. Considering factors such as QoS attributes, the
monitoring system with an override mechanism based
selection of IoT services for service composition is
on an event strategy, in this approach, changes detection
reduced to a multi-objective optimization problem,
is made at the discovery level to save more time and
thus; to solve this problem, a Parallel Multi-
energy during selection and to ensure that the services
Population Genetic Algorithm (P-MPGA) is
will run successfully, some changes may occur at run
proposed.
time. Bayesian learning is used to update dynamic QoS
2. P-MPGA algorithm implements a smart selection
(availability, response time and response time) and
method which allows us to select the right service.
automatic service re-composition in case of a service
3. P-MPGA also implements a monitoring system that
failure. However, there was no evaluation in real-world
monitors services to manage dynamic change of IoT
service system in IoT.
environments.
In [6], an adaptive service composition approach for
4. Lastly, experimental evaluation is done to verify the
IoT is proposed. The approach effectively manages
robustness of the proposed framework by comparing
services changes during runtime, an adaptation is
it to the traditional GA [35] and the Genetic
performed as soon as possible and in parallel with the
Algorithm (MGA) proposed in [22].
execution process, thus reducing downtime, increasing
the chances of successful recovery and providing the The remainder of this paper is organized as follows: in
most optimal solution based on the current state of the section 2 we presented our layered architecture based on
environment. However, no specific QoS management the Fog-IoT concept, the QoS model used, and the P-
was cited in this current version of this work. MPGA solving algorithm respectively. Section 3
In [16], novel multi-objective service composition analyses and discusses the experimental results. Finally,
for IoT is proposed. The authors instead of optimization conclusions and future work are given in section 4.
a single object, they take maximization of QoS and
minimization of cost as two objects. To solve this 2. System Model
complex optimization problem, a multi-objective
artificial bee colony algorithm is used. However, the In this section, we present our five-layered architecture
proposed method is designed for the cloud services based on the Fog-IoT concept, the QoS model used, and
composition, and no adaptability framework was the P-MPGA solving algorithm.
illustrated.
In [41], a hybrid service selection method for IoT was 2.1. System Five-Layered Architecture
proposed. The authors use optimization approach and There is no single and general agreement on IoT
QoS attributes to find the best candidate service, the IoT architecture that is agreed in the research world [7].
service selection problem is transformed into a single- Many different architectures have been proposed and
objective optimization problem adopting a simple according to some researchers the IoT architecture has
weighting method. Experimental shows that the three layers [24, 29, 40], but some researchers favour
proposed algorithm can satisfy user’s needs, however, the four-layer architecture [11]. The authors believe that
energy consumption is not considered in the service due to the development of IoT, the three-layer
selection and no adaptability framework was illustrated. architecture is basic and cannot meet application
In comparison with the above works, in our previous requirements.
work [4], we identified some QoS attributes associated The four-layer architecture has played an important
with IoT components that best quantifies and analyses role in the development of IoT, but due to another
the services offered by the IoT’s service providers. Also, challenge in IoT regarding security and privacy, the
IoT-cloud architecture problems led us to use the 5- five-layer architecture [23, 31] has also been proposed.
A Multi-Population Genetic Algorithm for Adaptive QoS-Aware Service Composition in Fog-IoT... 467
This architecture has three layers like the previous gathered, appropriate action is taken. It is not required
architectures whose names are perception layer, that the action always be performed using this
transport layer and application layer. It also has two information, but we can also remotely manage and
additional layers. The names of these new proposed control objects and machines and use the information to
layers are Processing layer and Business layer. It is keep records for future use.
considered that this architecture has the ability to meet
the requirements of IoT, it also has the ability to secure Business
IoT applications. Below are the 5 layers of this Application
architecture:
Processing
1. “Business” layer: Manages the entire system,
Transport
including applications as well as user privacy.
(Management & monitoring) Perception
2. Application: Responsible for providing services
specific to the application for the user (Interface). Cloud (All processing is
3. Processing: Store, analyse and process the huge done here: Storage, Data
amount of data using databases etc... according to processing, Monitoring
…)
user requirements.
4. Transport: Transfer of sensor data between the
different layers via networks such as wireless, 3G,
LAN, Bluetooth, RFid and NFC Sensors
5. Perception: Detect and collect information on the
Figure 2. The relation between processing layer and the cloud.
environment (by sensors)
The hierarchy of all proposed layer architectures of the The IoT-Cloud architecture is a practical method for
Internet of Things (IoT) is illustrated in Figure 1, which a few devices. But as the number of devices using the
shows the IoT layer architectures consisting of three cloud grows, so does the use of its bandwidth, latency,
layers, four layers and five layers respectively. We and that also involves:
also consider that this 5-layer architecture can meet the • Don't fit in systems that must receive immediate and
requirements of IoT and satisfy a maximum of the real-time actions.
criteria cited in our study entitled “Service composition • There will be latency during data transfers.
approaches for internet of things: a review” [5]. • Risk of overloading the Cloud (number of growing
objects...).
Architecture of IoT
• Requires a high bandwidth (too much data to
transmit).
3 layers 4 layers 5 layers • Requires always to be connected to the internet.
Application Application Business • Cloud security issue (Privacy).
• Problem of scalability.
Network Network Application
The problems encountered by the IoT-Cloud
Perception Support
Processing architecture led to the development of the fog to
overcome these obstacles in the best possible way [25].
Perception Transport
Fog computing is a layer that resides between the cloud
Perception service and local devices. Fog nodes will be distributed
geographically to provide services to their required local
Figure 1. IoT layered architectures. devices. Each node will be able to perform calculation
tasks and will be able to provide services related to the
In our work we are most interested in the processing data collected in the area under their control. In
layer, this layer is also called the middleware layer. It summary, Fog Computing represents a decentralization
collects the information sent from the transport layer, of cloud computing Figure 2.
performing processing on the collected information. It’s As we said in section 1, the healthcare field is one of
responsible for removing extra information that doesn't the most difficult and delicate because it concerns the
make sense and extracts useful information. However, it lives of people. IoT with Cloud Computing has
also removes the problem of big data in IoT, or a large improved the quality of life for patients; however, this
amount of information is received, which can affect the architecture is often too reductive and unsuitable for
performance of IoT. many emerging healthcare applications with critical
In general, information is sent from local storage to requirements. Fog Computing may be the solution to the
cloud storage where all objects send the collected problem [26], it allows low and predictable response
information Figure 2. Finally, using the information times, which can often mean the difference between life
468 The International Arab Journal of Information Technology, Vol. 18, No. 3A, Special Issue 2021
and death for patients; it ensures that at least the most world, so the geographic location information of devices
critical part of the overall service is always available to affects user satisfaction, without forgetting that this
the patient, also in the presence of hostile environments dynamic environment, which affects the availability of
with intermittent or no network connectivity to the these services [5]. Providing an acceptable level of QoS
Cloud; it protects sensitive health-related data by storing is an important issue in Fog-IoT [14] and for service
it locally rather than sending it to the cloud via the selection of Fog-IoT-based healthcare system, we have
internet. taken twelve QoS attributes that have the most impact
The use of Fog computing and the defragmentation on this study case, and these attributes can be modelled
of the Transport layer in 4 sub-layers (security, storage, as follows:
pre-processing and monitoring) as shown in Figure 3
1. Availability (A): it is a percentage of time, and
allows us to have the following advantages:
indicates when the service is available.
Work directly on local networks so it's faster (low 2. Cost (C): The cost that the user needs to pay for
latency). acquisition of the service.
No need to consult the cloud and be connected to the 3. Documentation (D): Measure of documentation (i.e.,
internet. description tags)
Real-time interactions (almost). 4. Location/Range (L): The distance between the
Mobility. service and the destination specified by user.
Distribution and decentralization. 5. Precision (P): The ability of the sensors to measure
Localization. the deviation obtained in the output when the same
Security (Reduce the risk of attacks). signal or data is measured repeatedly under similar
condition [8].
System Smart and efficient (effective).
6. Reliability (R): The rate of that a service request is
Only necessary information is sent to the Cloud for
completed successfully.
analysis. 7. Response time (Rt): The average time between when
submitting a request from the user and accepting the
CLOUD
service response.
Storage + 8. Reputation (Rp): The average score of multi-
analytics evaluation of the service by the use of any scoring
system.
Transport layer
9. Security (S): Represents the security level ensured by
FOG a service (authentication, encryption, etc.). Security
(Pre- FOG Security
Processing) allows protecting users against illegal forbidden
access [15].
Storage
Smart 10. Service Classification (SC): The service
gateway classification represents various levels of service
SENSORS SENSORS Pre-Processing
offering qualities. There are four service
Monitoring classifications: Platinum (High quality), Gold, Silver
Perception layer and Bronze (Low quality)
11. Success Rate (SR): Amount of response / number of
request messages (%)
IoT objects
12. Throughput (T): Total Number of invocations for a
Figure 3. Cloud-Fog-IoT architecture. given period of time (invokes/second).
The difference of QoS performance between each IoT
2.2. QoS Model
information service is the key to service selection and
Each object in the IoT can provide a number of specific composition, so it’s essential to make a quantitative
services. Some IoT services may be similar or the same. evaluation to the QoS performance of each service [18].
However, QoS performance may be different from each We assume that a composite service consists of (n)
other. Therefore, assessing the QoS helps to abstract services, denoted as: CS= {S1, S2,..., Sn}. For
differentiate one service from another. Thus, it helps the each abstract service Si, it owns several candidate
service requesters in recognizing the best IoT service for concrete services, denoted as: Si= {Si1, Si2,..., Sim} (m
its application. represents the number of candidate services of Si).
To address IoT services separately, the exploration of There are four structural models in service composition
this three IoT’s components; the thing, the Figure 4, i.e.,:
communication and the compute is needed, with their
1. Sequence.
respective quality-of-service metrics [32]. The key
2. Parallel.
attributes of QoS on the IoT can be dynamic or static
3. Loop.
[36]. Services in the IoT are linked to the physical
A Multi-Population Genetic Algorithm for Adaptive QoS-Aware Service Composition in Fog-IoT... 469
𝑛 𝑛 𝑛 𝑛
𝒇𝟐 Cost (C) 𝐶𝑐𝑠 = ∑ 𝑐𝑖𝑗 𝐶𝑐𝑠 = ∑ 𝑐𝑖𝑗 𝐶𝑐𝑠 = ∑ 𝑐𝑖𝑗 𝐶𝑐𝑠 = ∑ 𝑝𝑖𝑗 ∗ 𝑐𝑖𝑗
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑛 𝑛 𝑛 𝑛
Documentation 𝐷𝑐𝑠 = ∏ 𝐷𝑖𝑗 𝐷𝑐𝑠 = ∏ 𝐷𝑖𝑗 𝐷𝑐𝑠 = ∏ 𝐷𝑖𝑗 𝐷𝑐𝑠 = ∏ 𝑝𝑖𝑗 ∗ 𝐷𝑖𝑗
𝒇𝟑
(D)
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑛 𝑛 𝑛 𝑛
Location (L) 𝐿𝑐𝑠 = ∑ 𝐿𝑖𝑗 𝐿𝑐𝑠 = ∑ 𝐿𝑖𝑗 𝐿𝑐𝑠 = ∑ 𝐿𝑖𝑗 𝐿𝑐𝑠 = ∑ 𝑝𝑖𝑗 ∗ 𝐿𝑖𝑗
𝒇𝟒
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑛 𝑛 𝑛 𝑛
Precision (P) 𝑃𝑐𝑠 = ∏ 𝑃𝑖𝑗 𝑃𝑐𝑠 = ∏ 𝑃𝑖𝑗 𝑃𝑐𝑠 = ∏ 𝑃𝑖𝑗 𝑃𝑐𝑠 = ∏ 𝑝𝑖𝑗 ∗ 𝑃𝑖𝑗
𝒇𝟓
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑛 𝑛 𝑛 𝑛
𝒇𝟗 Security (S) S𝑐𝑠 = min(S𝑖𝑗 ) S𝑐𝑠 = min(S𝑖𝑗 ) S𝑐𝑠 = min(S𝑖𝑗 ) S𝑐𝑠 = min(S𝑖𝑗 )
𝑛 𝑆𝑐𝑐𝑠 𝑛 𝑛
𝑛
𝒇𝟏𝟎 Service 𝑆𝑐𝑐𝑠 = ∏ 𝑆𝑐𝑖𝑗 𝑆𝑐𝑐𝑠 = ∏ 𝑆𝑐𝑖𝑗 𝑆𝑐𝑐𝑠 = ∏ 𝑝𝑖𝑗 ∗ 𝑆𝑐𝑖𝑗
= ∏ 𝑆𝑐𝑖𝑗
Classification (Sc) 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑛 𝑆𝑟𝑐𝑠 𝑛 𝑛
𝑛
𝒇𝟏𝟏 Success rate (Sr) 𝑆𝑟𝑐𝑠 = ∏ 𝑆𝑟𝑖𝑗 𝑆𝑟𝑐𝑠 = ∏ 𝑆𝑟𝑖𝑗 𝑆𝑟𝑐𝑠 = ∏ 𝑝𝑖𝑗 ∗ 𝑆𝑟𝑖𝑗
= ∏ 𝑆𝑟𝑖𝑗
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
𝑛 𝑛 𝑛 𝑛
𝒇𝟏𝟐 Throughput (T) 𝑇𝑐𝑠 = ∏ 𝑃𝑖𝑗 𝑇𝑐𝑠 = ∏ 𝑇𝑖𝑗 𝑇𝑐𝑠 = ∏ 𝑇𝑖𝑗 𝑇𝑐𝑠 = ∏ 𝑝𝑖𝑗 ∗ 𝑇𝑖𝑗
𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖 𝑖=1 ∆ 𝑆𝑖𝑗 ∈𝑆𝑖
such as f is fitness value, and 𝑛 is population size Step 1 for each (𝑝𝑗 )
for each individual, we calculate 𝜑(𝑥𝑖 ), Step 2 If (𝑝𝑗 ) is not safe
𝑆𝑜𝑚 = ∑𝑛𝑖=1 𝜑𝑖 Step 2 Replace (𝑝𝑗 ) with another service picked up from same
(𝑆𝑐𝑖 )
r is a real: 0 <r <Som; S=0; while (S < r) Step 3 End
S=S+ 𝜑(𝑥𝑖 ) ; x=x+1; end (4) Step 4 End
The individual who has been chosen several times, has Algorithm 3: our improved selection algorithm (improved_select)
the chance to participate in the following population or Input Population (𝑃𝑖 )
to the one-point crossover, it has the same principle as Output Population (𝑃𝑖 ) with all roulette wheel value
the casino Biased Roulette Wheel, this one-point calculated for each individual
crossover with the respect of these two rules (5) will //P The population of current generation
// x Individual of (𝑃𝒊 )
guarantee us the selection of the right service. Step 1 for each individual
Offspring_1=begin_father+end_mother Step 2 calculate 𝜑(𝑥𝑖 ) using (3)
(5) Step 2 Monitoring (𝑥𝑖 )
Offspring_2=begin_mother+end_father
Step 3 End
Random mutation has been applied to maintain diversity Step 4 calculate Som using (4)
of the individuals, by changing the values of the Step 5 r =random (0, Som)
Step 6 S=0
randomly selected, the selected service must be in the Step 7 while (S < r)
same service class as the one changed. Also, Step 8 S=S+ 𝜑(𝑥𝑖 )
amonitoring method is used to monitor each point Step 9 x=x+1
(gene) of each chromosome, each point (gene) Step 10 end
represents a given service, if a service become Step 11 Migrate best individual ()
unavailable or when failures / exceptions occur, this Algorithm 4: our improved crossover algorithm
service is instantly replaced with another one of his (improved_crossover)
service class. This will allow us to recover from the Input Population (𝑃𝒊 )
unexpected situation so that the application continues its Output 2 new individuals
execution without no interruption. To save time of //P The population of current generation
execution, the idea is to exploit the loops like the fitness // x Individual of (𝑃𝒊 )
function one for example. //po The one point
// x_father Individual father for the crossover
Algorithm 1: our multi-population genetic algorithm (P-MPGA) // x_mother Individual mother for the crossover
Input Available IoT services //b_father The begin of the father according to po
Output An approximately optimal chromosome //e_father The end of the father according to po
//GP Global population //b_mother The begin of the mother according to po
//P The population of current generation //e_mother The end of the mother according to po
//N The number of individuals (global) //os_1 Offspring 1
//m The number of sub-populations //os_2 Offspring 2
//n The number of individuals of each sub-population Step 1 Choose the two-best induvial for
//t The number of current generations x_father&x_mather respectively
//T The maximum number of generations Step 2 Choose a random one point
//𝑝𝑚 , 𝑝𝑐 The probability of mutation and crossover Step 3 os_1= b_father + e_mother
Step 1 Divide (GP) to sub-population (m) according to Step 4 os_2=b_mother + e_father
(N)
Step 2 initialise each population randomly Algorithm 5: our improved mutation algorithm
Step 3 t=0 (improved_mutation)
Step 4 for i = 1 to m in parallel Input Individual (𝑥𝑖 )
Step 5 while (t<=T) and not ‘stopping criterion’ do Output Individual (𝑥𝑖 ) with a mutation for the new
Step 6 Fitness (𝑃𝑖 ) using (2) generation
Step 7 Sort (𝑃𝑖 ) //p The random point (gene) for the mutation
Step 8 Improved_Select(𝑃𝒊 ) //Sc Service class of (𝑥𝑖 )
Step 9 Improved_Crossover(𝑃𝒊 ) according to 𝑝𝑐 // x_service New service from (𝑆𝑐𝑖 )
Step 10 Improved_Mutation(𝑃𝒊 ) according to 𝑝𝑚 Step 1 po = random (1,7)
Step 11 t = t+1 Step 2 x_service= service picked up from (𝑆𝑐𝑖 )
Step 12 end while Step 3 Replace p with x_service
Step 13 end for
Algorithm 2: our Monitoring algorithm 3. Experimental Setup and Evaluation
Input Individual (𝑥𝑖 ) In this section, we evaluate our propped Multi- (P-
Output A safe Individual (𝑥𝑖 ) MPGA)(Algorithm 1) by comparing it to the traditional
//p A point of (𝑝𝑗 ) or the gene (GA) [35] and the (MGA) proposed in [22]. We run P-
//Sc Service class
472 The International Arab Journal of Information Technology, Vol. 18, No. 3A, Special Issue 2021
200 000.00
service composition approach based on multi-
180 000.00 population genetic algorithm in Fog-IoT healthcare
Execution time (ms)
0.518000
Yassmine Hammamet, Yassmine Hammamet, pp.
0.516000 1-7, 2017.
[4] Aoudia I., Benharzallah S., Kahloul L., and Kazar
0.514000
O., “QoS-Aware Service Composition in Fog-Iot
0.512000 Computing Using Multi-Population Genetic
Algorithm,” The International Arab Conference
0.510000
5000 10000 15000 20000 25000
on Information Technology, 6th of October City,
pp. 1-9, 2020.
Number of population
[5] Aoudia I., Benharzallah S., Kahloul L., and Kazar
Figure 10. Optimal fitness values obtained by P-MPGA according to O., “Service Composition Approaches for Internet
the number of populations. of Things : A Review,” International Journal of
Communication Networks and Distributed
4. Conclusions and Perspectives Systemsm, vol. 23, no. 2, pp.194-230,2019.
In this paper, we presented an adaptive QoS-aware [6] Barakat L., Miles S., and Luck M., “Adaptive
474 The International Arab Journal of Information Technology, Vol. 18, No. 3A, Special Issue 2021
Composition in Dynamic Service Environments,” for The Composition of Complex Services in The
Future Generation Computer Systems, vol. 80, pp. Web of Objects,” IEEE World Forum on Internet
215-228, 2018. of Things, pp. 298-303, 2014.
[7] Burhan M., Rehman R., Khan B., and Kim B., [20] Li B., Yang R., and Hu Y., “An Experimental
“IoT Elements, Layered Architectures and Study for Intelligent Logistics: A Middleware
Security Issues: A Comprehensive Survey,” Approach,” Chinese Journal of Electronics, vol.
Sensors,vol. 18, no. pp. 2-37,2018. 25, no. 3, pp. 561-569, 2016.
[8] Chalmers D. and Sloman M., “A Survey of [21] Li L., JinZ., Li G., Zheng L., and Wei Q.,
Quality of Service in Mobile Computing “Modeling And Analyzing The Reliability and
Environments,” IEEE Communications Surveys Cost of Service Composition in The Iot: A
and Tutorials, vol. 2, no. 2, pp. 2-10, 1999. Probabilistic Approach,” in Proceedings IEEE
[9] Dar K., Taherkordi A., Baraki H., Eliassen F., and 19th International Conference on Web Services,
Geihs K., “A Resource Oriented Integration Honolulu, pp. 584-591, 2012.
Architecture for The Internet of Things: A [22] Li Q., Dou R., Chen F., and Nan G.,“A Qos-
Business Process Perspective,” Pervasive and Oriented Web Service Composition Approach
Mobile Computing, vol. 20, pp. 145-159, 2015. Based on Multi-Population Genetic Algorithm for
[10] Dar K., Taherkordi A., Rouvoy R., and Eliassen Internet of Things,” International Journal of
F., “Adaptable Service Composition for Very- Computational Intelligence Systems, vol. 7, no. 2,
Large-Scale Internet of Things Systems,” in pp. 26-34,2014.
Proceedings of the 8th Middleware Doctoral [23] Madakam S., Ramaswamy R., and Tripathi S.,
Symposium,New York, pp. 1-2, 2011. “Internet of Things (IoT): A Literature Review,”
[11] Darwish D., “Improved Layered Architecture for Journal of Computer and Communications, vol. 3,
Internet of Things,” International Journal of no. 5, pp. 164-173, 2015.
Computing Academic Research, vol. 4, no. 4, pp. [24] Mashal I., Alsaryrah O., Chung T., Yang C., Kuo
214-223, 2015. W., and Agrawal D., “Choices for Interaction
[12] Fki E., Tazi S., and Drira K., “Automated and With Things on Internet and Underlying Issues,”
Flexible Composition Based on Abstract Services Ad Hoc Networks, vol. 28, pp. 68-90, 2015.
for A Better Adaptation to User Intentions,” [25] NEXOF-RA. Deliverable D10.1: Requirements
Future Generation Computer Systems, vol. 68, pp. Report. IST-FP7-216446, 2009.
376-390, 2017. [26] Oteafy S. and Hassanein H., “Iot in The Fog: A
[13] Goldberg D., Genetic Algorithms in Search, Roadmap for Data-Centric Iot Development,”
Optimization, and Machine Learning, Choice IEEE Communications Magazine, vol. 56, no. 3,
Reviews Online, 1989. pp. 157-163, 2018.
[14] Haghi Kashani M., Rahmani A. and Jafari [27] Puliafito C., Mingozzi E., LongoF., Puliafito A.,
Navimipour, “Quality of Service-Aware and Rana O., “Fog Computing for The Internet of
Approaches in Fog Computing,” International Things: A Survey,” ACM Transactions on Internet
Journal of Communication Systems, vol. 33, no. 8, Technology, vol. 19, no. 2, pp. 1-41, 2019.
pp. 1-34, 2020. [28] Qiufen W. and Liang D., “A Heuristic Genetic
[15] Houhamdi Z. and Athamena B., “Identity Algorithm for Solving 0-1 Knapsack Problem,”
Identification and Management in The Internet of Computer Applications and Software,vol. 30, no.
Things,” The International Arab Journal of 2, pp. 33-37, 2013.
Information Technology, vol. 17, no. 4A, pp. 645- [29] Said O. and Masud M., “Towards Internet of
654,2020. Things: Survey and Future Vision,” International
[16] Huo Y., Qiu P., Zhai J., Fan D., and Peng H., Journal of Computer Networks, vol. 5, no. 1, pp.
“Multi-Objective Service Composition Model 1-17, 2013.
Based on Cost-Effective Optimization,” Applied [30] Sarha A., Fog Computing as Solution for IoT-
Intelligence, vol. 48, no. 3, pp. 651-669, 2018. Based Agricultural Applications, IGI Global,
[17] Kashyap N., Kumari A., and Chhikara R., 2021.
“Service Composition in IoT Using Genetic [31] Sethi P. and Sarangi S., “Internet of Things:
Algorithm and Particle Swarm Optimization,” Architectures, Protocols, and Applications,”
Open Computer Science, vol. 10, no. 1, pp. 56-64, Journal of Electrical and Computer Engineering,
2020. vol. 2017, pp. 1-25, 2017.
[18] Kashyap N. and Kumari C., “Hyper-Heuristic [32] Singh M. and Baranwal G., “Quality of Service
Approach for Service Composition in Internet of (Qos) in Internet Of Things,” in Proceedings 3rd
Things,” Electronic Government, vol. 14, no. 4, International Conference on Internet of Things:
pp. 321-339, 2018. Smart Innovation and Usages, Bhimtal, pp. 1-
[19] Kouicem A., Chibani A., Tari A., Amirat Y., and 6,2018.
Tari Z., “Dynamic Services Selection Approach [33] Singh M., Baranwal G., and Tripathi A., “QoS-
A Multi-Population Genetic Algorithm for Adaptive QoS-Aware Service Composition in Fog-IoT... 475