Reliable Execution Based on CPN and Skyline Optimization for Web Service Composition

With development of SOA, the complex problem can be solved by combining available individual services and ordering them to best suit user's requirements. Web services composition is widely used in business environment. With the features of inherent autonomy and heterogeneity for component web services, it is difficult to predict the behavior of the overall composite service. Therefore, transactional properties and nonfunctional quality of service (QoS) properties are crucial for selecting the web services to take part in the composition. Transactional properties ensure reliability of composite Web service, and QoS properties can identify the best candidate web services from a set of functionally equivalent services. In this paper we define a Colored Petri Net (CPN) model which involves transactional properties of web services in the composition process. To ensure reliable and correct execution, unfolding processes of the CPN are followed. The execution of transactional composition Web service (TCWS) is formalized by CPN properties. To identify the best services of QoS properties from candidate service sets formed in the TCSW-CPN, we use skyline computation to retrieve dominant Web service. It can overcome that the reduction of individual scores to an overall similarity leads to significant information loss. We evaluate our approach experimentally using both real and synthetically generated datasets.


Introduction
Web services are distributed applications that interoperate across heterogeneous networks and that are hosted and executed on remote systems. Service oriented architecture (SOA) is gaining prominence as a key architecture because it allows well-formed and autonomous components to be reused rather than creating new one from scratch. On SOA, web services composition focuses on how to integrate existing web services in diverse and heterogeneous distributed environments, providing different functional, nonfunctional, and behavioral features, to quickly construct workable applications or software for satisfying the requirements which are requested by users and unable to be fulfilled by any single web service.
In order to implement web services composition, component Web services are selected according to user requirements, some constraints and preferences. The selected services usually have the best QoS. However, the interoperation of distributed software systems is always affected by failures, dynamic changes, and availability of resources [1]. The composite web service will not guarantee reliable execution and consistency if the component services are chosen only according to QoS and functional attributes. Transactional properties of selected service should be considered to ensure reliable execution of composite web services. Besides, numerous web services are spread all over Internet, and it is intractable to select appropriate web services satisfying the goal efficiently. Existing various approaches use aggregating parameters and utility function to get score of service. One direction is to assign weights, determined through user feedback, to individual scores [2,3]. Appropriate weights are chosen either by assuming a priori knowledge about the user's preferences or by applying expensive machine-learning techniques. Both alternatives face serious drawbacks and raise a series of other issues to be solved. More often, these approaches lead to information loss that significantly affects the retrieved results accuracy. For example, use utility function, and finally return the web services with moderate 2 The Scientific World Journal attributes; thus, service with only one bad attribute will be excluded from the result, even though they are potentially good alternatives.
We will use Colored Petri Net as formalism to represent composite web service and perform a Best-First search, where transactional and QoS properties are both integrated in the selection process. But the selection is done in two separate steps, transactional service selection starts firstly, and the QoS-aware service selection is embedded with the transactional-aware service selection [4]. As a tremendous amount of different QoS web services after transactional-aware service selection are spread all over Internet, it is intractable to find the appropriate web services satisfying the given goal quickly. What is more, using traditional methods, services with only one bad QoS attribute may be excluded from the result set, even though they are potentially good alternatives, and thus leads to information loss that significantly affects the retrieved results accuracy. But skyline computation is a nondiscriminating comparison of several numerical attributes at the same time and treats each service equally. We use skyline computation to reduce the number of candidate services and speed up the selection process.
We find that CPN model allows describing not only a static vision of a system, but also its dynamic behavior, and it is expressive enough to capture the semantics of complex web services combinations and their respective interactions. We incorporate transactional web services properties in the CPN model. To ensure reliable and correct execution, unfolding processes of the CPN are followed. The execution of transactional composition web service (TCWS) is formalized by CPN properties. To identify the best services of QoS properties from candidate service sets formed in the TCSW-CPN, we use skyline computation to retrieve dominant web service. It can overcome that the reduction of individual scores to an overall similarity leads to significant information loss. We also define QoS-based dominance relationships between services. To identify the best services from CPN model in QoS properties, we use skyline computation to retrieve dominant web service.

