tion to the multi-objective optimisation problems of Web service composition in .... mental results indicate that SPEA2 is capable of guiding the search towards ...
Applying Multi-Objective Evolutionary Algorithms to QoS-Aware Web Service Composition Li Li, Peng Cheng, Ling Ou, and Zili Zhang Southwest University, Chongqing, P.R. China {lily,chengp,ouling,zhangzl}@swu.edu.cn
Abstract. Finding optimal solutions for QoS-aware Web service composition with conflicting objectives and various restrictions on quality matrices is a NP-hard problem. This paper proposes the use of multi-objective evolutionary algorithms (MOEAs for short) for QoS-aware service composition optimisation. More specifically, SPEA2 is introduced to achieve the goal. The algorithm is good at dealing with multi-objective combinational optimisation problems. Experimental results reveal that SPEA2 is able to approach the Pareto-optimal front with well spread distribution. The Pareto front approximations provide different trade-offs, from which the end-users may select the better one based on their preference. Keywords: Multi-objective evolutionary algorithms, Service composition, QoS, Pareto front.
1
Introduction
Service composition is an important part of the whole life-cycle of services innovation research. It is evident from the fact that Web service composition has attracted increasing attention [1]. QoS-based composition for meeting non-functional requirements has been widely studied recently [2,3,4]. However, most of the existing QoS-aware compositions are simply based on the assumption that multiple criteria, no matter whether they are competing or not, can be combined into a single criterion to be optimised, according to some utility functions. In practice, this can be very difficult as utility functions or weights are not well known a priori [5]. In most cases, Pareto-optimal solutions1 , which are produced by applying multi-objective evolutionary algorithms (MOEAs), are often preferred to single (criterion) solutions because the final solution is always a trade-off in practice. Pareto-optimal sets are also known as efficient, or non-inferior sets. QoS-aware service composition is a multi-objective optimisation problem, which requires simultaneous optimisation of multiple and often competing criteria. 1
Pareto-optimal solutions are sets of solutions that are non-dominated with respect to each other. In other words, Pareto-optimal solutions are those for which any improvement in one objective can only occur through the worsening of at least one other objectives [6].
L. Cao, J. Zhong, and Y. Feng (Eds.): ADMA 2010, Part II, LNCS 6441, pp. 270–281, 2010. c Springer-Verlag Berlin Heidelberg 2010
Applying MOEAs to QoS-Aware Web Service Composition
271
The popular travel scenario probably best illustrates the above situation. For example, we may think that four service components are involved. They are hotel Booking, air-ticket Booking, car Rental, and theme Parks Pass Booking. Suppose a large number of candidate Web services with different quality criteria are available for each of the above service components, our task is to provide a solution to find the optimal candidate services for each of them. As a special class of evolutionary algorithms, the MOEAs are a good fit in finding the optimal sets. They are well-suited for solving multi-objective problems [7,8,9] such as QoS sensitive service composition. Particularly, we use SPEA2 [10] in this paper. Note that terms such as criteria and objectives, qualities and characteristics are used interchangeably unless otherwise specified. Our main contributions are summarised as follows: – We propose the use of SPEA2 to handle QoS-aware Web service composition. – SPEA2 for QoS-aware Web service composition is studied experimentally. The rest of the paper is organised as follows. Section 2presents the problem and QoS model followed by the problem formulation. Section 3 explains how to customise SPEA2 to govern QoS composition with detailed experimental results. Section 4 provides an overview of the related work. Finally, Section 5 concludes the paper.
2
Problem Description
Web services have the potential to offer enterprises the capability to integrate in-house business services with external Web services in order to conduct complex business transactions. At the centre of Web services is service composition. The main purpose of QoS composition is to compose independently developed applications at a high level of abstraction in order to have the required complex service. One critical issue of service composition is the selection of the best services to fulfill the role specified by the business logic. It is very important to differentiate between a number of functionally equivalent services and to select the optimal ones. However, it is not an easy job yet to make a decision when a large number of services are presented [11]. Moreover, selecting optimal concrete services becomes complex if a client wants to make sure of receiving a service which meets a specific performance, for example, within a given cost level and a minimum time delay, but a higher availability. This is because different dimensional qualities may conflict with one another in the real world. A typical example is the time and cost pair. Usually, quicker response and cheaper price is highly demanded, but in practice they are often in conflict. When more quality criteria are required, the aforementioned question becomes more complex. It is clear that service composition is a typical combinational optimisation problem. Qualities play an important role in decisively identifying the best set of services available at runtime. Obviously, it is important to incorporate QoS into service composition. Unfortunately, finding an optimal solution for QoS-aware Web service composition with conflicting objectives and global constraints between quality dimensions is a NP-hard problem [12].
272
L. Li et al.
Evolutionary algorithms are suitable to solve multi-objective optimising problems because they are able to produce a set of solutions in parallel. A growing attention to the multi-objective optimisation problems of Web service composition in recent years is evident. SPEA2 [10], an improved version of SPEA (Strength Pareto Evolutionary Algorithm) is a relatively recent technique for finding or approximating the Pareto-optimal set for multi-objective optimisation problems. The promising results yielded from comparison of SPEA2 with SPEA and NSGA-II [13], on different test problems indicates that SPEA2 is one of the most suitable algorithms in dealing with the problem presented in this paper. Also based on our experience in using evolutionary algorithms in optimisation problems [14], we propose the use of SPEA2 to cope with QoS-aware Web service composition issues. Below we first introduce the QoS model and then the description of the optimisation problem as a multi-objective problem. 2.1
QoS Model
QoS is an integral part of Web services. It is not uncommon that more than one concrete service realising a particular feature is available. Basically, these concrete services are functionally equivalent therefore they can be interchanged. As different concrete services may operate at different QoS measures, these QoS attributes can be used to differentiate a number of functionally equivalent concrete services. In practice, the choice between them is dictated by QoS criteria. Although Web services may have quantitative and qualitative characteristics, basically response time, invoking cost and service availability are included. – Availability. Availability [15] is defined as the ratio of time period in which a Web service exists or is ready for use. Usually it is expressed in percentage so a service availability belongs to [0, 1]. – Cost. Cost is the amount of money that a service consumer has to pay in order to use this service. In this paper, it is normalised to [0, 1]. – Response time. Response time [15] is measured at an actual Web service call. It is normalised to [0, 1] in this paper. Currently three quality dimensions are discussed in the travel scenario, however, there is no limit to the number of characteristics to be handled by the algorithm. 2.2
Problem Formulation
The main purpose of service composition is to select a set of best fitted concrete services that guarantee the success of composition. Without loss of generality, we assume that all objectives are to be minimised and all equally important. In other words, no additional knowledge about the problem itself is available (e.g., no prioritising, scaling and weighing of the objectives). Suppose there are k objectives (i.e., k Web service quality dimensions). The minimisation2 of a multi-objective problem with k objectives is defined as follows: 2
The maximisation of a multi-objective problem can be implemented as a reverse of minimisation functions.
Applying MOEAs to QoS-Aware Web Service Composition
273
minimise [f1 (x), f2 (x), ..., fk (x)], where x = [x1 , x2 , ..., xn ]T (n, k ∈ N) is a vector of decision variables which satisfies a series of constraints. It specifies which concrete service to select for each abstract service group. Each xi is an integer. [f1 , f2 , ..., fk ]T is a vector of the objective space. For example, if we have a vector of concrete services with x = [2, 5, 7, 6]T , it means x[1][2] = 1, x[2][5] = 1, x[3][7] = 1 and x[4][6] = 1. In other words, it indicates that the second concrete service in the first group, the fifth concrete service in the second group, the seventh concrete service in the third group, and the sixth concrete service in the fourth group have been selected. In our example, each concrete service has three characteristics. They are: availability, cost and response time. For the selected concrete services, the objective vector is the aggregation of the corresponding attributes in the decision space. How to calculate these objectives from a decision vector is a question we are facing now. In order to do it, we need to know the transformation rules from the decision vector to the corresponding objective vector. The search process is guided by Pareto-optimal dominance on the objective vector. Table 1 shows the transformation by means of aggregation functions. Table 1. Aggregation functions Criteria (Objectives) Aggregation function 4 aggregated availability (f1 ) Πi=1 availability matrix[i][xi ] 4 aggregated cost (f2 ) Σi=1 cost matrix[i][xi ] 4 aggregated response time (f3 ) Σi=1 response time matrix[i][xi ]
In this paper, there are four groups of concrete services and three objectives to be optimised, i.e., n = 4 and k = 3. The objective vector is [f1 , f2 , f3 ]T . Accordingly, there are three matrixes: availability matrix, cost matrix and respons time matrix to save the values of availability, cost and response time of each concrete service. For example, if the selected solution is x = [2, 5, 7, 6]T , the aggregated cost (i.e., f2 ) will be: f2 = cost matrix[1][2]+cost matrix[2][5]+cost matrix[3][7]+cost matrix[4][6]. Similarly, we can obtain f1 and f3 , respectively.
3
Experimental Evaluation
We consider four abstract services (i.e. the typical travel scenario) in the experiment. We assume there are 90 concrete services available for each abstract service. The detailed task is to choose the optimal concrete services to achieve better composition results that satisfy three objectives aggregation functions best.
274
3.1
L. Li et al.
Experimental Parameters
The detailed MOEA parameters depend on the nature of the problem. Regarding the chromosome coding, an integer string of length m is used to encode the solution x ∈ {1, . . . , n}m . In other words, there are m digits in the string and each digit is between 1 and n. Individually, each solution is calculated from its chromosome based on the provided attribute matrices. In order to evaluate the fitness of each individual in the population, we first calculate the objective functions of the individual from its chromosome, i.e., to map a solution from the decision space to the objective space. It is implemented based on the formulae introduced in Section 2.2. Other parameters in the experimentation are shown in Table 2. We follow the given parameters for all tests in the rest of the paper. Table 2. SPEA2 parameters Parameter parent population size child parent population size archive population size chromosome size chromosome encoding scheme selector crossover mutation termination condition
3.2
Value 100 100 200 4 integer encoding binary tournament selection single point (0.95) independent bit mutation (0.01) fixed number of generation
Dataset and Experimental Results
The test data are generated according to some empirical studies of QoS in this domain. Each attribute is normalised between 0 and 1 in this paper. Totally three tests are presented in this section. In the first two tests, each abstract service has 90 candidate services. Consequently, it creates an 4 × 90 matrix for each attribute. The initial individuals in the first generation are generated randomly. The proposed algorithm is implemented and tested with the generated dataset and parameters given above. Fig. 1 and Fig. 2 show the initial population and the population at generation 100, but with different angles of view. The experimental results indicate that SPEA2 is capable of guiding the search towards the Pareto-optimal front efficiently. It is shown that SPEA2 already converges to the Pareto-optimal front at generation 100. In other words, evolving with more generation makes no difference in terms of moving the solutions to the true Pareto-optimal front. The results shown in Fig. 3 and Fig. 4 strongly support the above statement. As the initial attribute matrix data and the initial selected solution in the first generation are created randomly, we have no idea where the true Paretooptimal front is. However, we understand that better solutions would be the ones
Applying MOEAs to QoS-Aware Web Service Composition
Fig. 1. View1:Initial population population at generation 100
VS. Fig. 2. View2:Initial population population at generation 100
275
VS.
Fig. 3. View1: focusing on population at Fig. 4. View2: focusing on population at generation 100 and 1000 generation 100 and 1000
with lower cost, lower response time, but higher availability. The search process should converge towards to the direction. It has been evident (i.e. the above experimental results). Because the algorithm already converged at generation 100, below we mainly focus on analysing and interpreting findings of Fig. 1 and Fig. 2. Fig. 1 and Fig. 2 reveal something interesting regarding Web service composition. For example, at generation 100, Fig. 1 clearly shows that the optimal solutions have achieved lower cost and response time, but greater availability,
276
L. Li et al.
which are centred between 0.5 and 0.8. In order to have a clear view, Fig. 2 is created by rotating the availability and cost these two dimensions of Fig. 1. Apparently, it shows that the solutions at generation 100 do have lower cost and response time centred around 0.2. The next two tests are performed to display the convergence property with the presence of different population sizes and various concrete services.
Fig. 5. Non-dominated solutions with different population sizes
Fig. 5 shows the evolution of the algorithm based on the number of optimal solutions found at different generation with different population sizes. From bottom-up, when the population size is 10, no non-dominated solution is found at generation 4. The same is true with population size 20. However, it does not happen until generation 7 when population size is 50. When population size is growing, more computation time (i.e. more generation) is needed as shown clearly in Fig. 5. For example, the optimal solutions are found at generation 10 when population size is 200. It also demonstrates that the algorithm converges quickly with a small population size compared with a large population size. The next test is different from the previous two tests in which the number of concrete services is not fixed. In Fig. 6, we extend the experiment to show the evolution of the algorithm with various concrete services given that the archive population size is 200. Still, four abstract services are considered. We discuss five different cases with the number of concrete services varying from 30 to 500 for each abstract service. Generally, it takes longer to find a set of optimal solutions with the increase of services. For instance, in the case of 30 services, the algorithm converges at generation 12, while for the cases of 90 services and 150 services, the algorithm finds the non-dominated solutions at nearly the same generation, i.e. at generation 15. We anticipate the same tendency will continue for any other bigger population sizes. As a matter of fact, there is an exception.
Applying MOEAs to QoS-Aware Web Service Composition
277
Fig. 6. Non-dominated solutions with various concrete services
In the case of 500 services, the algorithm converges a bit quicker than that in the case of 210 services, given other settings are the same. Currently, we do not know the reason yet. In short, SPEA2 ensures to find the optimal solutions for service composition problems with different cases. It is able to provide a set of Pareto-optimal concrete services for service composition optimisation problems.
4
Related Work
Recently, some promising results have been reported in the area of Web service and service composition. For example, Multi-objective Evolutionary Algorithms (MOEA) [16,17], Integer Programming (IP) [18,19], Mixed Integer Programming (MIP) [2,20], and Constraint Programming [21]. The following is a brief overview of some recent work in terms of QoS Web service composition. Zeng et al. [19] introduced a QoS model in which aggregation functions are defined in order to aggregate and measure constraints into a single objective function. The major issues of the QoS-driven service selection approach presented in [19] are scaling (amongst objectives) and weighting. Its weighting phrase requires the selection of proper weights to characterise the user’s preferences, which can be very difficult in practice. Furthermore, the method from [19] cannot always guarantee the fulfillment of global constraints, since Web service composition is not separable. Research on QoS-based composition by using evolutionary computations in order to find an optimal solution has been more active and productive. However, as pointed out by Berbner et al. in [20], the IP approach is hardly feasible in dynamic real-time scenarios when a large number of potential Web services were
278
L. Li et al.
concerned. In contrast, GAs are able to handle this problem better [22]. GAs are well-suited for Web service selection when multiple QoS attributes are presented. Canfora et al. [12] proposed the use of Genetic Algorithms (GAs) for the problem mentioned above. It has shown that GAs outperform integer programming used in [19] when a large number of services are available. Moreover, GAs are more flexible than the mixed IP since GAs allow the consideration of nonlinear composition rules [2]. While the selection of the weights of characteristics is required in order to aggregate multi-objectives into a single objective function in GAs, in multiobjective GAs, by contrast, this is totally unnecessary. The advantage of not selecting weights in multi-objective GAs enables end-users not to worry about the accuracy and precision of the weights, which require additional knowledge of the different importance of different objectives. Moreover, instead of optimising objectives separately, in most real world problems, Web service composition, for instance, optimising objectives should be performed simultaneously to get optimal solutions whether or not the objectives are ’conflicting’ with to each other. For example, it is always the case to pursue the lowest cost with the highest performance in the minimum time. When the objectives contradict to each other, it is unlikely to find an optimal result in one dimension of the objectives without causing unnecessary suffering to another. In this case, returning a single solution will hardly take place, rather a trade-off between these objectives is much more likely. In addition, the weighted sum approach in GAs largely depends on the formulation (i.e., the weighted formula of the objectives), which has to be readjusted and computed again when the scenario changes. Apparently, traditional GAs have some inherent limitations in solving QoSaware composition problems. Several heuristics [6,23,24,25] have been proposed in order to improve traditional GAs in finding optimal or semi-optimal solutions. Multi-objective evolutionary algorithms [26] leverage the QoS-aware service composition problem to provide a set of optimal solutions with different levels of trade-offs. Moreover, reformulating the solutions is not required if there is a change (e.g., the change of the user’s preferences). Furthermore, most GA-based multi-objective optimisation algorithms do not require the user to prioritise, scale, or weigh objectives in advance, which is more realistic and reliable. Using multi-objective GAs is also taken in [27] by Claro et al. The authors discussed the advantages of multi-objective GAs in selecting optimal sets in service selection and a popular Multi-objective algorithm, NSGA-II [13], is used to find sets of services. However, the discussion in [27] is based on NSGA-II, which according to [10] has some limits compared with SPEA2, especially with higher dimensional objective space. In other words, SPEA2 provides a broader distribution and hence better performance. Apart from GAs, there are some other efforts with different formalisms to in order to target QoS-aware service composition. Yu and Lin [28] studied multiple QoS constraints. The composition problem is modelled as a multi-dimension multi-choice 0-1 knapsack problem (MMKP). A multi-constraint optimal path (MCOP) algorithm with heuristics is presented in [28]. However, the aggregation
Applying MOEAs to QoS-Aware Web Service Composition
279
of parameters using the Min function is neglected. Furthermore, the evaluation lacks a metric describing the tightness of the used constraints. Maximilien and Singh [11] describe the Web Service Agent Framework (WSAF) to achieve service selection by considering the preferences of service consumers as well as the trustworthiness of providers. At the time of writing, particle swarm optimisation (PSO) [29,30] is becoming popular. Sharing many similarities with GAs, the PSO has the potential to search for optima by updating generations. However, unlike GAs, the PSO has no evolution operators such as crossover and mutation. Deployment of the PSO in order to achieve better QoS composition will be studied in a separate paper.
5
Conclusion
We have proposed the use of multi-objective evolutionary algorithms (MOEAs) in order to optimise multi-objective optimisation problems. Particularly, we discussed the use of SPEA2 to solve QoS-aware Web service composition problems. The experimental results of using SPEA2 has illustrated that SPEA2 is able to converge to the true Pareto-optimal solutions with a wide diversity among solutions. The experimental results also revealed some other important characteristics of MOEAs. Although there are only four abstract services in our example, there is no limit to the number of abstract services or concrete services to be considered by our implementation of SPEA2, but it requires extra work, especially when fine visual analysis is required. Other future challenges include the discussion of constraints between objectives. We also envision a comprehensive evaluation of SPEA2 and other MOEAs with empirical QoS data in the future.
Acknowledgments The work is supported in part by Natural Science Foundation Project of CQ CSTC (No. CSTC,2010BB2006) and the Fundamental Research Funds for the Central Universities of P. R. China (No. XDJK2009C015, No. XDJK2009C030).
References 1. Fan, W., Geerts, F., Gelade, W., Neven, F., Poggi, A.: Complexity and composition of synthesized web services. In: PODS 2008, pp. 231–240. ACM, New York (2008) 2. Ardagna, D., Pernici, B.: Adaptive service composition in flexible processes. IEEE Trans. on Software Engineering 33, 369–384 (2007) 3. Jaeger, M.C., Rojec-Goldmann, G., M¨ uhl, G.: Qos aggregation in web service compositions. In: EEE 2005, pp. 181–185. IEEE Computer Society, Los Alamitos (March 2005) 4. Jiang, Z.Y., Han, J.H., Zhao, W.: Optimization model for dynamic qos-aware web services selection and composition. Chinese Journal of Computers 32, 1014–1025 (2009)
280
L. Li et al.
5. Fonseca, C.M., Fleming, P.J.: Genetic algorithms for multiobjective optimization: Formulation, discussion and generalization. In: Forrest, S. (ed.) ICGA 1993, pp. 416–423. Morgan Kaufmann, San Francisco (June 1993) 6. Konak, A., Coit, D.W., Smith, A.E.: Multi-objective optimization using genetic algorithms: A tutorial. Reliability Engineering & System Safety 91, 992–1007 (2006) 7. Deb, K.: Multi-Objective Optimization using Evolutionary Algorithms. Wiley, Chichester (2001) 8. Carlos, A., Coello Coello, D.A.V.V., Lamont, G.B.: Evolutionary Algorithms for Solving Multi-Objective Problems. Springer, Heidelberg (2007) 9. Das, S., Panigrahi, B.: Multi-objective Evolutionary Algorithms, vol. 3, pp. 1145– 1151. Idea Group Publishing, USA (2008) 10. Zitzler, E., Laumanns, M., Thiele, L.: Spea2: Improving the strength pareto evolutionary algorithm. Technical report, ETH, Z¨ urich (2001) 11. Maximilien, E.M., Singh, M.P.: A framework and ontology for dynamic web services selection. IEEE Internet Computing 8, 84–93 (2004) 12. Canfora, G., Penta, M.D., Esposito, R., Villani, M.L.: An approach for qos-aware service composition based on genetic algorithms. In: Beyer, H.G., O’Reilly, U.M. (eds.) Genetic and Evolutionary Computation Conference, GECCO 2005, pp. 1069–1075. ACM, New York (June 2005) 13. Deb, K., Agrawal, S., Pratap, A., Meyarivan, T.: A fast and elitist multiobjective genetic algorithm: Nsga-II. IEEE Trans. Evolutionary Computation 6, 182–197 (2002) 14. Zhang, Z., Yang, P., Wu, X., Zhang, C.: An agent-based hybrid system for microarray data analysis. IEEE IS 24, 53–63 (2009) 15. Kim, E., Lee, Y.: Quality model for web service. Technical report, OASIS Open Consortium (2005) 16. Coello, C.A.C.: A comprehensive survey of evolutionary-based multiobjective optimization techniques. Knowledge and Information Systems 1, 269–308 (1999) 17. Deb, K.: Multi-objective genetic algorithms: Problem difficulties and construction of test problems. Evolutionary Computation 7, 205–230 (1999) 18. Aggarwal, R., Verma, K., Miller, J.A., Milnor, W.: Constraint driven web service composition in meteor-s. In: SCC 2004, pp. 23–30. IEEE Computer Society, Los Alamitos (September 2004) 19. Zeng, L., Benatallah, B., Ngu, A.H.H., Dumas, M., Kalagnanam, J., Chang, H.: Qos-aware middleware for web services composition. IEEE Trans. Software Eng. 30, 311–327 (2004) 20. Berbner, R., Spahn, M., Repp, N., Heckmann, O., Steinmetz, R.: Heuristics for qos-aware web service composition. In: ICWS 2006, pp. 72–82 ( September 2006) 21. Hentenryck, P.V.: Constraint satisfaction in logic programming. MIT Press, Cambridge (1989) 22. Canfora, G., Penta, M.D., Esposito, R., Villani, M.L.: Qos-aware replanning of composite web services. In: ICWS 2005, pp. 121–129. IEEE Computer Society, Los Alamitos (2005) 23. Coello, C.A.C., Lamont, G.B., Veldhuizen, D.A.V.: Evolutionary Algorithms for Solving Multi-Objective Problems (Genetic and Evolutionary Computation). Springer, New York (2006) 24. Veldhuizen, D.A.V., Lamont, G.B.: Multiobjective evolutionary algorithms: Analyzing the state-of-the-art. Evol. Comput. 8, 125–147 (2000)
Applying MOEAs to QoS-Aware Web Service Composition
281
25. Ai, L., Tang, M.: Qos-aware web service composition accommodating inter-service dependencies using minimal-conflict hill-climbing repair genetic algorithm. In: IEEE International Conference on eScience (eScience 2008), pp. 119–126. IEEE Computer Society Press, Los Alamitos (December 2008) 26. Taboada, H.A., Espiritu, J.F., Coit, D.W.: Moms-ga: A multi-objective multi-state genetic algorithm for system reliability optimization design problems. IEEE Transactions on Reliability 57, 182–191 (2008) 27. Claro, D.B., Albers, P., Hao, J.K.: Selecting web services for optimal composition. In: ICWS 2005 Workshop, pp. 32–45 (July 2005) 28. Yu, T., Lin, K.J.: Service selection algorithms for composing complex services with multiple qos constraints. In: Benatallah, B., Casati, F., Traverso, P. (eds.) ICSOC 2005. LNCS, vol. 3826, pp. 130–143. Springer, Heidelberg (2005) 29. Eberhart, R., Kennedy, J.: A new optimizer using particle swarm theory. In: Proceedings of the Sixth International Symposium on Micromachine and Human Science, pp. 39–43 (1995) 30. Kennedy, J., Eberhart, R.: Particle swarm optimization. In: Proceedings of IEEE International Conference on Neural Networks (ICNN 1995), pp. 1942–1948 (1995)