Coordinated Control and Estimation of Multiagent Systems with Engineering ApplicationsView this Special Issue
A Dynamical Reliability Prediction Algorithm for Composite Service
Dynamic selection and dynamic binding and rebinding at runtime are new characters of composite services. The traditional static reliability prediction models are unsuitable to dynamic composite services. A new reliability predicting algorithm for composite services is proposed in this paper. Firstly, a composite service is decomposed into composition unites (executing path, composite module and atomic service) according to their constituents. Consequently, a hierarchical graph of all composite units is constructed. Lastly, a new dynamic reliability prediction algorithm is presented. Comparing with the traditional reliability model, the new dynamic reliability approach is more flexible, which does not recompute reliability for all composite units and only computes the reliability of the effected composite units. In addition, an example to show how to measure the reliability based on our algorithm is designed. The experimental results show our proposed methods can give an accurate estimation of reliability. Furthermore, a more flexible sensitivity analysis is performed to determine which service component has the most significant impact on the improvement of composite service reliability.
With the rapid development and widespread use of web services, more and more businesses are achieved by composite services which can be created by aggregating a number of atomic or composite services (called service components) by following certain composition pattern and rules. Thus, how to ensure the reliability of composite services has become an important problem. In addition, a large amount of function-equivalent services has been in the Internet, which make more services be selected. Users can translate their requirements for services to the constraints of some QoS properties . Then, different users may select different service to realize the same function based on different QoS constraints. There are two methods for web service composition: static composition and dynamic composition. In static web service composition, composition is performed manually; that is, each web service is selected and bound before execution. Static composition is sufficient for constructing applications with well-defined specific requirements that are not likely to change frequently. But, it is not flexible and agile enough when the requirements are changed frequently. Dynamic web service composition can achieve this goal as, in dynamic composition, services components are selected at runtime from a set of service components and when the selected service components failed, the new selected service components will replace them while keeping the running services constantly available to users . Dynamic service composition provides an ability to rapidly adapt to changes that were not envisioned during design time.
Dynamic binding and rebinding are the basis for the dynamic composition. There are three kinds of binding: early binding, local binding at runtime, and rebinding at runtime [3–6]. In early binding, the service is selected and bound before execution, which is also called static binding. In local binding, when a composite service is running, one of its service components is bound to a selected service according to some QoS properties before it is invoked. Local binding can help service components to avoid binding to failed services and reduce the failure probability of composite services. During the execution of a composite service, when the QoS of some service components do not satisfy the requirements of the user or the bound services fail, the composite service will pause, and after new services are bound to the service components, the composite service continues to run; the binding in this process is called rebinding at runtime.
To address the above problems of dynamic composition, traditional static reliability model to predict the reliability is not applicable to services with dynamic composition. A new dynamic reliability model is presented for the dynamic service composition in this paper. The new model makes the computation simple when the reliability of some service components is changed frequently.
The remaining sections of the paper are organized as follows. Section 2 describes the related works. Section 3 discusses some concepts about composite units. Section 4 describes the reliability of the composite units. Section 5 presents the dynamic reliability prediction approaches based on the hierarchical graph. Section 6 conducts some experiments to verify our reliability algorithm. Section 7 presents the conclusion and our future works.
2. Related Works
The existing reliability predicting models can be divided into two categories: black-box and white-box [7, 8]. The black-box models, such as the Bayesian models, the SRGM (software reliability growth models), and the statistical models, only consider the functionality of software while ignoring its internal structure. The white-box models estimate the reliability of a software system based on its internal structure. The structures are often described by Markov chain [9–19] or Petri net [20, 21]. These white-box models can be further divided into three categories: state-based models, path-based models, and additive models. As these models are often developed for component-based software systems, they are also called component-based reliability models (CBRM). The state-based models which are the common models usually model the system as a discrete-time Markov chain (DTMC), a continuous-time Markov chain (CTMC), or a semi-Markov process Markov chain (SMP). Wang et al. presented a typical state-based model which described four common architecture styles, including batch-sequential, parallel/pipe-filter, call-and-return, and fault-tolerance styles, and proposed a transformation from architecture view to state view to perform reliability analysis . S. Gokhale et al. classified the state-based models from three aspects: the architecture of the application, the failure behavior of components, and the analysis methods. The architectures were CTMC or DTMC and the Markov chain was irreducible or absorbing. The failure behavior was represented by reliability, constant failure rate, or time-dependent failure intensity. The analysis method was composite or hierarchical. In sum, they gave seven kinds of DTMC-based models and CTMC-based models.
The emergency of web services makes the software system be dynamic discovery and binding, which make the development and the execution be more complex. Then, web services are more prone to failure than traditional distributed software. It is necessary to develop new methods to predict the reliability of services [17–19]. Tsai et al. extended the components based reliability models to services reliability analysis [20, 21]. The structure of services is also described as Markov chain. Wang et al. proposed a hierarchical reliability model which divided the reliability of services into data reliability, service components reliability, service pool reliability and composite services reliability [22, 23]. Zheng and Lyu proposed a collaborative reliability prediction approach, which employs the past failure data of other similar users to predict the web service reliability for the current user [24, 25]. This method needs large amount of user data; when the number of user is small, it is difficult to classify a user to its similar group. The composition process of web services is actually a workflow process; then a workflow-based model is also a usual method to predict the reliability . Moreover, there are also other approaches to estimate the reliability of composite services from the ports, message delivery, or network transition [27–31]. Web services are different from general software system, as they are dynamic composition. Most of the existing reliability models are based on the service components in the design phase, without considering the dynamic selection and binding. In this paper, we would propose a new dynamic approach to predict the reliability of services.
3. Composite Units
Composite services are divided into atomic service, composite unit, execution path, and composite service according to their different constituents. We will discuss the four composite units in detail.
3.1. Atomic Service (AS)
An atomic service is the smallest organization unit of web service. In other words, it would be impractical to decompose an atomic service. An atomic service has a fine-grained structure which can be designed, implemented, and tested independently. A composite service is a composite process; in dynamical composition, the service component in composite process is called abstract service. When the service is invoked, the abstract service is bound to the concrete service. There are several concrete services offering the same piece of functionality, which means that several concrete services may match an abstract service in service specification. So, the reliability of atomic service is changed in the execution process.
3.2. Basic Composite Module (BCM)
Service composite module is composed of a set of services according to some operations. The constituted services may be atomic services, composite modules, or composite services. The operations are sequence, choice, loop, and concurrent. According to the operations, the service composite modules can be divided into four categories, that is, sequence module (SM), choice module (CM), loop module (LP), and concurrent module (CoM). If all services in a composite module are atomic services, the composite module is called a basic composite module (). Let , is the set of atomic services, and is the operator of atomic services, .
3.3. Execution Path (Path)
All services invoked sequentially are defined as an execution path when completing a task. Let , , , and the in is sequential.
3.4. Composite Service (CS)
The execution of a composite service is combined by several paths. Let , where is the execution path, , and is the execution probability of . An example of a composite service is shown in Figure 1; the composite service has two execution paths, , . Services in an execution path of composite services may be atomic services, service module, or composite services; then they have . A composite service includes several paths and the composite modules in a path may be or other composite modules which have some . Any composite service can be finally divided into several execution paths consisting of several . We will prove the theorem.
Proposition 1. Any composite service can be finally divided into some execution paths which consist of several .
Proof. As a composite service constitutes several execution paths by the probability, suppose that a includes another composite module which consists of several atomic services and a , and , where and . We use and as an example to illustrate the problem. If we introduce composite module into , we will get . Then, a composite module can be deeply divided into atomic services and the decomposition does not affect its execution path. If one of the operations is , the execution path can be replaced by more execution paths. As are one of the four operations, the execution path is not affected except when one of the operations is . One composite module can be decomposed into one or more , and the corresponding execution path can be extended into more execution paths. So, a composite service can be finally divided into some execution paths which consist of several .
3.5. Hierarchical Graph of Composite Units
In this section, we will describe a hierarchical graph to represent the composite unit: composite service, path, basic composite module, and atomic service, while the following section describes how to calculate the graph attributes.
Definition 2 (hierarchical graph). A hierarchical graph is defined by a 2-tuple , where is a DAG (directed acyclic graph). is a set of nodes in the graph, , and is a set of directed edges in the graph, , .
Definition 3 (node). A node models a composite unit and is defined by a 2-tuple , where is the name of composite unit and is the reliability of composite unit .
Definition 4 (edge). A directed edge models the constitution of composite units and is defined by the tuple , where are nodes, the node is one of the components of node , and is the weight of edge from node to which describes the constitution of and . If , the edge represents the node consisting of according to structure, if , the edge represents the node consisting of according to or structure, and if , the edge represents the node consisting of according to structure.
As shown in Figure 2, the node is the composite service, the nodes and in level 2 are the execution paths of composite service , the nodes , , and in level 3 are the of , the nodes , , , , and in level 4 are atomic services, and the nodes in the last level are the matched concrete services of atomic service .
4. Reliability of Composite Units
4.1. Reliability of Atomic Services
An abstract service may have several concrete services to be matched; then, different user may select different concrete service to be bound for the same abstract service as they have different QoS requirement . For example, there are an abstract service and three matched concrete services , , and . The reliability of the three concrete services is , and one of the QoS . The reliability and price of are the highest, and is the lowest. If a user only cares about the reliability and has no claim for price, he may select to be invoked. Other users may have different choice considering the price. The binding information can be recorded by monitor mechanism, and the binding probability can be computed from this information . Here, we assume that the binding probability is known. As shown in Figure 3, the reliability of atomic service can be computed by the following:
where is the reliability of an abstract atomic service node , is the reliability of , which is a concrete atomic service to be bound to , and is the binding probability of node to node . After the binding changed, the reliability of atomic service must be recomputed according to the above formula.
4.2. Reliability of Basic Composite Module
Sequence module (), choice module (), loop module (), and concurrent module () are four kinds of composite modules. Next, we will discuss their reliability in a dynamic environment.
4.2.1. Sequence Module/Concurrent Module
As shown in Figure 3(a), node is SM or CM, nodes are the atomic services which compose the or , and the weight of edge from node to , , is 1. The reliability of or is
In the equation, if the binding probability of an atomic service is changed, then the reliability of will be changed, and the reliability of will be changed. Let be the changed value of ; then the new value of node can be represented by From the equation, we can see that when the binding of a service has been changed, it does not need to recalculate the reliability of the entire services. As long as the changed value is calculated, the whole reliability can be known.
4.2.2. Choice Module
As shown in Figure 3(b), the weight of edge from node to node is less than 1; the composite module is . The reliability of can be computed by the following expression: If a binding probability of an atomic service (e.g., ) is changed, the reliability of the atomic service must be recomputed, , where is the changed value of node . Thus, the new reliability of can be expressed by the following: and .
4.2.3. Loop Module
As shown in Figure 3(c), the weight of edge from node to node is larger than 1, the composite module is , and the weight of edge is the number of times. The reliability of can be computed by the following expression: If the binding probability of is changed, is the changed value of node . The new reliability of can be expressed by the following: From (7), we also can see that when the reliability of an abstract service in is changed there is no need to recalculate all reliabilities of services in to get the reliability of the entire service. It is easy to get the reliability of the entire service as long as the changed value has been got. In a word, the incremental reliability of is
4.3. Reliability of Path
As shown in Figure 2, an execution path is a sequence structure of all its in the path. The weight of edge from execution paths to its is 1. So, the reliability of execution path is the same as :
4.4. Reliability of Composite Service
The execution of a composite service can be divided into several paths, and each path is executed according to a probability. Assume that node is a composite service in Figure 2 that has several execution paths, ; their execution probabilities are and their nodes are . Then, the reliability of composite service can be calculated by
If the reliability of has been changed, and is the changed value of , the new reliability of composite service can be recalculated similar to the :
where and is the changed value of composite service.
5. Reliability Prediction of Composite Service
Composite services can be decomposed into three layers, that is, path layer, BCM layer, and atomic service layer. Thus, the reliability of composite services can be calculated by the reliability of path, BCM, and atomic service. In this section, we will discuss how to compute the reliability of composite services.
5.1. Reliability Algorithm for Composite Service
The nodes in different layer in Figure 2 represent different composite units. We assume that the reliability of atomic services is known, and the reliability of other nodes can be derived from the reliability of their next layer nodes. We can get all the reliabilities of nodes from bottom to up. The algorithm calculates the reliability of all nodes in the hierarchical graph of the composite service (Algorithm 1). The parameter is the hierarchical graph and is a node, , whose initial value is
When the algorithm is invoked, parameter is the composite service node . The calculation process is the traverse process and all reliabilities of nodes are calculated in traverse of graph. Then the time complexity is the same as the traverse process, which is , is the number of nodes, and is the number of edges.
5.2. Dynamic Reliability Algorithm for Composite Services
If the reliability of an atomic service is changed, the composite service will be affected. In this section, we will discuss how to perform our dynamic reliability model to evaluate the reliability of composite services. Not all composite units are affected by the atomic service; we only recalculate the reliability of the influenced nodes. For example, in Figure 4, the nodes with bold line are the affected nodes. The first step is to find all affected nodes, for example, , , , , , , and in Figure 4. Then, all the affected nodes are extracted to a subgraph in Figure 5. We present an algorithm to calculate the reliability of the affected nodes (Algorithm 2). The parameter is the subgraph and is a node in subgraph . Variable is the reliability of node . The returned result () is the incremental reliability of a composite service and .
6. Case Study
6.1. Experimental Setup
We demonstrate the reliability prediction model with a typical example of a service for travel. In this example, the composite consists of 11 atomic services, and we assume that their reliability is known. As shown in Figure 6 the composite service can be divided into 4 execution paths and 7 basic composite modules. Its hierarchical graph is Figure 7.
6.2. Comparison of Prediction Accuracy
To study our method performance, we compare our prediction approach with the user-object reliability model (UORM). As shown in Figure 8, success and failure states are added to the state diagram of UORM, the transition matrix is , and the reliability is From Table 1, we can see that the result of our approach is the same as that of UORM.
6.3. Dynamic Reliability Prediction
If the reliability of atomic service is changed, the affected composite units are , , , , and . According to (11), we have If , the new reliability of composite service is . The computing process is very simple, but, according to UORM, the transition matrix must be rebuilt. The new reliability . From the results of two methods, we can see that our dynamic approach is simpler than UORM, especially when the atomic services are not fixed; then our approach is more applicable to dynamic web services.
6.4. Sensitivity Analysis
Sensitivity analysis helps to understand the impact of the reliability of service components with respect to the system or composite service reliability . The sensitivity of composite service reliability based on our approach with respect to a given atomic service can be defined as The higher sensitivity indicates the greater impact on the reliability of composite service. The results of sensitivity analysis are shown in Table 2. From Table 2, we can see that sensitivity of atomic services , , , , and is the same. The atomic service has the lowest sensitivity among all abstract services, because the atomic service in the execution path and the execution probability of is the smallest. We will try to improve the reliability of some critical atomic services to improve the reliability of the composite service.
7. Conclusion and Future Works
In this paper, a new approach has been proposed to evaluate the reliability of composite services based on the hierarchical graph of composite units. The composite services can be decomposed into four different kinds of composite units, and they are , , , and nodes in the hierarchical graph from bottom to top layer. We proposed a recursive algorithm to compute the reliability for the four kinds of nodes from down to up, which simplifies the whole computational process. We also proposed an algorithm to compute the reliability of some affected nodes when some atomic service nodes are changed. The approach firstly searches the affected path in the hierarchical graph from the changed atomic service node to the root node and all nodes in the path are affected by the atomic service. The reliability of nodes in the affected path is recalculated, and the reliability of composite service is recalculated based on the reliability of paths, instead of recalculating the reliability of all nodes. A case study illustrates how to apply the proposed methods to estimate the composite service reliability. The results of case study show the effectiveness and usefulness of our approach. The proposed approach has some limitations. Currently, a composite service may have more than one decomposition. Which decomposition is the best way and how to select the best decomposition are our new future works.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work is supported partially by the National Natural Science Foundation of China under Grant nos. 61304174 and 61304117.
V. Agarwal and P. Jalote, “From specification to adaptation: an integrated QoS-driven approach for dynamic adaptation of web service compositions,” in Proceedings of the IEEE 8th International Conference on Web Services (ICWS '10), pp. 275–282, Miami, Fla, USA, July 2010.View at: Publisher Site | Google Scholar
I. Satoh, “Spatial connector: loosely bind ing contextual changes and non-context-aware services,” in Proceedings of the 8th International Joint Conference on Software Technologies, pp. 50–57, Reykjavłk, Iceland, 2013.View at: Google Scholar
G. Canfora, M. D. Penta, R. Esposito et al., “Service composition (re)binding driven by application-specific QoS. Service-oriented computing,” in Proceedings of the 4th In ternational Conference Service-Oriented Computing, pp. 141–152, Chicago, Ill, USA, December 2006.View at: Google Scholar
M. D. Penta, R. Esposito, M. L. Villani, R. Codato, M. Colombo, and E. Di Nitto, “WS-Binder: a framework to enable dynamic binding of composite web services,” in Proceedings of the International Workshop on Service-Oriented Software Engineering, pp. 74–80, Jhongli, Taiwan, December 2008.View at: Google Scholar
R. C. Cheung, “A user-oriented software reliability model,” IEEE Transaction on Software Engineering, vol. 6, no. 2, pp. 118–125, 1980.View at: Google Scholar
R. Yingxin, Q. Gu, Q. Jingxian, and D. Chen, “Reliability prediction of web service composition based on DTMC,” in Proceedings of the 3rd IEEE International Conference on Secure Software Integration Reliability Improvement (SSIRI '09), pp. 369–375, Shanghai, China, July 2009.View at: Publisher Site | Google Scholar
Y. N. Xia, X. Luo, J. Li, and Q. S. Zhu, “A petri-net-based approach to reliability determination of ontology-based service compositions,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 43, no. 5, pp. 1240–1247, 2013.View at: Google Scholar
W. T. Tsai, D. Zhang, Y. Chen, H. Huang, R. Paul, and N. Liao, “A software reliability model for web services,” in Proceedings of the 8th IASTED International Conference on Software Engineering and Applications, pp. 144–149, MIT Cambridge, November 2004.View at: Google Scholar
L. Wang, X. Bai, L. Zhou, and Y. Chen, “A hierarchical reliability model of service-based software system,” in Proceedings of the 33rd Annual IEEE International Computer Software and Applications Conference (COMPSAC '09), pp. 199–208, Seattle, Wash, USA, July 2009.View at: Publisher Site | Google Scholar
Z. B. Zheng and M. R. Lyu, “Collaborative reliability prediction for service-oriented systems,” in Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, pp. 35–44, Cape Town, South Africa, May 2010.View at: Google Scholar
L. Coppolino, L. Romano, N. Mazzocca, and S. Salvi, “Web services workflow reliability estimation through reliability patterns,” in Proceedings of the 3rd International Conference on Security and Privacy in Communication Networks (SecureComm '07), pp. 107–115, Nice, France, September 2007.View at: Publisher Site | Google Scholar
C. J. Prakash, P. M. Rohini, R. B. Ganesh, and V. Maheswari, “Hybrid reliability model to enhance the efficiency of composite web services,” in Proceedings of the IEEE International Conference on Emerging Trends in Computing, Communication and Nanotechnology (ICE-CCN '13), pp. 79–83, Tuticorin, India, March 2013.View at: Publisher Site | Google Scholar
M. Silic, G. Delac, and S. Srbljic, “Prediction of atomic web services reliability based on K-means clustering,” in Proceedings of the 9th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 70–80, Saint Petersburg, Russia, August 2013.View at: Google Scholar