Related Work
In the last years, although the problem of web service selection and composition has received much attention of many researchers, designing a composite web service which ensures not only correct and reliable execution but also optimal QoS remains an important challenge. Indeed, these two aspects of selection are always implemented separately.
Web services transactions have received much attention recently. Industrial web services transaction specifications emerge. WS-atomic transaction, WS-business activity, and WS-TXM rely on ATM to define transactional coordination protocols. Like ATM these protocols are unable in most cases to model Business process due to their limited control structure. It also ensures reliability on behalf of process adequacy or the opposite. Indeed, a transactional pattern taken alone as a composition of transactional patterns can be considered as a transactional protocol.
In one hand, WSBPEL and WS-CDL follow a workflow approach to define services compositions and services choreographies. Like workflow systems these two languages meet the business process need in terms of control structure. However, they are unable to ensure reliability especially according to the designers' specific needs.
Transaction has achieved a great success in the database community [4,5]. One of the most important reasons is that the operations in database have clear transactional semantics. However, this is not the case in web services. To solve this problem, the extension mechanism of WSDL can be exploited to explicitly describe the transactional semantics of web services operations [6,7].
There are many works that adopt three kinds of transactional properties proposed in [8] to express the different transactional semantics of web services. Based on this classification, Bhiri et al. [9] analyze the termination property of a composite service. Rusinkiewicz and Sheth [10] define a set of transactional rules to verify the required failure atomicity specified by ATS [11], given the skeleton of a composite service and the transactional properties of its component services. Zeng et al. [12] propose an approach to deduce the required transactional properties of every task based on ATS and then use the result to guide service selection.
For these researches web services composition based on transactional properties ensures a reliable execution; however, an optimal QoS composite web service is not guaranteed.
QoS guarantee for web services is one of the main concerns of the SLA framework. There are projects studying QoS-empowered service selection. In [13], authors present a QoS-aware web service composition which is middlewaresupporting quality driven. But the method is based on integer linear programming and best suited for small-size problems as its complexity increases exponentially with the increasing problem size. For [14], the authors propose an extensible QoS computation model that supports an open and fair management of QoS data by incorporating user feedback. However, the problem of QoS-based composition is not addressed by this work. The work of Zeng at al. [15,16] focuses on dynamic and quality-driven selection of services. The authors use global planning to find the best service components for the composition. They use linear programming techniques [17] to find the optimal selection of component services. Linear programming methods are very effective when the size of the problem is small but suffer from poor scalability due to the exponential time complexity of the applied search algorithms [18]. Despite the significant improvement of these algorithms compared to exact solutions, both algorithms do not scale with respect to the number of candidate web services and hence are not suitable for real-time service composition. The proposed skyline-based algorithm in this paper is complementary to these solutions as it can be used as a preprocessing step to prune noninteresting candidate services and hence reduce the computation time of the applied selection algorithm.
With the above quotation, the approaches implement conventional optimal QoS composition, but composing optimal QoS web services does not guarantee a reliable execution The Scientific World Journal 3 of the resulting composite web service. Therefore, transactional based and QoS based should be integrated.

A Colored Petri-Net Model of Web Service Composition
Due to the inherent autonomy and heterogeneity of web service it is difficult to predict the overall behavior of a composite service. Unexpected behavior or failure implement of a component service might not only lead to its failure but also may bring negative impact on all the participants of the composition. Web service composition process must satisfy transactional property to provide reliable and consistent execution.

Transactional Property Description.
A transactional web service is a web service of which the behavior manifests transactional properties. The main transactional properties of a web service we are considering are pivot, compensatable, and retriable [19]. When transactional property of a service is pivot ( for short), the service's effects remain forever and cannot be semantically undone if it completes successfully, and it has no effect at all if it fails. When a service is compensatable ( for short), it offers compensation policies to semantically undo its effects. When a service is said to be retriable ( for short), it ensures successful completing after several finite activations. Moreover, the transactional property can be combined, and the set of all possible combinations is { , , , } [4]. El Haddad et al. [4,20] extended the previous described transactional properties and adapted them to CWS. A CWS is atomic ( for short), if all its component web services complete successfully, they cannot be semantically undone, if one component service cannot complete successfully, previously successful component services have to be compensated. is compensatable ( for short) if all its component services are compensatable. A CWS is retriable ( for short), if all its component services are retriable. Transactional composite web service (TCWS) is CWS whose transactional property is in { , , , }.

