An Evolutionary Algorithmic Approach based Optimal Web Service Selection for Composition with Quality of Service

Problem statement: Web service is a technology that provides flexibili ty and interconnection between different distributed appli cations over the Internet and intranets. When a client request cannot be satisfied by any individua l service, existing web services can be combined in to a composite web service. When there are a large num ber of Web services available, it is not easy to find an execution path of Web services composition hat can satisfy the given request, since the searc h space for such a composition problem is in general exponentially increasing. Approach: In this study, we discuss and compare the two algorithms, Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) algorithm for solving this optimization probl em of optimal web service selection and composition . Results: The end results indicate PSO perform better over G A for single and multi user service selections. Conclusion: Inferences from the results indicate the service s el ctions from the registry of pooled services can be optimized with the usage of Optimization Algorithms like GA and PSO.


INTRODUCTION
Many companies are now using the Web as a platform to communicate with their partners.The level of usability is very high which lead to the success of web today (Teoh et al., 2009).The Web and its technologies allow them to provide Web services to individuals as well as other businesses.Web services technology is becoming a highly acceptance in all field (Amirian and Alesheikh, 2008).Web services are frequently used to build a distributed system which can be accessed over Internet.With more and more web services appearing on the web, web service's discovery mechanism becomes essential.It is loosely coupled to enhance productivity, simplify using, get reusability and improve system expansibility.The main challenges in the Web services paradigm are their discovery and their composition and providing an optimized QoS model (Deng and Xing, 2009).If the implementation of a web service's business login involves the invocation of other web services, it is necessary to combine the functionality of several web services.In this case, we speak of a composite service.The process of developing a composite service in turn is called service composition.In real world scenario the life span of a particular service may make a particular service unavailable.In such process of composition, selection of an appropriate web service from large numbers of available alternative services is the chief task.Web service selection should be such that the services that most accurately meet the requirements are selected which can be done based on the non-functional attributes of Quality of Service (QoS) attached to each service.It is always preferred to give services based on the expectation of the consumers (Yamin and Ramayah, 2011).Selection should be such that the overall QoS gets improved in the composite web service.In order to satisfy the multiple functional and non-functional constraints, suitable component services need to be selected for service Orchestration Process (Yu et al., 2008).At the outset designing a composite Web service has to be ensured not only correct and reliable execution, but also the delivery with optimal (Yu et al., 2008).
This study describes how Genetic Algorithm and Particle Swarm Optimization algorithm can be applied to the optimisation problem of optimal web service selection and compares the performance of both the algorithms as heuristics algorithm always performs better (Kangrang et al., 2009).The study is organized initially on the study few related works carried out in QoS mesurement and service selection.The Web Services Composition problem is worked on considering a Travel plan domain as an example.The research methodology is carried with two problems for QoS-based Service Selection.Initial problem is the Web Service selection based on Genetic algorithm and the same based on PSO algorithm is the second.discussions based on the results as a comparison between the two algorithms concludes the study.

Related works:
Web service can support the B2B trading life cycle (Saha, 2007).Business processses and interaction protocols are provided by Business Process Execution Language (Wang et al., 2011).It is also treated as objects for database management system (Yu et al., 2008).Web services composition is based on Quality of services.QoS of compound service is a key factor for satisfying the user's constraints and priorities.Works have been done in analyzing the change of individual QoS attribute based on accumulated historical data and predicting its value in the time periods (Li et al., 2009).
Dynamic web service composition requires user to discover service provider that satisfy given funcional and nonfunctional requirements (Menasce, 2002).Quality of Service broker based process model for Dynamic Web Service Composition (DWSC) is proposed by researchers.Several different composition strategies are present based on composition platform and framework (Dustdar and Schreiner, 2005).One of the platform for composing web services is web wide web (Chen et al., 2010).A QoS-aware Method for web service selection is presented by (Bian and Xincai, 2010).In few works various authors proposed algorithms which returns a composition of service from a repository with the optimal response time and throughput .The Travelling Salesman Problem (TSP) is which is also a polinomial time hard problem.Inferences can be drawn towards the web services selection problem from the approach of problem solving in TSP.An optimization approach is proposed for a Meta heuristic framework for the Qos -aware composition problem (Rosenberg et al., 2010).TQosdriven approach consists of a web service selection approach supporting transactional and quality driven WS composition (Hadad et al., 2010).
An ontalogy based approach on web service selections were also done by various.Works have been carried out so that Web Service compositions can be seen as workflows based on Web Services (Bhiri et al., 2006).This can be facilitated using the BPEL tools IBM Library, 2010.Since the servic selection is a combinatorial optimization problem and NP hard, evolutionary computation techniques are opted in similar approaches.

