SGSP - A Workflow Based Middleware for Service ... - Semantic Scholar

3 downloads 0 Views 423KB Size Report
Yi Wang, Minglu Li, Jian Cao, Lin Chen, Feilong Tang, Xinhua Lin. Department of Computer Science and Engineering, Shanghai Jiao Tong University.
SGSP - A Workflow Based Middleware for Service-Oriented Computing Yi Wang, Minglu Li, Jian Cao, Lin Chen, Feilong Tang, Xinhua Lin Department of Computer Science and Engineering, Shanghai Jiao Tong University Shanghai 200240, China {wangsuper, li-ml, cao-jian, chenling, tang-fl, lin-xh}@cs.sjtu.edu.cn Abstract Since many of the key techniques now being applied in building services and a lot of service-based applications were developed, Service-Oriented Computing (SOC) has become the main trend of distributed computing research field. In this paper, we proposes a workflow-based middleware named ShanghaiGrid Support Platform (SGSP) for SOC in the Grid environment, which provides a grid toolkit for ShanghaiGrid application developers and specific grid constructors. The toolkit can access, invoke and compose diverse services conveniently. The architecture and function of the each component of toolkit have been introduced in the paper. We also use an image processing application to validate the feasibility and efficiency of SGSP.

1. Introduction More and more interesting services are moving online and the web is being fast transformed into a service-oriented environment where software components are available online in the form of services. The emergence of the service-oriented environment has led to a new distributed computing paradigm-Service-Oriented Computing (SOC), which enables the development of the distributed applications that consist of mutually independent services executing in a variety of environments. Service-oriented computing is based on the Service-Oriented Architecture (SOA), which is an architectural style for building software applications that use services available in a network such as the web [1]. It promotes loose coupling between software components so that they can be reused and composed. There has been an increase in interest recently within the Grid community towards Service-Oriented Computing. The "Open Grid Services Architecture" (OGSA) framework [2], which is proposed by Global Grid Forum (GGF), represents an evolution towards a

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

Grid system architecture based on service’s concept and technology. The transform from “Open Grid Services Infrastructure” (OGSI) [3] to the newest “Web Service-Resource Framework” (WSRF) [4] shows the change progress of how to implement service-oriented computing. These all indicate the merging trend of Grid Computing and ServiceOriented Computing. ShanghaiGrid Support Platform (SGSP) is the toolkit served for ShanghaiGrid project, one of the top 5 grid project in China. The toolkit aims to develop an extensible and flexible middleware to share, discover, reuse and compose multiple services. The toolkit is mainly composed by two parts: an ECA-rule-based Workflow Management System (EWMS) and the ShanghaiGrid Service Invocation Core (SGSIC). The rest of this paper is organized as follows. Next section overviews the related work about our research. Section 3 redefines some basic definitions of ECA rule used by our workflow management system. Section 4 introduces the architecture of SGSP. A case study using SGSP is discussed in detail in Section 5. The last Section concludes the whole paper and points out some future works briefly.

2. Related Works The open source Globus Toolkit (GT) is a fundamental enabling technology for the grid [5], letting people share computing power, databases, and other tools securely online across corporate, institutional, and geographic boundaries without sacrificing local autonomy. The toolkit includes software services and libraries for resource monitoring, discovery, and management, plus security and file management. The development of Globus Toolkit 3.0 is implemented as the framework of OGSI, and Globus Toolkit 4.0 is indicated by OGSA and WSRF, it is a toolkit for SOC in fact. However, workflow is not a core service in GT, so users can not use GT to