Tolerance Level.
In order to provide expression of user transactional criteria, we define tolerance that gives importance of the uncertainty of application completion and recovery for user. A CWS with transactional property or has greater risk of success completion and recovery than the CWS with transactional property or [21]. The reason is that properties and mean once a service has been executed, and it cannot be rolled back. Therefore, we define two levels of tolerance in a transactional system.
Tolerance 0 ( 0 ). The system guarantees that if the execution is successful, the obtained results can be compensated by the user. In this level the selecting process generates a compensatable workflow [4].
Tolerance 1 ( 1 ). The system does not guarantee the successful execution, but if it achieves, the results cannot be compensated by the user. In this level the selecting process generates an atomic workflow [4].
In both tolerance cases, if the execution is not successful, then no result is reflected to the system; nothing is changed on the system.

TCWS-CPN Definition.
A colored petri net (CPN) is one of the very useful graphical and mathematical representations, and it has a well-defined semantics for describing states and actions of web service composition. We build a colored petri net model of transactional web service composition (CPN-TWSC). It provides a formalism to depict transactional selections of component services. Besides, functional conditions are expressed as input and output attributes, and transactional properties expressed as a tolerance level. The composite web service will satisfy user's functional requirement and will ensure executing reliably and consistently.

Services Selection of Transactional Property in the TCWS-CPN.
In the section, we focus on web services composition satisfying the user's functional, transactional requirements. We define guard to express transactional restriction of services selection. Binding determines transactional property of selected services. Firing rules are selection rules for component services of transactional property.
Definition 3 (guard). The appropriate restriction is defined by a predicate at the transition which is called a guard. In our TCWS-CPN model, variable "tpattern" is guard of transition, which expressed fired pattern of transition. (That is composition pattern of selected services.) Definition 4 (binding). A binding is an assignment of values to variables, and variables appear both in the guard of and in the arc expressions of the arcs connected to . Definition 6 (successor marking relation). A successor marking relation is defined by is obtained after a transition ∈ is fired for binding in a marking .
In our web service composition, a concrete service should be selected only one time and the corresponding transition in TCWS-CPN should be fired only one time. For this reason, when a transition is fired, in the successor marking relation tokens of input places are removed and new tokens are added to the output places. Tokens are added to the output places of transition according to the following rules [20]:

Composite Sequence in the CPN
Definition 7 (occurrence sequence). We define the set OCC(S) of occurrence sequences to be the set of all sequences of the form 0 , 0 , 1 , 1 , 2 , 2 , . . . , −1 , ( ⩾ 1) such that → +1 for ∈ {0, . . . , − 1}. Occurrence sequence in fact represents the selection of several web services, 0 ⋅ ⋅ ⋅ −1 , which are components of the resulting TCWS, whose aggregated TP is . One of the goals in my paper is discovering and selecting the web services whose composition satisfies the functional and the transactional requirements of the user such as follows.
Our problem consists in discovering and selecting the web services of the registry whose composition satisfies the functional, QoS, and the transactional requirements of the user, which ensures reliable execution of composite web servic such as follows.
Definition 9 (transactional composite web services problem). Given a user query (it is used to discover component services) and a TCWS-CPN, transactional composite web services problem consists in creating a TCWS-CPN by firing rule of a marking and binding, from the occurrence sequence and reachability set, such that 0 → , where 0 is the initial marking, is a reachable marking such that: if

Execution Framework Architecture.
During the TCWS component web services exist two composition patterns. In sequential patterns, the results of previous services are inputs of successor services which cannot be invoked until previous services have finished. In parallel scenario, several branch services are executed simultaneously because they do not have data flow dependencies. Hence, to ensure that sequential and parallel execution of TCWS satisfies transactional requirement of user, it is mandatory to follow TCWS-CPN model taken by the composer. In this paper, we propose execution framework architecture of TCWS-CPN, in which a Composition Engine manages selection and execution of a TCWS. It is in turn a collection of Composition Threads that is assigned to each Wed service in the TCWS. Figure 1 depicts the overall architecture of our Executor. The Composition Engine and its Engine Threads are in charge of initiating, controlling, and monitoring the execution, as well as collaborating with its peers to deploy the TCWS execution. The Composition Engine and its Engine Threads are in charge of initiating, controlling, and monitoring the execution, as well as collaborating with its peers to deploy the TCWS execution. The Composition Engine is responsible for initiating the Engine Threads and the TCWS-CPN system, and then Engine Threads are responsible for the invocation of web services, monitoring its execution, and forwarding results to its peers to continue the execution flow.
In the framework, all of components are recovery.
The model of proposed framework can distribute the responsibility of executing a TCWS across several Engine Threads, which is implemented in a distributed memory environment supported by message passing or in a shared memory platform. The logic of Executor can distribute execution and is independent of implementation, which is  place in different physical nodes from those where actual web services are placed. The Composition Engine needs to have access to the web services Registry, which contains the WSDL and OWLS documents. Engine Threads invoke the component web services remotely from web services Registry. The information needed at runtime by each Engine Thread is extracted from the TCSW-CPN in a shared memory implementation or sent by the composition Engine in a distributed implementation.
Generally, the component web services are categorized into two types, atomic and composite web services. An atomic web service invokes local operations. A composite web service accesses additionally other web services or invokes operations of other web services. Transitions in the TCWS-CPN, representing the TCWS, could be atomic web services or TCWS. Atomic web services have its corresponding WSDL and OWLS documents. TCWS can be encapsulated into an executor. The Composition Engine also has its corresponding WSDL and OWLS documents.