MATERIALS AND METHODS
The web services composition problem: Motivating example: Consider a travel plan domain in Fig. 1.These sets of activities are needed for a person who wants to travel from FREDERICTON to Chicago for an international conference.
The following lists the activities they proposed: • They have some free time on Thursday, so they plan for sight seeing on Thursday • Engage a guide for the travel The task is far from trivial as it involves many services, including the booking of flights, hotels and rental cars and it requires a lot of coordination among these services.The coordination of the services is the most difficult part of the task, because it has many options as well as many constraints.

Fig. 1: Travel activity flowchart
QoS modelling for concrete services: Since the meaning of QoS attributes is different by a variety of end-user factors, contextual circumstances as well as the perspective of interest.Each provider must unambiguously define its QoS model before delivering its QoS aware service.In the past few years, modelling QoS for web service has been a big concern for researchers (Ran, 2003).In this study, we consider four typical quality attributes: execution cost, response time, reliability and availability to model the extendable quality of web services (Hadad et al., 2010).
Thus for each individual web service, the QoS vector is given as: Computing the QoS of services composition: The aggregate QoS of web service composition depends on the QoS of its component services.BPEL4WS provides 4 control structures to compose service.They are sequence, flow (concurrence), switch (choice), while (loop).The aggregated rules of QoS are different for different control structures and different quality metrics.For example, the response time is sum measurement for sequence structure, while the response time of concurrence is the maximal value among its sub branches.The cost is the sum for both sequence and concurrence control structure, but it is multiple measurements for both reliability and availability.Each branch in choice structure is assigned to the probability to be chosen and the sum of all of branches is 1.Finally, a loop structure with k iterations of task t is equivalent to a sequence structure of k copies of t.
Fitness evaluation: A quality attribute matrix Q = (q i, j ; 1≤i≤n,1≤j≤ m) is built to record the quality information, in which each row corresponds to a web service while each column corresponds to a quality attribute.Some of the quality attributes could be negative, i.e., the higher the value, the lower the quality.Other attributes are positive, i.e., the higher the value, the higher the quality Eq. 1: The above formula (1) is used to compute the overall quality score for each web service.End users express their preferences regarding QoS by providing values for the weight w j .Suppose there are n tasks (t 1 , t 2 … t n ) in a composite service.For each task t i (1≤i≤n), there are l i candidate services that are available to which task t i can be assigned.The QoS-based service selection problem involved in service composition is, how to select one service for each involving task from its corresponding existing candidate service group, so that the overall QoS of the constructed composite service can be maximized.
The problem can be formulated as Eq.2: Where: where, F ij is the QoS score of the j th candidate service for the i th task in the composition.

Web service selection based on genetic algorithm:
Genetic Algorithms (GAs) (Goldberg, 1989) are search methods which were developed by John Holland and are based on the principles of natural selection (Osman et al., 2009) Genetic Algorithm is proposed as a search algorithm and has proven to be powerful in rapidly discovering good solutions for some difficult problems (Ismail and Irhamah, 2008) especially when the search space is large, complex and poorly understood.GA can be applied to the optimal service selection optimization problem (Yu and Lin, 2004).The basic steps involved are as follows.

Definition of chromosome:
We define Chromosome = [C1, C2… Cn], where n is the number of tasks involved in composite Web services.The Chromosome is used to represent every possible solution that meets user's request.In this solution string, every bit corresponds to a concrete service whose value is 0 or 1.If a concrete service is selected, then the value is 1, otherwise, the value is 0.

Fitness function:
In order to determine the quality or performance of each chromosome in the population, the GA associates a fitness measure with each solution string.Here we adopt the Qos optimization function defined in formula 1 as fitness function in GA.