compose services, which is an important feature of SOC. Several approaches have been proposed and investigated for services composition. DAML-S [6] is a part of DARPA Agent Markup Language project that aims at making Web services computer-interpretable, which means being described with sufficient information to enable automated Web services discovery, invocation, aggregation into a process, and execution monitoring. However, DAML-S is a very complex procedural language to implement and deploy. Some people want to use Petri net [7] or extended Petri net [8] to describe the model of Web services composition. Although Petri net has a solid mathematical basis for specifying and verifying the model of Web services composition, it is difficult to instantiate. The recently released Business Process Execution Language for Web Services (BPEL4WS) [9] merged of IBM's Web Services Flow Language (WSFL) [10] and Microsoft's XLANG [11]. Some workflow management systems have developed based on BPEL4WS such as BPEL4J by IBM or BPEL Process Manager by Oracle. But we find the functions of these utilities are not so good and need the workflow designers to write too much script, and BPEL4WS is also difficult to implement completely. Event-Condition-Action (ECA) rule is put forward in the research field of active database [12, 13]. The rule makes the data repositories react to internal or external events and trigger a chain of activities that includes notifying users and applications or performing database updates. This process is similar to the business process, so the workflow researchers believed that we can take advantage of ECA rule and propose the framework of ECA rule-based workflow [14]. But the former framework can’t fit the need of SOC. We proposed a workflow solution of using ECA rule for Web Service composition at [15, 16], but the solution can only process traditional Web Service, and the engine’s function is too simple.

3. ECA Rule The semantics of ECA rules can be described straightforward, that is, when the event occurs (is signaled), the system evaluates the specified condition; if the condition is satisfied, the corresponding actions will be executed. In this section, we define some basic definitions of our ECA-rule-based workflow system. Definition 1: An ECA rule-based workflow model (EWM) is an seven-tuple ( E , C , A, R, LC , F , DO) : E is a finite set of events, z z C is a finite set of conditions,

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

z z z z z

A is a finite set of activities which is also means action in our system, R is a finite set of rules, R ⊆ E × C × A , LC is a finite set of logical connectors, F ⊆ ( A × LC ) ∪ ( LC × A) ∪ ( LC × LC ) ∪ ( A × A) is a set of flows. DO is a finite set of data objects used in workflow model.