4.2.
Example. The example in this paper is based upon a travel-scheduling service composition which is depicted by  Table 1. , , , , , , , , ). According to and , place 1 is created. The set of Candidate services for 1 is also formed by query from registry. In order to satisfy transactional request transition 1 is added to TCWS-CPN based on 0 and firing rule (1), and token of 1 is ( 1 ) ∈ { , , , }. As web service of user request is retriable shown in Figure 3, let ( 1 ) = . Meanwhile candidate services of 1 are pruned, which are kept with transactional property and deleted with other transactional properties. Then an arc is created from 1 to 1 . One of candidate services is assigned to transition 1 and takes part in web service composition. Place of 2 is created after 1 is fired, and pre[⋅, 1 ] of the arc is also created. Rule of successor marking relation enables 1 = ( , , , , , , , , , ). Generating the rest parts of TCWS-CPN, including marking of places, token and binding of transitions, and backward and forward matrix of arcs is shown as (1). Marking of places and token and binding of transitions are expressed in occurrence sequence (Definition 8): ) ) ) ) ) ) ) 4 ( ( 4 )= ∧ ( parttern)=parallel) ) ) .

The Skyline Computation Problem.
The basic skyline consists of all nondominated database objects. That means all database objects for which there is no object in the database that is better or equal in all dimensions, but in at least one aspect strictly better. Assuming every database object to be represented by a point in -dimensional space with the coordinates for each dimension given by its scores for the respective aspect, we can formulate the problem as follows.

Skyline Web Services for Qos-Based Composition.
QoSbased service composition is a constraint optimization problem which aims at selecting individual services that meet QoS constraints and also provide the best value for the utility. For a composite web service with activities and candidate services per activity, there are possible combinations to be examined. Hence, performing an exhaustive search can be very expensive in terms of computation time and, therefore, inappropriate for run-time service selection in applications with many services and dynamic needs. Skyline computation offers a new solution of finding optimal data from huge data sets, whose computation can be expensive and whose applications require fast response times. The main idea in our approach is to perform a skyline query on the services in each activity to distinguish between those services that are potential candidates for the composition and those that cannot possibly be part of the final solution. The latter can effectively be pruned to reduce the search space.  V and are incomparable. The notion of dominance handles requirement since comparing between matched services takes into consideration the degrees of match in all parameters, instead of calculating and using a single, overall score.
Definition 11 (skyline web services [22]). The skyline web services of a service set , denoted by SWS, comprise the set of those services that are not dominated by any other services, that is, SWS = { ∈ | ¬∃ V ∈ : V ≺ }. Services in SWS are skyline web services of a service set .
We observe that only those services that belong to the SWS are not dominated by any other functionally equivalent service and are valid candidates for the composition. This provides a valid pruning of the number of candidate services. Figure 4 shows an example of skyline services of candidate services for a certain activity. Each service is described by two QoS attributes, namely, delay and price. Hence, the services are represented as points in the 2-dimensional space, with the coordinates of each point corresponding to the values of the service in these two parameters. SWS includes four elements, SWS = { 1 , 2 , 4 , 7 }, because they are not dominated by any other service. On the other hand, service 6 is not contained in the SWS because it is dominated by the services 2 and 4 .
The skyline web services provide different tradeoffs between the QoS attributes and are incomparable to each other, as long as there is no prespecified preference scheme regarding the relative importance of these attributes. For example, for a specific user, a service may be the most suitable choice, due to its very low delay and despite its high price, while for the other user, a service may be the most preferred one due to its low price.