Genetic operations:
Once the chromosomes are defined, we need to reproduce them by performing genetic operations.We use crossover, mutation as genetic operations and use a simple roulette wheel selection to choose the individual chromosome.Step 1: Initialize genetic parameters (the maximal number of iterations maxgen, probability of crossover pc, probability of mutation pm, probability of selection ps).
Step 2: Generate randomly an initial population of pop_size.
Step 3: While (certain termination criterion is not met) do { While applying Particle Swarm Optimization (PSO), each service that exists for accomplishing a specific task can be considered as a particle (Taher and Tabei, 2008).Several particles may exist forming a population.PSO can then be applied to find the best solution among the candidates to form an optimal composition.Li et al. (2011) propose to improve QoS in web services based on algebraic and physical perspectives to give a good service using PSO.Also in many problems that require meta-heuristic approach of solving PSO reduces the computational time significantly.

Encoding scheme:
The procedure of web service composition is modelled as a Services Composition Graph (SCG).In each service node, selecting suitable service from the candidates and all of the selected services are joined to form a service path.Each service path denotes a candidate of service composition scenario.
In the Fig. 2, φ(i) denotes the number of specific service which is chose in the i-th service node.After the evolution of one particle, new value of each dimension can re-construct a new particle, which denotes a different service selection scenario.

Fitness function:
In order to determine the quality or performance of each particle in the population, a fitness measure is associated with each solution string.For the problem of Web service selection, performance of every service selection solution is measured by its QoS attribute.
Here the QoS optimization function in formula 1 can be adopted as fitness functions in PSOWSS.
Particle updating: Supposed there is a service S id , which is the d-th specific service in i-th service selection scenario.According to the encoding scheme, the particle's place X id denotes the service S id .Then the QoS metric value of S id can be defined as the particle's velocity V id .Firstly, the value of service's QoS metric is calculated to get a better QoS value.Secondly, comparing the better QoS value with some services' QoS value to find which is closest to the better one.Thirdly, the specific service can be found by the definition of inverse function, or other matching functions through it's QoS value, which service can be numbered as S' id .Lastly, the d-th specific service in i-th service selection scenario can be updated from S id to S' id .The whole procedure can be defined as particle updating.
The initial particle population: Initial particle population is generated randomly.That means, a number of service selection scenarios is randomly generated.Then the candidates are filtered by the constraints to get the initial particle population which meets the requirements.

RESULTS AND DISCUSSION
Performance comparison based on experiment results: The performance of both the algorithms were tested and compared by some experiments in a LAN environment.Figure 3 shows the comparison chart based on the response time of both the algorithms.
Figure 4 shows the comparison chart when there on multiple number of users.
It can be inferred from the above diagrams that at multiple instances of execution of the service selections Genetic algorithm was outrun by Particle Swarm Optimization.Further comparing to GA, the advantages of PSO are that PSO is easy to implement and there are few parameters to adjust and the information sharing mechanism in PSO is significantly different compared with Genetic Algorithms (GAs).

CONCLUSION
Automated web service composition is a very challenging task.This study explains the Web Service Composition problem by considering a travel plan domain as an example.We have presented an algorithmic approach for solving the optimal service selection optimization problem by considering two optimization algorithms, Genetic algorithm and PSO algorithm.Figure 3 show that the algorithms guarantee the resulting composite web service with maximal overall QoS.Also, a comparison chart shown in Fig. 4 is a comparison based on the running times of both the algorithms in a single and multi user environment.As a part of future work, efficiency of the algorithm has to be improved and the user preferences have to be formulated automatically as constraints.
Possibly leave on Saturday and back on the next Friday.(The date is flexible depending on the total price of the flight ticket and hotel) • According to the distance from the airdrome to hotel, make a decision on whether by bus or taxi to hotel • Conference meetings on Monday and Tuesday • Stay five days in a hotel in Chicago • Rent a car for five days after arriving in Chicago.

Fig. 2 :
Fig. 2: Particle encoding instance GA for optimal service selection: The implementation steps of GA as follows.
Evaluate every individual and compute its Qos function values according to Eq.1 • Rank individuals and assign their fitness values by the ranking selection method • Random select pop_size/2 individuals according to selection probability PS to form a temporary population; • For the individuals in the temporary population, adopt crossover and mutation operators to form new pop_size/2 individuals • Generate the next new population by collecting the new pop_size/2 individuals and the pop_size/2 individuals in the temporary population • The best individual in current population will be reserved into the next population} Web service selection based on PSO algorithm:

•
Initialization set up parameters • In accordance with population size set, randomly generated paths of service composition to meet the constraint.Each path is encoded as a particle and all particles from the initial particle population • Implementing the disturbance moving of particles • Randomly selecting current number of mutation particles( PN mutation) from external population and updating those • Updating the values of pbest and gbest • According to the evolution times of fitness function to judge whether meeting the end conditions or not Generating initial particle population: Input: Population size (N) Output: Initial particle population (SN)