Definition 2: Event presents a function that map time to boolean value and can be presented as follows: E : T → {True, False} True, if Event of E kind happen at the time of t E(t) = False, other instances Event can be differed as atomic event ( Ea ) and composite event ( Ec ). z There are six kinds of atomic events for each activity. E a ⊆ {e ∀ a ∈ A, e ∈ { Initialize d ( a ), Started ( a ), EndOf ( a ), Overtime ( a ), Aborted ( a ), Error ( a )} . The six atomic event types denote the different execution state of an activity. z Ec is a set of atomic events or composite events related by defined event operators. We define two operators: AND, OR. e1 AND e2 means that both

e1 and e2 has to happen. e1 OR e2 denotes that at least e1 or e 2 should happen. Definition 3: Condition presents the limitation of the relationship of objects or relationship of objects and constants defined by processor designer. C : Exp → {True, False} , and Exp denotes some expressions which can get a boolean result. Definition 4: An activity is a software application or a procedure set executed in order to accomplish a mission. According to the different function, EWMS has several activity types. If a is an activity ( a ∈ A ), ain denotes the number of flows indicate to activity a,

and a out means the number of flows come from activity a. z As and Ae are start and end activity set. There are just one start activity and one end activity in a EWM, assumed that a ∈ As , b ∈ Ae , ain =0 and

bout = 0. z

Ai

refers to the set of activities responsible for

z z z

invoking a service. Ad means the set of delaying for a specific time. The activity set of ATX is utilized to execute the transformation of XML document by XSLT ASV is responsible for the value assignment of variables.

Definition 5: ECA rule is a triple R=, where E is an event to trigger the rule and can be an atom event or a composite one, C is the condition set to reflect the status of the system and environment and will be evaluated when the rule is triggered by its event, and A is the action set that is executed when the rule is triggered and its condition is satisfied. An ECA rule states that if E happens and the condition set C can be satisfied then all the actions of A will be executed. Definition 6: LC can express the logic relation of the conditions and the actions. We define a special transfer function TC to map each logic connector onto a connector type. Here, TC : LC → { In, Out In, Out ∈ {AND, OR}} .

“In” represents the incoming flow logic whereas “Out” represents the outgoing flow logic. For example, if ∃lc ∈ LC, TC(lc) =< AND, OR > , and ∃f1 , f 2 ∈ { f f ∈ A × {lc} ∪ LC × {lc}} . suppose that the triggering

event of f1 , f 2 is respectively e1 and e2 , then the triggering event of lc is e1 ANDe2 . It is equal to the AND-JOIN workflow pattern in Petri-Net. Similarly, if there are two outgoing control flow to activities, the execution pattern is in accordance with the “Out” operator, in this case OR for parallel execution of activities. This is equal to the OR-SPLIT workflow pattern in Petri-Net. It is obvious that there are four logic connector types: and-and, and-or, or-and, and oror.

(DO) definitions for the control and exchange of data in ECA rule-based workflow model: z XML Objects are XML schema based data and generally used to represent the input and output messages of services. z Other Document Object is an abstract representation of documents formats data except XML document, such as word, PDF, rtf and so on. z Inherent Variable is basic data type. It can be utilized to set guarding condition or act as a decision point. z Object Variable is data item extracted from XML Object or Other Document Object. It is usually used to assign values from one field of XML Object to another. Both Inherent variable and object variable have five types: string, integer, float, double and boolean.

4. Architecture of SGSP Figure 1 shows the architecture of SGSP. SGSP includes five layers: user layer, engine layer, basic service layer, adapter layer, and service resource layer. User Layer and Engine Layer form an ECA-rule-based Workflow Management System (EWMS), as well as Basic Service Layer and Adapter Layer compose the ShanghaiGrid Service Invocation Core (SGSIC). Service Resource Layer includes three types of services: Web Service, OGSI-compliant Service, and WSRF-compliant Service.

Definition7: F means the set of directed flows, it decides the executing and data transfer sequence of a EWM, And F ⊆{(Ps, Pe) | Ps, Pe ∈A ∪ LC} , which Ps means the start point of the flow, and Pe means the end point of the flow. F can be divided into data flow ( FD)

and control flow ( FC ). And: F = FC ∪ FD, FC ∩ FD = φ,

FD ⊆{Pe, Ps| Pe∈A, Ps∈A},

Figure 1. Architecture of SGSP

FC ⊆{Pe, Ps| Pe∈A, Ps∈LC}∪{Pe, Ps| Pe∈LC, Ps∈A}

4.1. User Layer

Definition 8: There are four categories of data object

User layer gives interfaces to design workflow processes with ECA rule, store the modeling data,

∪{Pe, Ps| Pe∈LC, Ps∈LC}

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

enact the engine, and monitor the executing of engine. The most important module is workflow modeling tool. In our approach, we use an ECA rule-based workflow approach to realize the graphical workflow modeling tool. The tool is very flexible and easy to use. It supports the drag and drop to introduce new components to the workflow model. To assist the user to compose a complicated workflow, a powerful validation mechanism is supported. It can verify the input information on the spot. In order to provide more knowledge support of components, the right-click menu is used for showing the properties of the selected components. Data of process designed by the modeling tool is saved in database and it can be loaded from the database. Figure 2 gives the class view of all the main classes and their relationships for ECA-based workflow modeling. We will show a screenshot of our modeling tool and give more detail about the classes in section 5. StartA

Schedule TransformX SetValue Composit

Subworkfl

z z

z z

stops distributed engine services, revises engines’ properties. Load Balance Manager computes and adjusts the load of each engine service dynamically. Engine Service Dispatcher captures users’ invoking requests, checks users’ priorities, finds an engine service from the service buffer through the load balance manager, transmits invoking requests to the engine, and returns the invoking result to users. Remote Event Manager receives all the events triggered by each engine service, and stores it to the log file through the engine persistence manger. Engine Persistence Manager is responsible for the storage of persistence data, including engine service log, configure file of engine manager, and information of engine services in the service buffer.

EndAc

WebServic Even

BaseAct

Condi

GridServic 1..*

0..*

1

Applicatio 1

1

Workflow 1

1

LogicN ECARule Action 0..* 1 0..* 1 0..*

1 0..* WfXMLDo

1

BaseO WfBase

0..*

Figure 3. Framework of Distributed Engine in

LinkF DataF

1 1..*

DataO

WfObject WfOtherD

WfInheren

Contro

Figure 2. Class View of ECA-Rule-Based

Workflow Modeling

4.2. Engine Layer Workflow engine layer is composed by a workflow engine manager and some distributed engine services. As be shown in Figure 3, through a proxy, six workflow engine management modules can be accessed and used. z Service Buffer Manager maintains a workflow engine services buffer, refreshes the change of engine services to keep all the engine services in the buffer can be used normally. z Engine Service Controller starts, resumes and

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

SGSP

4.3. Basic Service Layer Basic Service Layer includes some basic management service modules serving for EWMS to support diverse service invocation, such as service manager, task manager, and data manager, and information manager. Figure 4 gives a clear relationship overview of the four management modules. z Service Manager is used to register a new service, index the service and search proper service according to user’s requirement. z Task Manager is responsible for the interaction with service adapter to invoke services. We view a service invocation as a task. z Data Manager provides the functions of virtual storage management and reliable data transfer mechanism with high performance. z Information Manager is used to store all data published by service provider into an Information

Center, and organizes those information in a uniform way.

z

z

WSRF-compliant services. It also has a Notification Manager to realize notification mechanism for stateful services. The Service Group Manager can group the all services as their functions or other properties. Service Adaptation makes choice of the suitable adapter based on service data manager. Although we just implement three types of invoking adaptation, we can extend other adaptation with the development of SOC technology. Binding Adaptation supports two types of service bindings: SOAP binding and MIME binding. The first one is used in almost all the service invocation, and the other one can be used in an asynchronous way.

5. Case Study Figure 4. Inner Relationship of Basic Service

Layer

4.4. Adapter Layer

In this section, we will use a demo to illustrate how to compose services through EMWS, and see the effect of our model. A similar demo is shown in [15], but it just process Web Service. On the contrary, we use three types of services in this case.

Figure 5. Design Architecture of Service

Adapter

Service Adapter is the service access and invocation module in ShanghaiGrid. As showed in Fig. 5, the top layer of Service Adapter is an abstract service access interface provided to basic services. This is a consistent and easy way to invoke service without consideration of services’ implementation details. Service adapter is designed in an adaptive structure. When interacting with services, it will choose proper adapter and binding extensions automatically. All these information comes from information center. Service Adapter can be divided into three parts: service data manager, service adaptation, and binding adaptation. z Service Data Manager maintains the state data for stateful services: Service Data Profile for OGSIcompliant services, and WS-Resource Profile for

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

Figure 6. Image Processing Model

5.1. Design of Workflow Model We demonstrate the process of design of a workflow model by means of a complex image processing, which needs the support from three different image processing services. Reverse service takes charge of reversing the color of every pixel of an image, Smooth service is used to smooth an image, and Sharpen service can sharpen an image. At first, we developed some simple image processing services with different service types. In addition, an image database was also created to save

the original and processed images. In the implementation, we use an ID number to denote an image. Each image processing service has an input and an output XML documents. All the services can get the image ID from an input XML document, read the image from image database, process the image, save the processed image into the database, and finally return the processed image ID through an output XML document. Users can view the input and output images to validate the processing effect. In this case, we use three services: z Reverse service is a Web Service which can reverse the color of an image z Smooth service is a WSRF-Compliant Service which can smooth an image z Sharpen service is a OGSI-Compliant Service which can sharpen an image Now, we used the workflow design tool to design a workflow model for an image processing, as shown in Figure 6. The model described the following workflow: − Invoke reverse service to process an image − choose the next service according to the user’s requirements, − process the output image of reverse service with smooth service or sharpen service, and − return the final processed image. The right side of Figure 6 is a graphic design panel is the symbol to show the flow of the model. Icon means the of the activity to invoke a service, activity of setting value to an object, means control , and indicate three different logic flow, nodes, i.e., and-and, and-or , and or-and nodes respectively. Logic node acts an important role in our design tool because it takes the charge of creating ECA rule, which means responding events, judging conditions and deciding actions. We defined four logic node types in our system: and-and node, and-or node, or-and node, and or-or node. In our design tool, a control flow must connect an activity and a logic node. We can find that each logic node has two logic operators. The first operator presents the logic relation of the triggering events reflecting different states of relevant activities, and the second one presents the relation of invoked activities. When we draw a control flow from an activity to a logic node, the system will ask us to choose a triggering event. If we draw a control flow from a logic node to an activity in which the second operator is “or”, we must construct a judging condition to help system choose the flow direction. For example, an and-or node presents that all triggering events indicate the logic node must happen to invoke the ECA rule, and the system will judge the condition defined

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

by the designer to decide the next activity to be executed. On the contrary, an or-and node presents any triggering event that indicates the logic node will invoke the ECA rule, and all activities that the node indicates must be executed. The left side of Figure 6 is a navigating tree of the model. In the sub-tree of workflow object, we can find following objects: six XML document related with the services; two inherent variables-choice means the user’s decision of which two services to execute, as well as OutputImageID means the ID of final processed image; six object variables binding with the image ID in the six XML document, e.g. InputImageID binds with the image ID in the input XML document of reverse service-ReverseInputXML through the XPath “/INPUT/PARAMETER/VALUE”. In order to transfer the intermediate result, we use setting value activity, e.g. activity RevToSmo set the value of object variable SmoothInputID with the value of ReverseOutputID. Because of the binding relationship, the input XML document of smooth service will get the image ID from the output XML document of reverse service. We also use setting value activity to set the output image ID.

5.2. Instantiating and Result Analysis When finishing the design of the medical image processing workflow, it can be submitted through user portal to the workflow engine for running. Figure 7 shows a management tool for workflow engine. It supports to deploy, start and monitor workflow engine service. When the workflow request is coming, workflow engine obtains a copy of the workflow model from database and then takes charge of the specific invocation and routing according to ECA rules defined in the workflow model.

Figure 7. Engine Management Tool

We used a simple JSP page to submit input values needed by the model, started the workflow engine and observed the executing result. We chose two executing path to the process, and got different result, so we can find two instance records in Figure 7. The results show in Figure 8 and Figure 9 respectively.

Figure 8. Image Processing Result A

Figure 8 and Figure 9. This case validates the feasibility and efficiency of our system.

6. Conclusion and Future Work This paper presents a toolkit named ShanghaiGrid Support Platform for service-oriented computing in grid environment. The toolkit is mainly composed by an ECA-rule-based Workflow Management System and a Service Invocation Core for ShanghaiGrid. We redefine some terms of ECA rule, propose the architecture of SGSP, describe some kernel components in SGSP. A practical case proves the feasibility of our toolkit. The toolkit we developed is still very simple. It can not support the dynamic and adaptive service discovery and invocation, and the service is lack of semantic information which is very important for SOC in the grid environment. In near future, we will extend the toolkit with agent and ontology technology. We also want to build a workflow process knowledge management system based on SGSP.

Acknowledgement This paper is supported by National Scientific Fund of China (No.60503041), National High Technology Research and Development Program of China (No.2006AA04Z152, No.2006AA01A124 , No.2006AA01Z247, No.2006AA01Z172), ShanghaiGrid grand project of Science and Technology Commission of Shanghai Municipality (05DZ15005), and Natural Science Foundation of Shanghai (05ZR14081).

References

Figure 9. Image Processing Result B

In the two instances, we select the same brain image as the input image, which is shown in the left-side of the two figures, and select the same workflow process which has been shown in Figure. 6 to be executed. Then, we choose two different executing paths for the two instances, one is invoking Reverse and Smooth services sequently, the other is invoking Reverse and Sharpen services sequently. We get two different output images which are shown in the right-side of the

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

[1] Mike P. Papazoglou, “Service -Oriented Computing: Concepts, Characteristics and Directions”, Proceedings of the Fourth International Conference on Web Information Systems Engineering, 2003, pp.3-12 [2] I. Foster, H. Kishimoto, A. Savva, et al, “The Open Grid Services Architecture, Version 1.0.”, http://www.gridforum.org/documents/GWD-I-E/GFDI.030.pdf, 2005 [3] S. Tuecke, K. Czajkowski, I. Foster, et al, “Open Grid Services Infrastructure (OGSI) Version 1.0”, 2003

[4] K. Czajkowski, D. F. Ferguson, I. Foster, et al, “The WS-Resource Framework”, http://www.globus.org/wsrf/specs/ws-wsrf.pdf, 2004 [5] I. Foster, “Globus Toolkit Version 4: Software for Service-Oriented Systems”, Proceedings of International Conference on Network and Parallel Computing, 2005, pp. 2-13

[6] Ankolekar, A., Burstein, M., Hobbs, J., et al: DAML-S: Web Service Description for the Semantic Web. Proceedings of International Semantic Web Conference, 2002, pp. 348-363 [7] Hamadi, R., Benatallah, B.: A Petri Net-based Model for Web Service Composition. Proceedings of the 14th Australasian Database Conference, 2003, pp. 191-200 [8] Yu Tang, Luo Chen, Kai-Tao He, Ning Jing: SRN: An Extended Petri-Net-Based Workflow Model for Web Service Composition. Proceedings of the 2004 IEEE International Conference on Web Services, pp. 591-599 [9] Andrews, T., Curbera, F., Dholakia, H., et al, “Specification: Business Process Execution Language for Web Services Version 1.1. Web of IBM Corporation”, http://www.ibm.com/developerworks/library/ws-bpel, 2003 [10] Leymann, F, “Web Services Flow Language (WSFL) version 1.0.”, http://www.ibm.com/software/solutions/ webservices/pdf/WSFL.pdf , 2001 [11] Thatte, S, “XLANG: Web Services for Business Process Design”, http://www.gotdotnet.com/team/xml wsspecs/ xlang-c/default.htm, 2001

The Sixth International Conference on Grid and Cooperative Computing(GCC 2007) 0-7695-2871-6/07 $25.00 © 2007

[12] McCarthy, D. R., Dayal, U., “The Architecture of An Active Database Management System”, Proceedings of ACM-SIGMOD 1989 Int’l Conf. Management of Data, 1989, pp. 215-224 [13] Dayal, U., Buchmann, A. P., McCarthy, D. R., “Rules are Objects Too: A Knowledge Model For An Active, Object-Oriented Database System”, Proceedings of the 2nd Intl. Workshop on Advances in Object-Oriented Database System, 1988, pp. 129-143 [14] Goh, A., Koh, Y.-K., Domazet, D.S., “ECA Rule-based Support for Workflows”, Artificial Intelligence in Engineering, vol. 15, no.1, 2001, pp. 37-46 [15] Yi Wang, Minglu Li, Jian Cao, et al, “An ECA-RuleBased Workflow Management Approach for Web Services Composition”, Proceedings of the Fourth International Conference on Grid and Cooperative Computing, 2005, pp. 143-148 [16] Lin Chen, Minglu Li, Jian Cao, “ECA Rule-Based Workflow Modeling and Implementation for Service Composition”, IEICE Transactions on Information and Systems, vol. E89-D, no.2, 2006, pp. 624-630

Suggest Documents