Skyline Algorithm of Qos-Based Web Service Selection
(0) Initialize a data structure SWS := Φ containing records with an identifier and real values indexed by the identifiers, initialize lists 1 , . . . , := Φ containing records with an identifier and a real value, and initialize real values 1 , . . . , := 1.
(2) Get the next object new by sorted access on list .  (11) Do all necessary random accesses for the objects in that are also in SWS, and immediately discard objects that are not in SWS.
(12) Take the objects of and compare them pairwise with the objects, in . If an object is dominated by another object remove it from and SWS.
(13) Output SWS as the set of skyline web services.

Experimentation
In the section, we use two scenarios to evaluate the behavior of TCWS-CPN and the efficiency of our approach. We have conducted experiments in two scenarios. The first scenario: different services are generated to verify the validity of our TCWS-CPN model. In the second one, we use the OWL-S service retrieval test collection OWLS-TC v2 2 . The execution time of QoS services selection with skyline computation is compared with that without skyline computation.
The first scenario is implemented as follows. In order to evaluate the behavior of transactional selection approach based on TCWS-CPN, 10 user queries are generating with various kinds of inputs and outputs. The services are generating randomly from an ontology containing 20 generated elements each of which has between 1 and 5 inputs and between 1 and 3 outputs [20]. Every generated service is independently from the others. Experiments are conducted by implementing the proposed service selection approach with the program on a PC Core i3 with 2 GB RAM, Windows 7, and Java 2 Enterprise Edition V1.5.0. JDK 1.6 virtual machine is used to develop and run the program. The experiments involved composite services varying the number of activities and varying the number of web services.  In the first scenario, every web service has between 1 and 5 inputs and outputs, randomly generated from an ontology containing 10 generated elements. QoS attribute and transactional property of every service are also generated randomly but there are the relations between them. To model the fact, we assume that the execution price of service whose transactional property is is more expensive than whose transactional property is or , because the former provides additional functionality in order to guarantee that the result can be compensatable. Similarly, we believe that a , , or web service has execution duration higher than a nonretriable one, because the former provides additional operation in order to guarantee that it successfully finishes after a finite number of invocations. In addition, user's requirement and QoS weight have been randomly generated by varying number of inputs and outputs between 1 and 3.
Relationship of utility value and duration weight with different tolerance are depicted the more important the duration criteria to the user, the better a composition with tolerance 0 compared to a composition with tolerance 1 .
For the second scenario, we use the OWL-S service retrieval test collection OWLS-TC v2 2 . This collection contains services retrieved mainly from public IBM UDDI registries and semiautomatically transformed from WSDL to OWL-S. We apply skyline to select the best candidates for QoS selection. We compare execution time of QoS selection using skyline computation with the time without using Figure 5 illustrates the running time of QoS selection with (and without) skyline computation. Observe that the time without using skyline computation is higher than that using it.

Conclusion
CPN model allows describing not only a static vision of a system, but also its dynamic behavior, and it is expressive enough to capture the semantics of complex web services combinations and their respective interactions. In the paper we propose a hybrid solution that takes advantage of search metaheuristics techniques to consider functional conditions expressed as input and output attributes, and transactional properties expressed as a tolerance level. We incorporate transactional web services properties in the CPN model. To ensure reliable and correct execution, unfolding processes of the CPN are followed. The execution of transactional composition web service (TCWS) is formalized by CPN properties. To identify the best services of QoS properties from candidate service sets formed in the TCSW-CPN, we use skyline computation to retrieve dominant web service. It can overcome that the reduction of individual scores to an overall similarity lead to significant information loss. We also define QoS-based dominance relationships between services. To identify the best services from CPN model in QoS properties, we use skyline computation to retrieve dominant web service. We have shown how the best matches can be identified efficiently by a skyline computation algorithm, and we have addressed common tasks involved in the service selection process, referring both to the requesters' and the providers' perspectives.
In the experimentation, our intention is to compare both implementations under different characterizations of CPNs. Experimental evaluation on real and synthetic data shows that the best matches can be identified very efficiently, with a significant increase in recall and precision.
At the same time, the next step is to add automatic data mapping functionality into our system, using the semanticbased approach. In this paper, we utilize product-specific property to facilitate mediator service generation. To improve our prototype of the service selection process, by facilitating the user in expressing and refining his/her queries and providing faceted browsing capabilities.