Feilong Tang, Minglu Li, Jian Cao, and Qianni Deng. Coordinating Business Transaction for Grid Service. Proceeding of the Second International Workshop on ...
A Client-Side Workflow Middleware in the Grid1 Ying Li1,2, Qiaoming Zhu1, Minglu Li2, and Yue Chen1 1
Computer Science and Technology School, Soochow University, Suzhou 215006, China 2 Department of Computer Science and Engineering, Shanghai Jiao Tong University, Shanghai 200030, China {ingli, qmzhu, cheny}@suda.edu.cn {liying, li-ml}@cs.sjtu.edu.cn Abstract. Grid computing is becoming a mainstream technology for sharing large-scale resources, accomplishing collaborative tasks and integrating distributed systems. With the development of the Grid technology, the Grid will provide the fundamental infrastructure not only for e-Science but also for e-Business, e-Government and e-Life. The workflow management system in the Grid is important to support such Grid applications. This paper proposes a framework of client-side workflow middleware, puts the emphasis on the transaction management and service discovery in workflow. The transaction in the workflow includes atomic transaction and compensation transaction. The coordination of these transactions in workflow is introduced in detail.
1 Introduction Grid based computational infrastructure is an ideal computing platform to meet largescale resources and heterogeneity system [1]. Grid computing is becoming a mainstream technology for sharing large-scale resources, accomplishing collaborative tasks and integrating distributed systems [2]. In the past few years, the Computational Grid and Data Grid have received much attention, the server side applications, toolkits, middlewares are more available for the Grid, however the client side middleware for end Grid user is less concerned. For the workflow management system in Grid, much attention is put to e-science fields; little work has been done for the client-side workflow management system, which seems more close to our daily life than the Computational Grid. Although the Grid society has no clear definition for the information Grid, knowledge Grid, but the conception of such Grid is now widely accepted. The client-side workflow management middleware plays an important role in Grid: the e-business, egovernment in Information Grid need the workflow to coordinate varieties tasks and activities, the Grid user needs a way to compose existing Grid Services into a new business services. In this paper, a client-side workflow management middleware is proposed in the Grid. 1
This paper is supported by 973 project (No.2002CB312002)of China, ChinaGrid Program of MOE of China, and grand project of the Science and Technology Commission of Shanghai Municipality (No. 03dz15026, No. 03dz15027 and No. 03dz15028).
P. Lorenz and P. Dini (Eds.): ICN 2005, LNCS 3420, pp. 19–26, 2005. © Springer-Verlag Berlin Heidelberg 2005
20
Y. Li et al.
2 Background and Related Works According to the Workflow Management Coalition, workflow is concerned with the automation of procedures where information and tasks are passed between participants according to a defined set of rules to achieve, or contribute to, an overall business goal [3]. The traditional workflow management system (WFMS) is mainly concerned with the automation of administrative and production business processes. These processes coordinate well-defined activities that execute in isolation, i.e. synchronize only at their start and terminate states [4]. Currently a lot of workflow models were put forward to meet the requirement of the distributed, cross enterprise application integration (EAI). Recent years, Web Services became an important technique to serve e-business. The service based workflow protocol was designed such as Web Services Flow Language (WSFL) [5], Web Services for Business Process Design (XLANG) [6], Business Process Execution Language for Web Services(BPEL4WS)[7]. The Workflow Framework for Grid Services (GSFL) was put forward in article [8]. The Grid Services Flow Language is an XML based language that allows the specification of workflow descriptions for Grid services in the OGSA [1] framework. It has been defined using XML Schemas.
3 The Requirement of Client-Side Workflow in Grid In article [7] the author analyzed the existing Web Services workflow specification and put forward the GSFL to avoid some disadvantages in Web Services workflow. However, GSFL puts emphases on the effectiveness of exchanging large amount of data in Grid, the research is aimed at the server side workflow. According to the workflow in GSFL, we believe that in Client-side workflow environment, the following additional condition must be taken into account: - Transaction support Traditionally, transactions have held ACID properties. However, in Grid service environment, the coordination behaviors provided by a traditional transaction mechanism are sufficient if an application function can be represented as shortlived transaction performing stable state changes to the system. But they are less well suited for structuring “long-lived” application functions, and less capability to handle the coordination of multiple services. Long-lived transactions may reduce the concurrency in the system to an unacceptable level by holding on resources for a long time. If such a transaction aborts, much valuable work already performed in the workflow must be undone. Therefore, in a loosely coupled and service autonomic gird service workflow environment, it is inevitable that more relaxed forms of transactions, which don’t strictly abide to the ACID properties, will be required. - Grid workflow schedule and coordinate Compared with traditional workflow schedule where each service is statically created, the scheduling of workflow engine in Grid is more complex. Except the static scheduling which workflow engine allocates the resources according to the process
A Client-Side Workflow Middleware in the Grid
21
description statically binding the resources, there exists dynamic scheduling, which engine dynamically allocates the resources at runtime. - Easy composed and used by end user Currently the research of the Grid workflow is mainly in scientific field [10] [11]. The workflow system could be beneficial for modeling and managing scientific processes of experimental investigation, evidence accumulation and result assimilation [11]. Processes themselves can then be reused, shared, adapted and annotated with interpretations of quality, provenance and security. With the growth of the e-business in the Grid and the development of information Grid, user-composed or client-side workflow system must be taken into account. In the testbed of ShanghaiGrid [12], end users need a tool to published their Grid applications or compose existing Grid Services into a new business services to extend its business values. Under such circumstance, the Grid Computing Environment (GCE) must provide a way to let end user easily compose workflow, so client workflow management system is more important. Users, organizations and other roles in the Grid need a facility to assemble the Grid Services to form business logic or a new Grid Services in a workflow; such workflow is a dynamic process and maybe change frequently. The benefits of client-side Workflow in Grid include flexibility, adaptability and reusability. The research is to design a client-side workflow management middleware based on the GCE. It should include such high level feature: Grid Transaction support, Grid based services discovery, Rule-based workflow, GUI-enabled workflow composing tools.
4 Agent Based Transaction Management in Grid Workflow Based on our previous research on the transaction model in Web Services and Grid [13][14], Fig.1 shows the transaction architecture based on agent in the Grid workflow system. This architecture can handle two types of transaction in the Grid workflow system, which can be appointed by users or administrator: - Atomic transaction (AT). AT is used to coordinate activities having short-lived application and executed within limited trust domains. - Compensation transaction (CT). CT is used to coordinate activities having longlived application. In order to improve the concurrency, a compensation model must be applied in CT. 4.1 Atomic Transaction (AT) Coordination in the Workflow AT holds the ACID properties. In some condition, especially in short-lived application, AT will provide a more efficient way to accomplish workflow; meanwhile it has consistent failure and recovery semantics. The AT coordination in the workflow includes following steps: - Initiation: the Agent in workflow engine creates the transaction management and sends the Coordination Context (CC) message which includes necessary information
22
Y. Li et al.
to create a transaction such as transaction type AT, transaction identifier, coordinator address and expires to the Grid Services participate in the workflow. The lifecycle of CC will extinct till the transaction finished. - Preparation: the coordinator send prepare information to the Grid Services’ agent, and each service will first attempt to reserve all the needed resources. If successes, agent returns the success message to the coordinator, otherwise, returns the failure message.
Fig. 1. Transaction architecture for Grid workflow
- Execution: Pi (i=1..n) is the ordered execution activities participate in the workflow, P1 is the start activity and Pn is the end activity. Ri(i=1..n-1) is the rule to determine if the return value of Pi suits certain condition. At certain time point, P1…Pk-1(1