A Framework to Improve Adaptability in Web Service Composition Wenjuan Lian
Qingtian Zeng
College of Network Eng. Shandong University of Science& Technology Qingdao, Shandong, 266510, China
[email protected]
College of Information Science& Eng. Shandong University of Science& Technology Qingdao, Shandong, 266510, China
[email protected]
Yongquan Liang
Jingjing Yan
College of Information Science& Eng. Shandong University of Science& Technology Qingdao, Shandong, 266510, China
[email protected]
Department of Computer Engineering TaiZhou Vocational & Technical College. Taizhou, Zhejiang, 318000, China
[email protected]
Abstract-Web
service
combination,
which
integrates
independent and modular distributed services, has loosely coupled, location transparent, protocol independent and other characteristics, but it is still lack of autonomic, self-adaptive and self-organized characteristics, and it's difficult to deal with the
complex,
environment.
dynamic,
A
open
framework
and to
uncertain
improve
Internet
composition
adaptability of web services is proposed in the paper. This framework makes use of agents to supervise and manage service composition implementation. It can deal with various service failures, face different circumstances, and ultimately improve the adaptability of service composition in real-time
and error compensation mechanisms embedded in the process. After analyzing a variety of cases encountered in the Internet, we compare different adaptable techniques, and then give a framework which can improve the robustness and adaptability of service combination. The framework is proactive, because it can insert policies in advance of error occurrence. During running time, it can be context-aware. In addition, the model combines agent technology, joins with users' interaction, it has more flexibility and adaptability than traditional technologies.
context-aware style. To evaluate the proposed framework, the
II.
prototype implementation and data analysis are given at last.
Keywords-web service; service composition; adaptability; agent; context-aware I.
INTRODUCTION
Compared with the traditional enterprise application integration technology, web service technology provides loosely coupled, cross-platform, interoperable and dynamic shared software services in the Internet. Business process management techniques specify the sequence of a set of web services, the shared data between partners, the roles that partners act as, and also some exceptions handling. Process management technologies include XPDL [1] proposed by WtMC; BPDM [2] proposed by OMG; BPML [3]proposed by BPMI, etc. In addition, web service composition is often divided into orchestration (such as BPEL [4]) and choreography (WSCDL, e.g.). BPEL is more usually used. Exception handling mechanism [5] is an important part in process management technology. In BPEL, users can add fault handler to capture and deal with exception. Although fault tolerance and compensation mechanisms are provided in business process management technology, they are not sufficient in complex network environment. Because the Internet is an open environment, a running process often faces problems such as old services are not available and new services are registered. As a business process may run a few days, months or even years, it has a high rate of errors. It is far from smooth implementation only with fault handlers
978-1-4244-6349-7/10/$26.00 ©2010
IEEE
A.
RELATED WORK
Three Viewpoints
C. Courbis and A. Finkelstein divide adaptability into static and dynamic, manual and automatic, proactive and reflective[6]. Static adaptability needs to modify the source code, and dynamic adaptability means changing at run-time. Manually increasing the adaptability needs direct involvement, while automatic mode refers to run automatically. Proactive adaptability takes place before events, while reflective adaptability occurred later after events. In general, in order to improve adaptability, researchers mainly study in the following aspects: 1) Expand traditional combination languages such as BPEL. The approaches include adding exception handling mechanism or service failure policy. For example, BPEL is extended by embedding Java fragments [7]. Precondition constrains are added on the basis of the original discovery and binding mechanism by element to improve implementation efficiency [8]. Similarly, is embedded into to support run-time adaptation [9], but the drawback is it needs modify source code. On this basis, policy-based approach is proposed [10], in which a new semantic is defined to expand primitive. A new language V xBPEL [11], as extension of BPEL, is able to capture variability and adaptability by introducing new activities, such as variation points and variants.
Vl-616
and other characteristics, which can help it to deal with accidents with intelligence. How to combine agent technology with web services and allow them to work together is appealing more and more researchers. Agent FIPA specifications and web service standards have their own characteristics as well as some similarities. They can complement each other. By using agent to expand web service, the interoperability between agent and web service is improved, gap between them is filled, and high-level application is eventually achieved [22]. The relationship between semantic web service and agent is analyzed, and agent BDI model is combined with semantic web [23]. By using agent to encapsulate users' will, coordinate users' goal, ultimately web service is invoked. A rule-driven approach to control the executions of business processes via agents' behavior rules is proposed in [24]. The framework is easy to extend, but it needs to convert process and policy unit to rules, and the rules can be driven by engine to guide agent behaviors. In conclusion, dynamic service composition is not only based on traditional workflow technology, but also on the use of intelligent agent. With the advantages of agent's and interoperability cross-platform autonomy, characteristics, the adaptability of traditional web service combination will be greatly improved.
2) Construct hierarchical model [12]. In order to make web service adapt to changes, operating environment is divided into various stages, and a feedback mechanism between stages is proposed [13]. Similarly, three aspects of dynamic adaptation: model-level, instance-level and runtime environment changes are discusses [14]. In addition, a reflective system [15] is structured in two levels, called respectively base-level and meta-level. The shortcomings of these hierarchical models are obvious. Firstly, a particular model is established for a specific BPEL combination. If a combination is complex, the corresponding model is complex too. Secondly, exception handling is often associated with control logic, which requires a user to analyze exception by combining semantic, but at present stage it can't be well handled. Thirdly, this method is lack of versatility. 3) Use middle-ware techniques. MASC-.NET-Based middleware is designed and described by WS-Policy [16]. Charfi uses aspect-oriented container to provide middleware support for BPEL [17]. The shortcoming is the adaptability is at lower message layers and it must rely on specific BPEL engine. In addition, programmers should be familiar with paradigm. Erradi's work [18,19] is similar to Charfi's, he uses AdaptiveBPEL which is combined with aspect-oriented method to meet QoS and process logic requirements. With aspect-oriented technology rules can be inserted into process [20,21], but reasoning and conflict management of these rules must be maintained by programmer which needs more difficult work. B.
III. A.
THE PROPOSED FRAMEWORK
Multi-layered Service Structure
The framework presented here is based on a multi layered architecture that is composed of four different layers, which includes message layer; service description layer, service operation layer and service application layer, which is shown in Fig.l.
Agent Applications
Web service technology does not well support dynamic, adaptive business process. Agent has belief, desire, intention
E,.COMIvlERCE.. E,.BUSINESS, E,.CO VERNMENT.........
SeIVice' Applic:ation·Laye .....
SeIVice' Operation' Laye
Monitoring'&'�Jrent+-' XPDL. BPML. BPEL. WSCDL......... DiscDVeZY, Selection, Invocation . . .
.
.
OWL-S, W S MO, SWSF, WSDL-S..
...
SeIVice'Description'Layer+-
...
XSD, WSDL. UDDI. ........
I
XML. SOAP, WS-Addressing
Figure I.
. ... .
I
Mess�·Laye
Multi-layered Service Integration
The bottom is the message layer which provides basic communication. The top is the service description layer which can be divided into two kinds of service description technology. Basic service description technology is based on
Vl-617
. .
XML, such as WSDL. Traditional Web services mechanism is based on key words, which can't support semantic web. In order to improve recall rate and precision, semantic web technologies are added. Semantic web technologies such as
2010 2nd International Conference on Computer Engineering and Technology
[Volume 1]
OWL-S, WSDL-S and WSMO have become more and more important. The third layer is service operation layer. On the basis of service discovery and selection, distributed web services can be combined to implement complicated task. To improve automation and intelligent level, an agent-based framework for personalized web service recommendation is presented in [25]. Our work focuses on the top of process definition technology, mainly monitors and manages process execution to insure process robustness and adaptability. The highest layer is the application layer which performs useful activities for users. B.
open network environment, the following situations must be considered. 1) A bound service is unavailable. The reason may be out of service, failure of service or constrained system resource. Service failure may be resulted from link congestion, too much service invoking, server down or some other reasons. 2) Users intentions change. The reason may include higher requirements on services or Qos change. 3) The emergence of new services. The reason may be service improving or upgrading, such as versions change or new patches release in case of security. With the above problems which may occur usually, how to dynamically improve service adaptability is a major problem. Some researches of integrating agent technology have been studied. In our research, the main work is in the service operation layer, which mainly improves process the adaptability. Combined with agent, the process can achieve the ultimate self-healing, self-management and adaptable characteristics. The model is presented in Fig. 2.
The Agent-based Adaptive Framework
As mentioned above, although service combination has many useful characteristics, it is still lack of autonomy, self adaptive, self-organization, mutual communication and mutual understanding. It is difficult to cope with complex, dynamic and open network. If a specified service is not available, it often leads to interruption of the entire process. The change or re-implementation not only results in resources waste and time increasing, but also makes it difficult to meet actual needs, especially for financial systems and control systems. In general, in a complex and
qr H
Interactive Agent
Management Agent
Perception Agent Evaluation Agent
Policy Agent Matching Agent
Discovery Agent
...J.
Vt-----l\ I'rv'
� BPEL Engine
Figure 2.
The Agent-based Adaptive Framework
In the adaptive model, the bottom layer is BPEL engine, it is responsible for parsing and execution of BPEL, and provides operating environment for BPEL process. The top layer is user layer. Between user and engine is the agent layer, which is also the most important layer of the model. The agent layer accomplishes specific tasks, such as monitoring service execution, finding and implementing strategies. The main agent roles in agent layer are as follow. 1) Interactive agent. Its main function is to interact with users, set up event handling according to needs before exceptions or after exceptions. The preconditions can be properties of an object, and the consequence can be an alarm or a policy. Users can define events in case of exceptions. Events may be a message designed to notify the user, or a log file to record running state. In addition, users can configure other items, such as process starting time, running time, used resources, the number of modifyied times and service redirected times, reasons, frequency.etc.
[Volume 1]
r I'-
...... .-" Policy Database
"-
J
2) Management agent. Management mechanism is very important for system robustness. In a dynamic, complex distributed environment, the overall situation of the system needs to be understood in a global way. Since interactions between agents are not predictable, there may be communication failures or implementation failures. Therefore, it needs management agent to monitor a variety of failures and errors, and guide users to diagnose and repair the system. 3) Perception agent. It senses running environment states, such as network bandwidth, system load, quality of service change, response time, completion time, invoking frequency, reliability and so on. If the value of monitoring object is higher or lower than predefined threshold, the pre deployed task can be implemented. If an exception occurs, the corresponding measures can be taken. For some
2010 2nd International Conference on Computer Engineering and Technology
Vl-61B
related parameters in real time. Once an exception is sensed by perception agent, an alarm is raised or a corresponding policy is searched in policy database. Next policy agent implements the policy. Various operations include: finding web service with similar functions; selecting appropriate web services according to properties such as QoS; solving incompatible problems between heterogeneous messages from different services. At last running exception is recorded and the corresponding parameters are modified.
accidents which can not be handled, they can be recorded to log file for later analyzing and processing. 4) Discovery agent. Its task is supporting run-time re binding mechanism, discovering new services in the Internet. 5) Matching agent. Matching agent completes heterogeneous messages conversion service. It inserts new service between upper level service and lower level service. Since participant services are provided by different organizations and different designers, there are mismatches not only between output messages of upper layer service and input messages of selected services, but also between output messages of selected service and input messages of lower layer service. So it is necessary to match heterogeneous services, eliminate inconsistencies between services and ultimately achieve seamless integration with the original system. 6) Policy agent. Policy agent mainly explains and implements a policy file. A policy file is made up of a set of rules, which are organized according to specific grammar. 7) Evaluation agent. It can assess the reliability and the adaptability of a process. At present there are no unified quantitative parameters or standard about adaptability measurement. According to perception agent and monitoring agent record, as well as historical data from related experiments, evaluation agent will give a final classification report. There are many good characteristics in the proposed framework. Firstly, with agent layer, process supervision and management will be completed by agents; no additional workload will be added. Secondly, policy-based approach enhances the ability to deal with unexpected accidents. Users can customize management policy through interaction with interactive agent. Users can customize specific operations, such as deploying monitoring objects, setting alarms, designing strategies, to fulfill specific need. Thirdly, the framework is independent of modeling language; it doesn't change the existing process standards and require the user to modify the underlying source code. It is portable and easy upgraded. C.
IV. A.
The main work during execution, such as monitoring environment, handling accidents, recording log, is done by agent. The implementation steps are as follows: Users sets monitoring objects, warnings, strategies etc. through interactive agent. Then BPEL process is driven by BPEL engine. According to supervision settings, perception agent supervisions web services, running environment and other
WS1 WS2
Main Implementation Steps
As an execution language, BPEL needs a good design and development environment support as well as a good operating environment. Some engines, e.g. IBM and Oracle products, are too large and without source code. Some engines are open source, such as Twister and ActiveBPEL. We use ActiveBPEL, a commercial BPEL engine written in Java, it can be implemented in any of Java Servlet container, such as Apache Tomcat. In order to support run-time implementation of adaptive service composition, it can be realized by JMX expansion. Then it can change related objects' configuration state, reconfigure process and support policy file parsing. In ActiveBPEL, the implementation of an invoking activity to AXIS is a handle, the required invoking information is provided by activity's properties. If an AXIS error occurs, it may be detected by a handle, and then it is notified to error events, error events are notified to error process, error process is notified to the engine. The extension is implemented by agents and seamlessly integrated into BPEL engine; adaptive strategies can be added at design stage or in run time by process modeling and maintenance person. Now, we give some implementations as follow. I) Monitoring Objects Setting. In order to manage process execution, it's necessary to monitor service invoking and operating environment changing in real time. Some specific services and their attributes can be supervised according to users' requirement. Here we give some objects and their properties setting. There are two kinds of objects: service objects and environment objects. Table 1 is an example of monitoring service objects. Each line in table 1 is a service supervised in process; each column is a property of a service. Properties include response time, execution time; invoke number, failure number, etc. The service monitoring table corresponds to a two dimensional matrix "Ws" with values of 0,1. If the value in the table is 1, it indicates to monitor the corresponding service and property, otherwise it indicates not to monitor. During process implementation, users can view and modify monitoring table at anytime if there is a need.
Running Mechanism
TABLE!.
IMPLEMENTATION
MONITORING TABLE
Accessibility
Invoke_number
Failure_number
0
1
0
1
1
0
1
1
Response_time
Execution_time
1 0
. . . . . .
. . . . . .
Vl-619
2010 2nd International Conference on Computer Engineering and Technology
[Volume 1]
The process implementation is closely related to running environment, so it needs to monitor environment-related objects, such as CPU, hard drives, memory, network and so on. The corresponding parameters include processor time, memory available Mbytes, physical disk %busy time, network interface packets/sec etc. Users can customize monitoring objects and their counters. Fig. 3 shows the interface to customize monitoring objects. Perception agent can give real-time values in the form of dynamic curves or histogram. r Local Ma.chine,
12009
Start Time:
11
20 3
r Select Remote Machine Record to: Performance Obj eel:
r All Counters
----
r
Log fil.
r
Dahbas
(" Select Counters
Sampling inhrval:
Figure 3.
r--I
Seconds
Customize Monitoring Objects
2)
Alarms Setting When the value of a monitoring object is out of the range of predefined threshold, an alarm can be raised. In an alarm, object, property and expression can be customized. The interface is shown in Fig. 4. With "Actions: " it can be specified where an alert will be sent to. In general "Recorded to management log" check box should be selected to retain a backup of alarm events. Select "Send a network message to:" check box to specify whether to send alerts to network or to other computers. Choose "Run this program:" check box to specify the procedure to run or select "Invoke a policy:" to automatically implement a policy. In the "plan:" you can specify the effective time to work, including "start time:" and "end time:".
d
Object:
Property:
I
Exprluion:
A.ctions:
r
Recorded to manacement 10C
r
Send .. network lIessace to:
r
Run lhi s program:
r
Invoke a stratecy:
Plan:
L
limO:
12009
9 10
:::J
OK
Figure 4.
[Volume 1]
I ,..-1--- I End time:
d
Customizing an Alarm
Policy Customizing Policy agent finds a specific policy in policy database and implements it. Policy database is a collection of policies. There are two kinds of policies which can be parsed and implemented by policy agent, specific policies and common policies. If policy agent can' t find the designated policy, it will adopt a common policy. Policy is written in high-level language which supports common grammar structures such as if and while. A policy file is as follow. 1 0>