Summary of the invention
In enterprise calculation and e-commerce environment, enterprise usually need be according to the business demand of self, and real-time integration enterprises and external resource realize dynamic integrity and cooperation between these resources, to tackle the outside changeable market demand.The present invention is intended to:
(1) provide a kind of event model that the relation between incident and the gridding resource is described.Wherein, incident is mainly used to express the collaborative demand between the gridding resource, describes the standard of being followed when cooperating between the resource of a plurality of management domains; And the relation between incident and the gridding resource then is to drive the gridding resource foundation of collaboration.
(2) propose a kind of gridding resource indirect addressing algorithm, realized the dynamic addressing of gridding resource based on event topic and content.
(3) propose a kind of event sniffer model that is independent of grid resource model, be used to dispose monitoring strategy, thereby can monitor the triggered response incident the operation of various resources in the service grid environment to the gridding resource operation behavior.
(4) proposed to realize driving to dissimilar gridding resource cooperations based on the relevant adapter resource model of the gridding resource of unified interface.
The objective of the invention is to overcome the deficiencies in the prior art, the method for supporting gridding resource dynamic integrity and cooperation under the grid environment is provided, provide a cover to build method large-scale distributed, instant integrated software system.
Autonomous definition of supporting business personnel of the present invention and registered events template are described the standard of following when other management domains are cooperated; By subscription incident and management of monitor territory internal, client gridding resource cooperation intermediary sends the cooperation request based on incident locating resource with after handling, and realizes the dynamic integrity and the cooperation of gridding resource.Below the notion that the present invention relates to is described:
Event model: event model is described is between the intension and event-template of event-template, incident, between event-template and the incident, between the incident and the relation of incident and gridding resource.Event model is for the collaboration services between indirect addressing, event handling and the gridding resource in gridding resource dynamic integrity and the intermediary that cooperates.
The event sniffer model: the event sniffer model is that gridding resource operation behavior and external event are monitored tactful description and processing specification.The present invention is divided into two kinds with the event sniffer model, a kind of is gridding resource operation behavior monitor model, be mainly used to describe the mapping relations of the incident of object, triggering of monitoring and type, parameter, purpose is monitoring and the trigger event of realizing grid resource operation behavior in the management domain; Second kind is external event monitor model, is mainly used to describe the mapping relations of gridding resource, triggering mode and parameter of incident, the triggering of monitoring, its objective is that realization is to the monitoring of incoming event with drive gridding resource.In the present invention, provide unified interface with the form opening of service to the gridding resource operating space, monitor configuration, deployment and knit operation when realizing operation.
This method can be striden management domain and be organized gridding resource dynamically, in real time, realizes the integrated and cooperation of dynamic gridding resource, supports under the grid environment different departments in the management domain or strides the collaborative work of management domain.The present invention can be widely used in IT application in enterprises, E-Government, ecommerce and scientific research problem solving environment etc., supports to stride the resource-sharing and the dynamic cooperation work of organizational boundary.
According to the solution of the present invention, proposed to support under a kind of grid environment the method for gridding resource dynamic integrity and cooperation, may further comprise the steps: the event-template foundation step, on Subscriber, create event-template; Event subscription step, the gridding resource of service end management domain is subscribed to interested incident; Monitor is disposed and configuration step, and client-side management territory and service end management domain are disposed and configuration gridding resource operation behavior monitor and external event monitor; The incident forwarding step, client gridding resource operation behavior monitor sends to client gridding resource cooperation intermediary with the incident that listens to; The gridding resource search step, client gridding resource cooperation intermediary is according to the incident that produces in the incident forwarding step, line Subscriber, the gridding resource that search can be cooperated; Cooperation request event forwarding step, client gridding resource cooperation intermediary is according to the gridding resource of finding in the gridding resource search step, the incident that processing produces in the incident forwarding step is so that the service end management domain under the gridding resource of being found sends the cooperation request event; Service end actuation step, service end management domain are given the external event monitor of this management domain with this incident after receiving the cooperation request event, and service end external event monitor is responsible for driving corresponding gridding resource adapter, to realize the operation to gridding resource; Operating result monitoring/forwarding step, the operating result of service end gridding resource operation behavior monitor monitoring service end gridding resource, and the response events that listens to sent to service end gridding resource cooperation intermediary; Client-side management territory determining step, service end gridding resource cooperation intermediary determines the client-side management territory of cooperation response events according to response events and the relation of cooperating between the response events, and sends the cooperation response events to the client-side management territory; And client actuation step, the external event monitor of this management domain is given with this incident after receiving the cooperation response events in the client-side management territory, and client external event monitor is responsible for driving corresponding gridding resource adapter, to realize operation, cooperate thereby finish this time to gridding resource.The theme of above-mentioned variety of event and content are that service-user can be registered at the event subscription center according to the actual requirements at any time.
Above-mentioned variety of event be by event sniffer to the monitoring triggering of the operation behavior of various resources in the autonomous management territory, different resources and operation will trigger dissimilar incidents.
Describedly be meant that dynamically the cooperation relation between the gridding resource do not set in advance point-to-pointly, but the mode according to indirect addressing is found gridding resource in system's running.
Described gridding resource refers to operation flow, service or the personnel in the autonomous management territory.
Described autonomous management territory can be the department of an enterprise, research institution, government bodies, research institution inside or the department of government bodies inside, and the autonomous management territory has all controls to one's own gridding resource.
Compared with prior art, effect of the present invention is embodied in:
1) cooperation relation between the gridding resource is dynamically to set up under the event-driven inside and outside the management domain.
2) based on the publish/subscribe pattern and based on the gridding resource indirect addressing method of event topic and content, support the dynamic adding of management domain and gridding resource under the grid environment and withdraw from, satisfied the height dynamic characters under the grid environment.
The event subscription during 3) by operation and the dynamic deployment of event sniffer, the dynamic adjustment when supporting the gridding resource operation.Can immediately gridding resource be made up and adjust according to business demand.
4) support multiple gridding resource type,, can realize driving, improved the autgmentability of grid system dissimilar gridding resource cooperations by providing based on the relevant adapter resource model of the gridding resource of unified interface.
5) improved the transparency of gridding resource, be mainly reflected in the transparency of gridding resource reference address, the transparency of method of calling and the transparency of gridding resource type, the cooperation both sides needn't be concerned about the other side's concrete form, have embodied the pardon of grid.
The present invention can be widely used in IT application in enterprises, E-Government, ecommerce and scientific research problem solving environment etc., supports to stride the resource-sharing and the dynamic cooperation work of organizational boundary, belongs to computer application field.
Embodiment
Below in conjunction with accompanying drawing the present invention is specified.Be noted that described embodiment only is for illustrative purposes, rather than limitation of the scope of the invention.
Fig. 1 is the fundamental diagram according to the method for gridding resource dynamic integrity of the present invention and cooperation, specifically comprises following six stages:
(1) subscribe to: the gridding resource of service end management domain is subscribed to incident with reference to event-template, subscribes to the result and shows as subscription information;
(2) monitor: the operation behavior that client gridding resource operation behavior monitor listens to gridding resource generates incident, and sends to client gridding resource cooperation intermediary;
(3) gridding resource indirect addressing: after client gridding resource cooperation intermediary receives the incident that monitoring service sends, obtain the resource that to cooperate by gridding resource indirect addressing service;
(4) request: client gridding resource cooperation intermediary sends cooperate request to service end cooperation intermediary with gridding resource according to lookup result;
(5) drive: after service end gridding resource cooperation intermediary receives external event, incident is sent to service end external event monitoring service, monitoring service is determined the parameter of gridding resource and the mapping relations between the event content according to the monitoring configuration, and calls corresponding gridding resource adapter driving gridding resource.The driving here has two layers of meaning according to the difference of event attribute: new gridding resource example of initialization and wake a gridding resource example that is in wait state up;
(6) service end gridding resource operation monitor listens to trigger event after the operation of gridding resource;
(7) service end gridding resource cooperation intermediary with incident in response incident send to client cooperation intermediary;
(8) client external event monitor listens to the gridding resource that request is sent in the incident rear drive, finishes cooperating process one time.
Fig. 2 is a method flow diagram of supporting gridding resource dynamic integrity and cooperation under the grid environment of the present invention, and its step is as follows:
At step SP1: on Subscriber, create event-template.Comprise three kinds of creation methods:
(1) from the beginning creates new event-template: the theme of the given event-template of elder generation, the content of Configuration events template again; (2) revise existing event-template: select existing event-template to inherit, can add new event content on this basis, and name new theme; (3) duplicate and revise existing event-template: after duplicating, revise at the basic enterprising edlin of original template.
At step SP2: the gridding resource of service end management domain, subscribe to interested incident.Can comprise following substep:
(1) at first selects an event-template; (2) select to subscribe to the gridding resource (operation flow, service or personnel) of this incident; (3) constraints of subscription and the relation between the constraints are set; (4) then, can select to be saved in this locality or to be published to Subscriber.
At step SP3: client and service end management domain are disposed and configuration gridding resource operation behavior monitor and external event monitor.Can comprise following substep:
The step of disposing and dispose gridding resource operation behavior monitor is: (1) at first selects the gridding resource and the event-template of a monitoring; (2) set the operation behavior (can be in " only monitoring input ", " only monitoring output ", " both's monitoring " three kinds of modes any) of the gridding resource that will monitor; (3) data of the operation behavior generation of selection gridding resource and the relation between the event content; (4) when service is monitored, set the scope of monitoring, this scope can not limit, and can only set at one or several specific flow process yet.
The step of deployment and configuring external event sniffer is: (1) at first selects the event type of a monitoring and the gridding resource that will trigger; (2) relation between the needed data of operation of selection event content and gridding resource; (4) when a service is triggered, set the scope at service place when triggering, this scope can not limit, and can set at one or several specific flow process yet.
At step SP4: client gridding resource operation behavior monitor sends to the incident that listens to the gridding resource cooperation intermediary of this management domain.Can comprise following substep:
(1) according to result, when gridding resource in grid system operation behavior takes place, will be monitored by gridding resource operation behavior monitor at step SP3; (2) whether gridding resource operation behavior monitor has monitoring configuration to this resource according to the range searching at sign, operation behavior type and the place of gridding resource, according to the data of resource operation generation and the relation between the event content, put into the event instance that generates according to event type after the data extract with gridding resource operation generation; (3) incident that substep (2) is generated sends to the event handling intermediary of this management domain.
At step SP5: client gridding resource cooperation intermediary is according to the incident line Subscriber that produces in step SP4, the gridding resource that search can be cooperated.Can comprise following substep:
(1) client gridding resource cooperation intermediary at first is extracted in the theme and the content of the incident that produces among the step SP4; (2) connect according to the event topic in the substep (1) and content and Subscriber, and send addressing request; (3) Subscriber at first navigates to a bigger gridding resource subscription information scope according to event topic; (4) mate according to the content of incident in the subscription information scope in substep (3), the result who is satisfied the demands fully, and the management domain sign at the sign of gridding resource, place joined in subscriber's set return to cooperation intermediary; (5) client gridding resource cooperation intermediary receives the result that Subscriber returns.If the resource of can cooperating is arranged in the return results, then continue the processing of step SP6; Otherwise, send anomalous event to client external event monitor.
At step SP6: client gridding resource cooperation intermediary is according to the gridding resource of finding in step SP5, the incident that produces in step SP4 is done further processing after, send the cooperation request event to the service end management domain of choosing.Can comprise following substep:
(1) does following processing according to the gridding resource quantity of subscribing to this incident in the subscriber's set that in step SP5, searches: if having only a subscriber in the set, then directly incident and subscriber's information are transferred to substep (2) processing, handle otherwise jump to substep (3); (2) extract substep (1) and pass incident and subscriber's information of coming, identify, attributes such as destination in the incident and subscriber are set by sign of the gridding resource in subscriber's information and management domain; Triggering between record gridding resource and the incident concerns in database then, and incident is sent to the service end management domain; (3) circulation is extracted in the subscriber's information in subscriber's set of being returned by Subscriber among the step SP5, and generate a new events with theme, copy to the related content of former incident in the new events and new events is set and former incident between exploded relationship, then new events and subscriber's information are transferred to substep (2) and handle.
At step SP7: after the service end management domain receives request event, incident is given the external event monitor of this management domain.
At step SP8: service end external event monitor is responsible for driving corresponding gridding resource adapter and is realized operation to gridding resource.Can comprise following substep:
(1) at first is extracted in subscriber's information in the incident described in the step SP7; (2) according to the theme of subscriber's type and incident, externally configuration is monitored in search in the action listener configuration; (3) the gridding resource adapter different: if operation flow is then selected the operation flow adapter according to subscriber's type selecting; If service adapter is then selected in service; If the people then selects the manual interaction adapter; (4) according to the monitoring configuration that searches, drive the operation of gridding resource by selected gridding resource adapter.
At step SP9: the operating result of service end gridding resource operation behavior monitor monitoring service end gridding resource, and the response events that listens to is sent to the gridding resource cooperation intermediary of this management domain.
At step SP10: service end gridding resource cooperation intermediary will be according to the response events and the client-side management territory of the definite response events of cooperating of relation between the response events of cooperate, and sends this cooperation response events.Can comprise following substep:
(1) at first is extracted in gridding resource sign in the source attribute of the response events that obtains among the step SP9; (2) according to this gridding resource sign, find the incident that drives this resource, and extract the source of this incident; (3), obtain the destination of client-side management territory as the cooperation response events according to the Event origin in the substep (2).
At step SP11: the response events of will cooperating after the client-side management territory receives request event is given the external event monitor of this management domain, and concrete processing procedure can be identical with above-mentioned steps SP7.
At step SP12: client external event monitor is responsible for driving corresponding gridding resource adapter and is realized operation to gridding resource, and concrete processing procedure can be identical with above-mentioned steps SP8, thereby finish once cooperation.
Fig. 3 A to 3G be with the product supply process be example the gridding resource dynamic integrity and the cooperation schematic diagram, its step is as follows:
(1) reaches " finishing the supply of material " four event-templates (Fig. 3 A) in server 2 (Subscriber) establishment " buying incident ", " shopping list ", " supply of material incident ";
(2) subscription incident: " the sale flow process " in the server 1 and " inventory filing service " subscription " shopping list " incident, manual service in the server 3 " supply of material service " subscription " supply of material incident ", " procurement process " subscription " buying incident " in the server 4 and " finishing the supply of material " incident (Fig. 3 A);
(3) dispose event sniffer (Fig. 3 A): server 1, server 3 and server 4 are all disposed and the Configuration events monitor, the monitor of server 1 is used for monitoring " buying " operation in " sale flow process " and triggers " buying incident ", monitor " shopping list " incident simultaneously, when " shopping list " incident arrives, wake " the sale flow process " waited for up and call " inventory filing service " from the outside; The monitor of server 3 is used for monitoring from " supply of material incident " of outside and drives manual service " supply of material service ", monitors " supply of material service " operation and " finishing the supply of material " incident of triggering simultaneously; The monitor of server 4 is used for monitoring from " the buying incident " of outside and " finishing the supply of material " incident and drives or wake up " procurement process ", and " stock " and " generation shipping list " monitored in " procurement process " operated and triggering " supply of material incident " and " shopping list " incident.
(4) event sniffer of server 1 listens to " buying " operation of " sale flow process ", triggers " buying incident " E1, and " sale flow process " continues operation then, hangs up when running to " reception inventory " and waits for " shopping list " (Fig. 3 B);
(5) after the gridding resource of server 1 cooperation intermediary received " buying incident " E1, line Subscriber 2 was searched and can be found that " procurement process " in the server 4 can be for cooperation (Fig. 3 B) for the gridding resource of cooperation;
(6) gridding resource of server 1 cooperation intermediary sends request to server 4, request cooperate with " procurement process " in the server 4 (Fig. 3 C);
(7) after the event sniffer of server 4 listens to " buying incident " E1, drive " procurement process " operation (Fig. 3 C) of server 4;
(8) event sniffer of server 4 listens to " stock " operation in " procurement process ", triggers " supply of material incident " E2, and " procurement process " continues operation, hangs up when running to " generation shipping list " and waits for " finishing the supply of material " (Fig. 3 D);
(9) after the gridding resource of server 4 cooperation intermediary received " supply of material incident " E2, line server 2 was searched and can be found that " supply of material service " in the server 3 can be for cooperation (Fig. 3 D) for the gridding resource of cooperation;
(10) gridding resource of server 4 cooperation intermediary sends request to server 3, and " supply of material is served " in request and the server 3 cooperated (Fig. 3 E);
(11) after the event sniffer of server 3 listens to " supply of material incident " E2, drive " supply of material service " operation (Fig. 3 E) of server 3;
(12) event sniffer of server 3 listens to the supply of material and finishes triggering " finishing the supply of material " incident E3 (Fig. 3 F);
(13) after the gridding resource of server 3 cooperation intermediary receives " finishing the supply of material " incident E3, send response events E3 (Fig. 3 F) to server 4;
(14) after the event sniffer of server 4 listens to " finishing the supply of material " incident E3 from server 3, wake " procurement process " of waiting for E3 up, and the content of the incident E3 that will " finish the supply of material " sends " procurement process " (Fig. 3 F) to;
(15) event sniffer of server 4 listens to " procurement process " " generation shipping list " operation, triggers " shopping list " incident E4 (Fig. 3 G);
(16) after the gridding resource of server 4 cooperation intermediary receives " shopping list " incident E4, send response events E4 (Fig. 3 G) to server 1;
(17) after the event sniffer of server 1 listens to external event E4,, wake the sale flow instance of waiting for " shopping list " (locating to hang up) up, and call " inventory filing service " (Fig. 3 H) at " reception inventory " according to the configuration of server 1.
In above-mentioned exemplary embodiments, each step and substep are exemplary, those of ordinary skills can determine final actual step according to actual conditions, and the implementation method of each step and substep also is diversified, all should comprise within the scope of the present invention.
Although illustrated and described the present invention at exemplary embodiments, it should be appreciated by those skilled in the art, under the situation that does not break away from the spirit and scope of the present invention, can carry out various other change, replacement and interpolations.Therefore, the present invention should not be understood that to be limited to above-mentioned particular instance, and should be limited by claims.