Web services are provided as reusable software components in the services-oriented architecture. More complicated composite services can be combined from these components to satisfy the user requirements represented as a workflow with specified Quality of Service (QoS) limitations. The workflow consists of tasks where many services can be considered for each task. Searching for optimal services combination and optimizing the overall QoS limitations is a Non-deterministic Polynomial (NP)-hard problem. This work focuses on the Web Service Composition (WSC) problem and proposes a new service composition algorithm based on the micro-bats behavior while hunting the prey. The proposed algorithm determines the optimal combination of the web services to satisfy the complex user needs. It also addresses the Bat Algorithm (BA) shortcomings, such as the tradeoff among exploration and exploitation searching mechanisms, local optima, and convergence rate. The proposed enhancement includes a developed cooperative and adaptive population initialization mechanism. An elitist mechanism is utilized to address the BA convergence rate. The tradeoff between exploration and exploitation is handled through a neighborhood search mechanism. Several benchmark datasets are selected to evaluate the proposed bat algorithm’s performance. The simulation results are estimated using the average fitness value, the standard deviation of the fitness value, and an average of the execution time and compared with four bat-inspired algorithms. It is observed from the simulation results that introduced enhancement obtains significant results.

Service-Oriented Architecture is a software architecture where compassable functional units, self–contained, and stateless services are utilized to build distributed systems with loosely-coupled styles [

In the WSC illustrated in _{ij} where i refers to the task serial number and j refers to the candidate web service to carry out the i^{th} task. The solution of the WSC is a concrete path of web services as vector WS_{1,X}, WS_{2,X’},…, WS_{n,X’’} where the vector dimension equals the number of tasks.

Each web service in the cloud is associated with non-functional constraints and functionality. Therefore, these constraints represent the preference criteria when selecting web services. The non-functional constraints could be QoS, semantic functional, energy consumption, etc. In this work, four QoS constraints are considered as follows:

Cost (C): represents the fee for using the service, and it is measured in any currency.

Response Time (RT): represents the time to send and receive the service request and response. It is measured in milliseconds.

Availability (A): represents the successful call to the total calls of services, measured in percentage.

Reliability (R): represents the ratio of the number of errors to the total number of messages of services. It is measured in percentage.

For optimizing the WSC problem, the QoS constraints values are aggregated into a single value to estimate the solution quality based on their objective value. The C and RT objective values are minimized, while the A and R objective values are maximized. The aggregation formulas of QoS constraints are illustrated in

QoS criteria | Aggregation formula |
---|---|

Cost (C) | |

Response time (RT) | |

Availability (A) | |

Reliability (R) |

Recently, nature-inspired algorithms have been widely adopted in service composition to search for optimal service composition. These algorithms are meta-heuristics that inspired the insects’ swarm intelligence behavior, such as ant colony optimization [

In this work, the contribution to addressing the BA shortcomings is given as:

The recent research reported on BA-inspired algorithms for the WSC problem is summarized in this section. To the best of our knowledge, few works are developed to address the WSC problem using BA, discussed below.

Boussalia et al. [

Recently, various researchers applied other swarm intelligence algorithms in the face of finding the best possible web services path. El Allali et al. [

The aforementioned bat-inspired algorithms have a limitation of guaranteeing the best web services path because of the stochastic behavior of the nature-inspired algorithms. In addition, the No-Lunch-Free theorem (NLF) [

BA is inspired by the microbats’ echolocation behavior, especially prey obstacle avoidance and detection [

First: initialize the pulse emission rate (

where t is a timestamp, α represents a user-specified variable between [0–1].

Second: The bats’ velocity (

where,

Third: The bats’ positions are updated using

where

The BA proposed improvements are presented in this section and shown in

The best initialization of the bats affects the search performance in future iterations, and the most used initialization approach is the random approach. To improve the performance of the proposed algorithm, an adaptive and cooperative initialization method is proposed based on the divide and conquer paradigm. In the proposed initialization method, the workflow is divided into sub workflows based on the number of tasks where each sub-workflow can be solved individually. Then these sub workflows solutions will be combined to obtain the final solution.

The Sub Workflows (SW) are obtained adaptively based on the size of the tasks in the workflow, as mentioned in

where n is the number of tasks, and P is the population size.

The population size is duplicated according to the number of the sub workflows where each population searches for a solution in the sub workflows sequentially. The sub-population sizes are obtained as mentioned in

where β is the number of population partitions.

Each subpopulation’s solution is computed using

where p represents a bat 1 ≤ p ≤ P; W_{x} are the client preferences regarding QoS limitations that are adopted in this work, and x refers to the QoS limitations, which include availability weight (W_{a}), reliability weight (Wr), cost weight (W_{c}), and response time weight (W_{rt}).

where f_{p} refers to the fitness value of bat p obtained from

In this work, the elitist strategy is inspired by [

In the elitist strategy, the iteration best solution (S_{Ibest}) can be defined as the best solution among all bats in each iteration (maximum value of iteration based fitness value f(t)). In contrast, the global best solution (S_{Gbest}) can be defined as the best solution among all bats in all iterations (maximum value of distance-based fitness value D(t)). The iteration best and global best solutions are obtained from the fitness values of the bats during a search for optimal solutions using

The S_{Ibest} and S_{Gbest} values are obtained using

The S_{Ibest} and S_{Gbest} values are compared with the fitness values of the following iterations. If the next fitness values are better than the current values, the S_{Ibest} and S_{Gbest} are updated using

The formulas mentioned above require modifying the bats’ basic formulas search, velocity, and frequency equations to attain a better tradeoff among searching mechanisms using

where i refer to i^{th} bat at iteration t.

An updated variant of the neighborhood search mechanism proposed in our previous works [

First: Check the improvement status in the current iteration; if there is no improvement, then continue to the neighborhood search procedure; else, terminate the neighborhood search procedure.

Second: A Random Number (RN) of neighborhood bats is selected in a case where 1 ≤ RN ≤ P.

Third: For each neighborhood bat, a mutation is applied where a randomly selected task in the workflow will be mutated with a task value from the iteration best solution.

The simulation results of the IBA are represented in this section. Since there are no standard datasets for WSC [

In this simulation, four bat-inspired algorithms are chosen for comparison purposes. These algorithms are the standard BA, Random Bat Algorithm (RBA) [

_{min} |
0 |

_{max} |
2 |

0.25 | |

0.5 |

The proposed algorithm is composed of three different improvement strategies (Initialization Cooperative (IC), Elitist Strategy (ES), and Neighborhood Search (NS)). This section will assess the effectiveness of these three improvements on the BA incrementally. To test the effectiveness of all improvement strategies, the three instances of the proposed algorithm were created and compared to BA. The three instances are IBA-IC (the proposed algorithm with the initialization cooperative method only), IBA-ES (the proposed algorithm with elitist strategy and initialization cooperative methods), and IBA (proposed algorithm with all improvement strategies). The experiments were done on all datasets with only one run and similar parameters mentioned above.

The elitist strategy was added to the IBA-IC and notated as IBA-ES. In the IBA-ES, the elitist strategy behavior is tested along with the initialization cooperative on the BA to see the improvement of ES. It can be seen from

Finally, the neighborhood search was added to the IBA-IC and IBA-ES and notated as IBA. NS aims to achieve a better tradeoff between exploration and exploitation of BA. The results show that the IBA performance is enhanced compared to the IBA-ES performance, and this is because of the proposed algorithm’s best balancing of exploration and exploitation ability.

The results above prove the applicability of the three proposed enhancements to improve BA performance. The first enhancement aims to enhance the search starting points and convergence speed; the second enhancement was proposed. The exploration and exploitation were enriched using the third enhancement to improve the performance.

To verify the stability of the IBA compared to other algorithms, the convergence speed of IBA was reached using 500 iterations in one run.

It is clearly seen that the IBA outperforms all competitors where it has a fast convergence rate. The figure also depicts that the IBA has the best initial value, which confirms the effectiveness of the IC method in improving the initialization process of the bats. Furthermore, the figure illustrates that the competitors suffer from local optima with a different level where their convergence rates have fluctuated. For example, the results on dataset 200 × 400 show that the RBA algorithm achieves better results than IBA; however, this achievement didn’t continue because it suffers from local optima after approximately iteration number 300, and IBA then overcomes it. The reasonable IBA convergence rate is because of the ES and NS mechanism’s collaboration, which helps IBA avoid the local optima and achieve better exploration and exploitation behavior.

In this subsection, the simulation results are discussed of the IBA, standard BA, and three bat-based algorithms of related works using the five large-scale datasets with 30 different runs and 500 maximum iterations. The results are evaluated the average fitness value, an average execution time, and the Standard Deviation (Std) of the fitness value.

100*200 | 200*400 | 300*600 | 400*800 | 500*1000 | ||
---|---|---|---|---|---|---|

BA | Mean | 483.19 | 734.26 | 930.87 | 1108.22 | 1250.07 |

Std | 18.45 | 38.51 | 28.18 | 32.13 | 35.75 | |

RBA | Mean | 485.10 | 731.83 | 919.21 | 1110.16 | 1293.46 |

Std | 24.83 | 28.84 | 24.45 | 39.68 | 30.15 | |

BA-WSC | Mean | 478.28 | 733.09 | 951.83 | 1126.43 | 1267.67 |

Std | 19.72 | 31.44 | 33.57 | 37.44 | 37.82 | |

SABA | Mean | 551.27 | 767.49 | 944.29 | 1130.06 | 1297.38 |

Std | 24.67 | 32.37 | 35.46 | 46.48 | 41.69 | |

IBA | Mean | 593.20 | 810.39 | 995.52 | 1239.25 | 1365.92 |

Std | 32.73 | 33.66 | 24.78 | 39.14 | 39.76 |

The abovementioned results depict, on average, that the IBA outperforms the standard BA and other competitors. Wilcoxon’s rank-sum statistical test is conducted to confirm the significance of IBA compared to the competitors in each independent run and evaluate the overall performance.

5 | 5 | 5 | 5 | |

0 | 0 | 0 | 0 | |

0 | 0 | 0 | 0 |

2 | 5 | 4 | 4 | |

2 | 0 | 1 | 1 | |

1 | 0 | 0 | 0 |

In this work, three improvements are proposed to improve the BA performance for the web service composition problem. The proposed improvements efficiently deal with BA’s population initialization, convergence speed, exploration, and exploitation balancing issues. A cooperative and adaptive population initialization mechanism is developed to resolve the population initialization problem. An elitist strategy is utilized to address the BA convergence rate. Furthermore, a neighborhood search mechanism is designed to achieve a better tradeoff between exploration and exploitation searching mechanisms. The IBA performance is tested using five large-scale datasets compared to the standard BA and three bat-based algorithms of related works. The IBA achieves better quality solutions results in average fitness value, standard deviation fitness value, and average execution time.

Furthermore, the effect of the three proposed improvements was investigated, and their applicability was proved. It is observed from the simulation results that introduced enhancement obtains significant results compared to four bat-inspired algorithms. In the future, we are planning to continue the investigation of using different nature-inspired algorithms to solve the WSC problem and their hybridization.

The author would like to express their gratitude to Prince Sattam bin Abdulaziz University, Al-Kharj 11942, Saudi Arabia for providing the support.