Summary of the invention
Technical matters: the purpose of this invention is to provide a kind of method of grid service construction based on internal work flow, make workflow technology serve among the mesh services, thereby give full play of the advantage of the two, for synergistic application and application integration provide feasible program, the method that the application of the invention proposes can reach the target of mesh services synergistic application.
Technical scheme: method of the present invention is a kind of method of tactic, proposes by workflow functionality in introducing, and its target is to wait the system applies problem that solves dynamically under the grid environment by Services Combination, Workflow Management.
The intension of interior workflow:
1. workflow is the business process that a class can completely or partially automatically perform, and document, information or task are followed certain rule and transmitted and carry out between different executors.
2. external workflow: can control one group of mesh services stream that constitutes application program, what that is to say that workflow calls is the external mesh service, and these services can be determined when modeling, also may be client application.
3. the workflow that provides as mesh services is provided interior workflow, this workflow as mesh services can submitted computation requests grid application client call, and after the request establishment, workflow application can be formulated according to the situation of current resource situation and client requests automatically and calculate process or the step of carrying out, and workflow engine is responsible for scheduling.
One, architecture
Mesh services using method architecture based on interior workflow can be divided into two parts: client application and server end are used.Server end is used and is comprised: carry out engine, execution monitoring, model bank and GSH.Client application comprises service search device, service modeling instrument.
Below we provide the explanation of several concrete parts:
Carry out engine: carry out engine and be the core of whole prototype and be implemented as mesh services.For mesh services based on interior workflow, carrying out engine is exactly the container of service, carry out engine and be in charge of the life cycle of service procedure, create the member Service Instance, the operation of activation service (in fact, the operation of service is procedural model in fact, is designated hereinafter simply as service flow), the subscription of the theme message that visit and the service to service data handled generates, issue etc.Carry out the main telegon of engine, language parser, several important components such as data management system of service call agency and supervisor status data are formed.
Execution monitoring: a special mesh services, it is the subscriber who carries out engine status message.Its responsibility is to monitor the status message of carrying out the engine issue, and writes down all message of receiving.
Model bank: the model bank member is the server end of modeling tool, and its responsibility is a parse documents, generates the deployment descriptor of service flow, and these information are write the WSDD file, finishes the deployment of service flow, at last again document storing in document database.
GSH:GSH (Grid Service Handle, grid service handle) responsibility is to intercept and capture relevant GSR (GridService Reference, grid service reference, a kind of address) message provides the node of mesh services to form unique identifier under the grid environment the most finally.If message request is the status information of carrying out service flow or obtaining service flow, then handle to the execution engine forwards, after the execution engine disposes, return result again; If that message request is the GSR of service flow, then from document database, read corresponding service flow standard and be mapped to corresponding WSDL (Web Service Description Language, web services descriptive language) document automatically, return to the requestor.Therefore, from user's angle, there is not any difference based on the mesh services and the simple mesh service of interior workflow.
Two, method flow
In the Web service research field, developed certain methods or technology, be used to describe the combination of the collaborative and Web service between the Web service, as: WSFL, BPEL4WS etc.These language are based on process model, the relation between describing activity and the activity, and as branch's relation, confluent relation etc., service then is movable executor, when carrying out, activity is bound to concrete service and realizes.For the binding relationship between definition of activities and the service, they expand WSDL.These can solve the collaborative and combinatorial problem of mesh services under the OGSA framework substantially towards the flow process language of Web service.Based on the mesh services using method of interior workflow,, developed service-oriented workflow support function with Java language based on BPEL4WS.Mesh services using method flow process based on interior workflow is as follows:
1. modeling engineering Shi Liyong service search device search grid service.The service search device has oneself independently execution thread, is responsible for obtaining the available mesh services information of having disposed from the GT3 core, therefrom extracts the Useful Information to composite services modeling engineering teacher, as: the GSH of mesh services, operation description, message definition etc.
2. modeling engineering Shi Liyong modeling tool Edit Document defines the planning of mesh services stream.
3. after modeling engineering teacher finishes the service flow modeling, the composite services deployment function of utilizing editing machine to provide, under the help of model bank, deployment services stream.
4. the final user sends the mesh services request message.
5.GSH intercept and capture the message of relevant GSR (Grid Service Reference, grid service reference), it analyzed.If message request is the status information of carrying out service flow or obtaining service flow, then handle to the execution engine forwards, after the execution engine disposes, return result again; If that message request is the GSR of service flow, then from document database, read corresponding service regulation and be mapped to corresponding WSDL document automatically, return to the requestor.
6. carry out engine and receive the message that GSH sends, realize mesh services: create the member Service Instance, activate the operation of service, the life cycle of management service.
Below the function of carrying out the engine important component is described:
(1) the telegon responsibility is explained procedural model exactly, the operation of all mesh services that define in the coordination procedural model.Telegon does not really activate mesh services, but the task delegation that activates mesh services is acted on behalf of to service call.
(2) the service call agency at first obtains the metamessage of service by the analysis service deployment file, as: whether this service is service flow.If service flow, then the Returning process model information is called language parser process of analysis model by telegon, generates new execution clue then.If simple services, then activate corresponding unserializing and handle son, is the Parameters Transformation of XML coding corresponding Java object method parameters needed type, calls the Java object method, utilizes serializing to handle son at last again result object is converted to XML document.
(3) as its name suggests, the function of resolver is exactly parse documents and generates executive plan.The theme message that the client of service flow can flow by the standard operation subscription service that the GT3 core provides.If the producer of a certain theme message that the client subscribes to not is a service flow, but the services component that service flow comprises.
(4) data management system is just entrusted to corresponding services component to relevant processing, otherwise just directly handles.For the processing of service data also similarly, if the owner of data is service flow, then just directly processing of data management system member, otherwise entrust to the owner of this service data.
Beneficial effect:
The inventive method has proposed the mesh services scheme based on interior workflow, be mainly used in Workflow system application integration based on mesh services, the method that the application of the invention proposes can avoid over application integration complicacy, can improve dirigibility, can effectively reach the purpose of synergistic application.Below we provide specific description.
1. simplicity
Use with service form in the method and offer Workflow system, then Workflow system only need obtain the mesh services interface, just can directly call it, and does not need a bit understanding is realized having in its inside.For instance, on the other hand, workflow can be used as the mesh services workflow, and the grid application client that mesh services can submitted computation requests calls.After the request to create, workflow application can be formulated according to the situation of current resource situation and client requests automatically and calculate process or the step of carrying out, workflow engine is responsible for scheduling and task is handled distribution, uses thereby simplified the Workflow system application integration greatly.
2. be easy to extendability
In the method, existing Workflow system such as workflow modeling, monitoring, workflow engine or the like need not to do structural change, the course of work of workflow does not change yet, it still is the definition of engine execution work stream, the control flow route, just carry out concrete application change and become to call mesh services, that is to say that existing Workflow system is very easy to expand to integrated more applications.
3. professional platform independence
For Workflow system, no matter being transferred application still is that user side is used, application provides with the mesh services form, the high-rise service interface that with the service aggregating is the center makes up and instantiation the application of node, node is used and is carried out with the mesh services form, the discovery of mesh services, registration or the like are also finished by information service, as seen, only need to obtain GSH and just can call mesh services, realization as for mesh services is with .NET or J2EE, Linux, Workflow system need not to understand at all.
4. senior name visit
For to different application call, Workflow system has been stipulated to be transferred and has been used, user side is used and the Workflow system interconnect interface.Utilize mesh services to unify these interfaces, only need in other words to call, realized the name Service of interface, make workflow reference model can adopt more advanced form access application by name (utilizing GSH).
5 have strengthened interconnectivity
System's distributed work streaming system is difficulty relatively often, because Workflow system will be determined interoperability model and rank, and defines one group of operation set and realizes. and workflow is registered as mesh services, and interoperability solves easily based on the OGSI problem that makes.
Embodiment
For convenience of description, our supposition has the integrated application example of system applies of following mesh services based on interior workflow:
A Workflow system (representing with A) will call activity in another Workflow system (workflow is represented, movablely represented with d with B), obviously, this requires, and two Workflow systems can be shared, interoperability, integrated.Utilization is as follows based on the mesh services scheme implementation mode of interior workflow:
The foundation of Workflow system A and execution (based on the mesh services flow process of interior workflow):
Step 1: modeling engineering Shi Liyong service search device search grid service.The service search device has oneself independently execution thread, is responsible for obtaining the available mesh services information of having disposed from the GT3 core, therefrom extracts the Useful Information to composite services modeling engineering teacher, as: the GSH of mesh services, operation description, message definition etc.
Step 2: modeling engineering Shi Liyong modeling tool Edit Document, the planning of definition mesh services stream.
Step 3: after modeling engineering teacher finishes the service flow modeling, the composite services deployment function of utilizing editing machine to provide, under the help of model bank, deployment services stream.
Step 4: the final user sends the mesh services request message.
Step 5:GSH intercepts and captures the message of relevant GSR (Grid Service Reference, grid service reference), and it is analyzed.If message request is the status information of carrying out service flow or obtaining service flow, then handle to the execution engine forwards, after the execution engine disposes, return result again; If that message request is the GSR of service flow, then from document database, read corresponding service regulation and be mapped to corresponding WSDL document automatically, return to the requestor.
Step 6: carry out engine and receive the message that GSH sends, realize mesh services: create the member Service Instance, activate the operation of service, the life cycle of management service.
Carry out the execution flow process of engine:
Step 1: telegon is explained procedural model, the operation of all mesh services that define in the coordination procedural model.Telegon does not really activate mesh services, but the task delegation that activates mesh services is acted on behalf of to service call.
Step 2: the service call agency obtains the metamessage of service by the analysis service deployment file, as: whether this service is service flow.If service flow, then the Returning process model information is called language parser process of analysis model by telegon, generates new execution clue then.If simple services, then activate corresponding unserializing and handle son, is the Parameters Transformation of XML coding corresponding Java object method parameters needed type, calls the Java object method, utilizes serializing to handle son at last again result object is converted to XML document.
Step 3: the resolver resolves document also generates executive plan.The theme message that the client of service flow can flow by the standard operation subscription service that the GT3 core provides.If the producer of a certain theme message that the client subscribes to not is a service flow, but the services component that service flow comprises.
The foundation of workflow B and execution: as workflow A
Workflow A calls workflow B:
Step 1: Workflow system B is encapsulated as a mesh services based on interior workflow, provides URI to the external world, and wherein d is an interface.
Step 2: the mesh services based on interior workflow of Workflow system B encapsulation is registered in service centre.
Step 3: Workflow system A utilizes the mesh services searcher in registration center's search service.
Step 4: registration center offers Workflow system A with the service describing of match service, a mesh services based on interior workflow that is packaged into comprising Workflow system B.
Step 5: Workflow system A sends soap message to Workflow system B, and service implementation is called, and Workflow system A carries out control of authority to the use of this service.
Step 6: Authority Verification passes through, and concrete service execution is finished by movable d, and for the use of movable d, Workflow system A utilizes service command to manage;
Step 7: workflow B carries out.