CN103606042B - Services Composition instance migration availability deciding method based on dynamic dependency graph - Google Patents

Services Composition instance migration availability deciding method based on dynamic dependency graph Download PDF

Info

Publication number
CN103606042B
CN103606042B CN201310581404.XA CN201310581404A CN103606042B CN 103606042 B CN103606042 B CN 103606042B CN 201310581404 A CN201310581404 A CN 201310581404A CN 103606042 B CN103606042 B CN 103606042B
Authority
CN
China
Prior art keywords
movable
dependency graph
dependence
pddg
collection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310581404.XA
Other languages
Chinese (zh)
Other versions
CN103606042A (en
Inventor
宋巍
陈先博
张功萱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201310581404.XA priority Critical patent/CN103606042B/en
Publication of CN103606042A publication Critical patent/CN103606042A/en
Application granted granted Critical
Publication of CN103606042B publication Critical patent/CN103606042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of Services Composition instance migration availability deciding method based on executed path dynamic dependency graph, with develop before and after Services Composition, example to be migrated executed path for input, to migrate availability deciding result for output, its realization includes: analyze the dependence between activity in the executed path of example to be migrated, generate executed path dynamic dependency graph, and obtain arrival executed path terminate to locate all set up to variable-definition;By Dynamic Slicing method backward, yojan dynamic dependency graph;Obtain the controlling stream graph of the Services Composition after developing;Based on the controlling stream graph of Services Composition after developing and the dynamic dependency graph after yojan, it may be judged whether exist a topological sorting be develop after an active sequences of Services Composition, be met if there is the validity then migrated, otherwise be unsatisfactory for.The method utilizing the present invention can avoid the issuable false negative of conventional method, preferably supports the dynamic evolution of Services Composition.

Description

Services Composition instance migration availability deciding method based on dynamic dependency graph
Technical field
The present invention relates to service computing technique field, the especially judgement of Services Composition instance migration validity, in particular to A kind of Services Composition instance migration availability deciding method based on executed path dynamic dependency graph, is adapted to determine that before evolution Can the lower example that generate, that have not carried out end of Services Composition process definition, safely and effectively move to the service group after developing Continue executing with under the particular state definition of conjunction process.
Background technology
Along with distributed object technology and the development of XML technology, Web service technology occurs therewith and tends to ripe.Web service It is the effective mechanism of Data and Information integration on Web, by using the standards based on XML such as WSDL, UDDI and SOAP And agreement, solve the problem such as code reuse, heterogeneous distributed calculating, have that interoperability is strong, loose coupling, the spy such as cross-platform Property.In order to ensure the reusability of single service, single Web service granularity is unsuitable excessive, thus when single simple services can not When meeting user's request, be by the service of plural number function is effectively integrated by certain service describing and constraint, it is achieved Yong Huding The Services Composition of justice, to provide value-added service.Web service combination has level, extensibility, dynamically and adaptivity etc. Feature, by reusing existing service, automatically generates new service or system, greatly improves the production efficiency of software.
Owing to the market demand, technology innovation, regulation change etc. reason causes the external environment condition of enterprise to open changeable, business procedure Model also the most constantly to develop.Kernel-based methods model, the respective service example combinations that is currently running can therefore suffer from impact, Need by terminating, restart and the means such as migration dynamically processing.Compared to the method for other poor efficiency high consumption, example dynamic Migration has more flexibility, will one develop before service composition workflow example from original Work flow model current state, Move under the Work flow model dbjective state after developing, it is ensured that the maximization worked.
In order can continue executing with according to the Services Composition process after developing after ensureing instance migration, (its subsequent execution is developing with one The lower example behavior generated of rear Services Composition definition is consistent), it would be desirable to the Services Composition after evolution finds one with to be migrated The corresponding dbjective state that example current state is consistent.If finding so one corresponding dbjective state, just can be after instance migration Continue executing with according to the Services Composition definition after developing under this state.But, if (real by example state considers data mode The current value of example correlated variables), the transportable property of example is undecidable.The undecidability of this problem makes us to look for Migration validity is verified to a computable sufficient and necessary condition.Therefore, we can only find the checking of adequate condition and move Move validity.
Existing method mostly by abstract for the data message of example fall, thus the control stream mode being based only on example carries out instance migration The judgement of validity.The representative work of this kind of method have that Aalst et al. proposes based on process model behavior inheritance pass before and after developing The workflow instance transportable sex determination method of system, but the method can not process the Work flow model before and after evolution and be unsatisfactory for inheriting The situation of relation, does not the most have generality.Aalst also proposed a kind of workflow migration side not limiting Workflow logs type Method, the method, by comparing the Work flow model before and after change, finds out all regions that there occurs change in Work flow model, as Really workflow instance is not at region of variation, then under example allows the corresponding states of the Work flow model after moving to evolution.Due to this Class method does not accounts for the data mode of example, is therefore not appropriate for the Services Composition dynamic evolution scene of data perception.
Though having certain methods to consider data mode in example state, but existing method being the most conservative, seldom Instance migration is considered effective.Such as: Casati et al. utilizes " track reproduction " technology to judge that the migration of Services Composition example has Effect property, if the executed active sequences of an i.e. example can reappear under the process model developed, then this instance migration is to have Effect.The concept of " track reproduction " has been incorporated in the method for entitled ADEPT by Rinderle and Reichert et al., the method Executed active sequences has done some process, after deleting evolution during the activity of disappearance only remaining in loop structure After the once activity arrived performed by circulation, thus obtain the track after a yojan (i.e. active sequences), if after this yojan Active sequences can reappear under the Services Composition process after evolution, then the migration of respective instance is effective.Although the method Initial " track reproduction " technology has been done some and loosened, but do not accounted for the data independence between activity, and therefore the method depends on The most conservative.
Summary of the invention
The defect existed for prior art or deficiency, it is desirable to provide a kind of Services Composition example based on dynamic dependency graph Migrate availability deciding method, be adapted to determine that reality that generate under the definition of the Services Composition process before evolution, that have not carried out end Can example, safely and effectively move to continue executing with under the particular state definition of the Services Composition process after developing, be avoided that tradition The more issuable false negatives of method (false negative), such that it is able to allow more example migrate, preferably supports The dynamic evolution of Services Composition.
For reaching above-mentioned purpose, the technical solution adopted in the present invention is as follows:
A kind of Services Composition instance migration availability deciding method based on dynamic dependency graph, with develop before and after Services Composition, with And the executed path of example to be migrated is input, with the migration availability deciding result of example to be migrated for output, including following Step:
Step 1, analyze the dependence between activity in the executed path of example to be migrated, automatically generate this executed path Dynamic dependency graph, the dynamic dependency graph of example the most to be migrated, and obtain and arrive executed path and terminate all fixed up to variable of place The set of justice (reaching definitions of variables);
Step 2, yojan dynamic dependency graph: by the method for Dynamic Slicing backward, delete and do not have influential activity on instance migration And corresponding dependence edge;
Step 3, to develop after Services Composition use control flow analysis method obtain controlling stream graph;And
Dynamic dependency graph after step 4, controlling stream graph based on the Services Composition after developing and example yojan to be migrated, it is judged that about Whether there is a topological sorting (i.e. active sequences) under dynamic dependency graph after letter to reappear under the Services Composition after evolution, I.e. judge whether topological sorting be develop after an active sequences of Services Composition, if it is present migrate is effective Property is met, otherwise is unsatisfactory for.
Further, in the implementing of described step 1, the executed path representation of example to be migrated is σ={ σ12... }, σ1, σ2... expression activity, movable σiAll input variables be inPut (σi), all output variables are outPut (σi);Between activity Dependence is expressed as R=(σij), σiAnd σjRepresenting the activity in aforementioned execution route, it comprises control dependence, different Step dependence and data dependence relation, and represented in dynamic dependency graph DDG by the form of directed edge;To be migrated The dynamic dependency graph of example is expressed as DDG=(NDDG, EDDG), NDDGRepresent the active junction point collection of dynamic dependency graph, by event All unduplicated movable compositions, E in daily recordDDGRepresent the dependence edge collection between dynamic dependency graph node, by control dependence collection, Asynchronous call Dependency Set and data dependence relation collection composition;The realization of this step 1 comprises the following steps:
1.1 initialize set ReachingDefs (P1, σ) and set Uses beSet Uses represents the variables collection used, Set ReachingDefs (P1, σ) and it is all defined variable set dynamically terminating place up to definition set, i.e. execution route σ, its Middle P1For the Services Composition before developing, before traversal evolution, all active junction points in the execution route of example to be migrated, add to dynamic The active junction point collection N of state dependency graphDDGIn, analyzing can control dependence collection S between all active junction pointsCDAnd asynchronous call Dependence collection SAD
1.2 traversal active junction point collection NDDGIf, movable σiWith movable σjBetween exist control rely on or asynchronous call rely on, namely: Movable σiWith movable σjBetween binary crelation belong to control dependence collection SCDWith asynchronous call dependence collection SAD, then by phase The control dependence edge answered or asynchronous call dependence edge add the dependence edge set E of dynamic dependency graph toDDGIn;
1.3 use dataflow analysis method, are added by all true data dependence edges in dynamic dependency graph DDG, specifically, and traversal Movable σ in execution route σjAll input variable var ∈ inPut (σj), if movable σjEmploy movable σkThe variable of definition, I.e. movable σkVariable belong to described set ReachingDefs (P1, σ), then will be with movable σjFor starting point, with movable σkFor terminal True data dependence edge add in dynamic dependency graph DDG, simultaneously by activity σjInput variable add described set Uses to In;
1.4 use dataflow analysis method, join in dynamic dependency graph DDG by all anti-data dependence limits, specifically, time Go through movable σ in execution route σjAll output variable var ∈ outPut (σj), if movable σjDefine movable σkThe change used Amount, i.e. movable σkVariable belong to described set Uses, then will be with movable σkFor starting point, with movable σjAnti-data for terminal Dependence edge adds in dynamic dependency graph DDG, simultaneously by activity σjOutput variable add movable σ tojDefined all changes Set Def (the σ of amountjIn);
1.5 use dataflow analysis method, join in dynamic dependency graph DDG by all output data dependence limits, specifically, Movable σ in traversal execution route σjAll output variable var ∈ outPut (σj), if this output variable is by movable σiDefinition, I.e. movable σiVariable belong to described set ReachingDefs (P1, σ), and movable σjRedefined this output variable, then will be with Movable σiFor starting point, with movable σjOutput data dependence limit for terminal is added in DDG, simultaneously by activity σjOutput become Amount adds described set Def (σ tojIn), movable σiDefined variable add to set Kill (σj), this set Kill (σj) it is to be migrated Example along execution route σ perform time, all arrival activity σjAnd by movable σjThe variable-definition being capped after redefining is constituted Set;
All elements in described set Def (σ j) is added to described set ReachingDefs (P by 1.61, σ) in, by described Kill (σj) In all elements from described set ReachingDefs (P1, σ) and middle deletion;
1.7 repeat the above steps 1.2 to 1.6, until all activities in complete execution route σ of traversal;And
1.8 establish the activity of dynamic dependency graph DDG according to active junction points all in execution route and the dependence between them Nodal set NDDGWith dependence edge collection EDDG
Further, in described step 2, the dynamic dependency graph after yojan is expressed as PDDG=(NPDDG,EPDDG), NPDDGRepresent The active junction point collection of dynamic dependency graph, EPDDGRepresent the dependence edge collection between node;The realization of this step 2 comprises the following steps:
2.1 by Services Composition P before described evolution1Project on all variablees under current state Services Composition after evolution, it is thus achieved that Projection ReachingDefs (the P of all variablees1,σ)∩V(P2), P2For the Services Composition after developing, V (P2) represent P2In all Movable;
2.2 traversal projection ReachingDefs (P1,σ)∩V(P2All variablees in), i.e. find out in described dynamic dependency graph DDG The active junction point of defined variable;
2.3 active junction points obtained based on step 2.2, take Dynamic Slicing method backward to obtain directly or indirectly variation value Movable section S;And
2.4 deletion dynamic dependency graph DDG are not belonging to the activity of the most movable section S and dependence edge corresponding with this activity, Thus obtain dynamic dependency graph PDDG after yojan.
Further, the realization of described step 2.4 comprises the following steps:
2.4.1 active junction point collection N is initializedPDDGWith dependence edge collection EPDDGFor sky, traversal projection ReachingDefs (P1,σ)∩V(P2) In all variablees, if there is variable by movable σiDefinition, and movable σiThe not active junction point collection of dynamic dependency graph after yojan NPDDGIn, then by this activity σiAdd active junction point collection N toPDDGNeutralize in a storehouse traversalQueue;
If 2.4.2 storehouse traversalQueue is not empty, then in traversalQueue first activity is popped, if with This activity is that the dependence edge of terminal belongs to dependence edge collection EDDGBut it is not belonging to dependence edge collection EPDDG, add this dependence edge to dependence Limit collection EPDDGIn;If the starting point of this dependence edge is not at active junction point collection NPDDGIn, add this node to active junction point collection NPDDGIn, and add in storehouse traversalQueue;
2.4.3 repeat the above steps 2.4.1-2.4.2, until having traveled through projection ReachingDefs (P1,σ)∩V(P2All variablees in); And
2.4.4 the active junction point collection N obtained based on step 2.4.1 to 2.4.4PDDGWith dependence edge collection EPDDG, after building yojan Dynamic dependency graph PDDG.
Further, in described step 4, migrate the concrete of validity and judge to comprise the following steps:
The active junction point collection N of dynamic dependency graph PDDG after 4.1 traversal yojanPDDGIn all activities, if after yojan The dependence edge collection E of dynamic dependency graph PDDGPDDGIn, often there is dependence edge with node n as terminal, then node n In-degree indegree [n] adds 1, and wherein this indegree [n] represents the in-degree of node n, and initial value is 0;
If 4.2 node n in-degrees are 0, then add in set zeroIndegreeNodeSet, this set ZeroIndegreeNodeSet represents the node set that in-degree is 0, and initial value is
4.3 repeat above-mentioned 4.1 and 4.2, until having traveled through the active junction point collection N of dynamic dependency graph PDDGPDDGIn all activities;
If 4.4 set zeroIndegreeNodeSet are notDetect whether to there is an in-degree indegree [ni] be 0 activity niMeet (P2, SC)[ni>(P2,SC'), i.e. can be at the Services Composition P after evolution2Current state (P2, SCOccur under), if Do not exist, then the migration validity of Services Composition example is unsatisfactory for, wherein (P2,SC)[ni>(P2,SC') represent niCan be in process P2 SCPerform and along with n under stateiExecution P2Can be by state SCEnter new state SC’;
4.5 if there is movable ni, then by node niDelete from set zeroIndegreeNodeSet and add topological sorting ρ to In, update P simultaneously2Current state;
The dependence edge collection E of 4.6 traversal dynamic dependency graph PDDGPDDG, by all and node niAdjacent node in-degree subtracts 1;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet isNow if there is an active sequences Topological sorting ρ can be in Services Composition process P after evolution2Middle playback, then the migration validity of Services Composition example meets.
From the above technical solution of the present invention shows that, the method that the present invention proposes does not requires the executed active sequences of example to be migrated Reappear according under the Services Composition definition after evolution of both definite sequences, thus compared to traditional track replay method, institute of the present invention Extracting method is the most flexible, is avoided that the tradition more issuable false negatives of track replay method (false negative), thus can To allow more example migrate, preferably support the dynamic evolution of Services Composition.
By by way of example embodiments of the present invention being described in detail below in conjunction with accompanying drawing, other features of the present invention, Feature and advantage will become apparent from.
Accompanying drawing explanation
Fig. 1 is the principle explanatory diagram of Services Composition instance migration.
Fig. 2 is the overall reality that Services Composition instance migration availability deciding method based on executed path dynamic dependency graph is exemplary Existing flow chart.
Fig. 3 is the flow chart migrating availability deciding in Fig. 2 exemplary process diagram.
Fig. 4 is an example of dynamic dependency graph DDG of the front Services Composition execution route of evolution.
Fig. 5 is an example of dynamic dependency graph PDDG obtained after the dynamic dependency graph to Fig. 4 carries out yojan.
Fig. 6 a-6b be develop after the example of controlling stream graph of Services Composition.
Fig. 7 a-7b is an example of the controlling stream graph of the front Services Composition of evolution.
Detailed description of the invention
As shown in Figure 1 and Figure 2, according to the preferred embodiment of the present invention, Services Composition instance migration based on dynamic dependency graph has Effect sex determination method, with the Services Composition before and after developing and the executed path (i.e. executed active sequences) of example to be migrated For inputting, with the migration availability deciding result of example to be migrated for output, as in figure 2 it is shown, its concrete implementation includes following Step:
Step 1, analyze the dependence between activity in the executed path of example to be migrated, automatically generate this executed path Dynamic dependency graph, the dynamic dependency graph of example the most to be migrated, and obtain and arrive executed path and terminate all fixed up to variable of place The set of justice (reaching definitions of variables);
Step 2, yojan dynamic dependency graph: by the method for Dynamic Slicing backward, delete and do not have influential activity on instance migration And corresponding dependence edge;
Step 3, to develop after Services Composition use control flow analysis method obtain controlling stream graph;And
Dynamic dependency graph after step 4, controlling stream graph based on the Services Composition after developing and example yojan to be migrated, it is judged that about Whether there is a topological sorting (i.e. active sequences) under dynamic dependency graph after letter to reappear under the Services Composition after evolution, I.e. judge whether topological sorting be develop after an active sequences of Services Composition, if it is present migrate is effective Property is met, otherwise is unsatisfactory for.
Below with reference to Fig. 2 and combine shown in Fig. 3-6, describe the present embodiment in detail realizes process.
For the sake of for convenience of description, as the Services Composition inputted with BPEL (Business Process Execution in the present embodiment Language), as a example by process, system, OWL-S (Ontology Web Language for Services) certainly it are not limited thereto The Services Composition of other data perception such as process is also applied for the present embodiment.
For meeting the BPEL process of WS-BPEL 2.0 specification, after the present embodiment can judge the evolution given accurately and effectively Whether Services Composition example can replace the lower example that generate, that have not carried out end of process definition before developing, thus moves to mesh Mark state, to continue to provide current service.
As in figure 2 it is shown, the Services Composition instance migration validity based on executed path dynamic dependency graph that the present embodiment provides is sentenced Determining method, its concrete implementation comprises the following steps:
Step 1, analyze dependence R between activity in the executed path σ of example to be migrated, automatically generate executed path Dynamic dependency graph DDG, the dynamic dependency graph of example the most to be migrated, and obtain arrive executed path σ terminate place all up to Set ReachingDefs (the P of variable-definition (reaching definitions of variables)1,σ)。
Wherein: the executed path representation of example to be migrated is σ={ σ12... }, σ1, σ2... expression activity, movable σiInstitute Having input variable is inPut (σ i), and all output variables are outPut (σi);Dependence between activity is expressed as R=(σij), σi And σjRepresenting the activity in aforementioned execution route, it comprises control dependence, asynchronous call dependence and data dependence relation, And represented in dynamic dependency graph DDG by the form of directed edge;The dynamic dependency graph of example to be migrated is expressed as DDG =(NDDG, EDDG), NDDGRepresent the active junction point collection of dynamic dependency graph, be made up of unduplicated activities all in event log, EDDGRepresent the dependence edge collection between dynamic dependency graph node, closed by controlling dependence collection, asynchronous call Dependency Set and data dependence Assembly forms.
As preferably embodiment, this step implements and comprises the following steps:
1.1 initialize set ReachingDefs (P1, σ) and set Uses beSet Uses represents the variables collection used, Set ReachingDefs (P1, σ) and it is all defined variable set dynamically terminating place up to definition set, i.e. execution route σ, its Middle P1For the Services Composition before developing, before traversal evolution, all active junction points in the execution route of example to be migrated, add to dynamic The active junction point collection N of state dependency graphDDGIn, analyzing can control dependence collection S between all active junction pointsCDAnd asynchronous call Dependence collection SAD
1.2 traversal active junction point collection NDDGIf, movable σiWith movable σjBetween exist control rely on or asynchronous call rely on, namely: Movable σiWith movable σjBetween binary crelation belong to control dependence collection SCDWith asynchronous call dependence collection SAD, then by phase The control dependence edge answered or asynchronous call dependence edge add the dependence edge set E of dynamic dependency graph toDDGIn;
1.3 use dataflow analysis method, are added by all true data dependence edges in dynamic dependency graph DDG, specifically, and traversal Movable σ in execution route σjAll input variable var ∈ inPut (σj), if movable σjEmploy movable σkThe variable of definition, I.e. movable σkVariable belong to described set ReachingDefs (P1, σ), then will be with movable σjFor starting point, with movable σkFor terminal True data dependence edge add in dynamic dependency graph DDG, simultaneously by activity σjInput variable add described set Uses to In;
1.4 use dataflow analysis method, join in dynamic dependency graph DDG by all anti-data dependence limits, specifically, time Go through movable σ in execution route σjAll output variable var ∈ outPut (σj), if movable σjDefine movable σkThe change used Amount, i.e. movable σkVariable belong to described set Uses, then will be with movable σkFor starting point, with movable σjAnti-data for terminal Dependence edge adds in dynamic dependency graph DDG, simultaneously by activity σjOutput variable add movable σ tojDefined all changes Set Def (the σ of amountjIn);
1.5 use dataflow analysis method, join in dynamic dependency graph DDG by all output data dependence limits, specifically, Movable σ in traversal execution route σjAll output variable var ∈ outPut (σj), if this output variable is by movable σiDefinition, I.e. movable σiVariable belong to described set ReachingDefs (P1, σ), and movable σjRedefined this output variable, then will be with Movable σiFor starting point, with movable σjOutput data dependence limit for terminal is added in DDG, simultaneously by activity σjOutput become Amount adds described set Def (σ tojIn), movable σiDefined variable add to set Kill (σj), this set Kill (σj) it is to be migrated Example along execution route σ perform time, all arrival activity σjAnd by movable σjThe variable-definition being capped after redefining is constituted Set;
All elements in described set Def (σ j) is added to described set ReachingDefs (P by 1.61, σ) in, by described Kill (σj) In all elements from described set ReachingDefs (P1, σ) and middle deletion;
1.7 repeat the above steps 1.2 to 1.6, until all activities in complete execution route σ of traversal;And
1.8 establish the activity of dynamic dependency graph DDG according to active junction points all in execution route and the dependence between them Nodal set NDDGWith dependence edge collection EDDG
In the present embodiment, the above-mentioned step that implements can use following algorithm 1 to realize, certainly, and the ordinary skill of this area Personnel can realize in the way of using other, the most only one one exemplary embodiment.
Algorithm 1 builds dynamic dependency graph:
1.begin
2.Defs←Ф
3.Uses←Ф
4.for j←1to|σ|
5.N←N∪{σ[j]}
6.for everyσ[i]∈N
7.if<σ[i],σ[j]>∈SCD or SAD
8.E←E∪{<σ[i],σ[j]>}
9.endif
10.endfor
11.for every var∈inPut(σ[j])
12.E←E∪{<σ[k],σ[j]>|varσ[k]∈Defs}
13.Uses←Uses∪{varσ[j]}
14.endfor
15.Def(σ[j])←Ф
16.Kill(σ[j])←Ф
17.for every var∈outPut(σ[j])
18.E←E∪{<σ[k],σ[j]>|varσ[k]∈Uses}
19.E←E∪{<σ[i],σ[j]>|varσ[i]∈Defs}
20.Def(σ[j])←Def(σ[j])∪{varσ[j]}
21.Kill(σ[j])←Kill(σ[j])∪{varσ[i]|varσ[i]∈Defs}
22.endfor
23.Defs←(Defs–Kill(σ[j]))∪Def(σ[j])
24.endfor
25.end
With reference to shown in Fig. 2, next enter step 2 and operate, yojan dynamic dependency graph DDG.
Step 2, the method passing through Dynamic Slicing backward, delete and do not have influential activity and corresponding dependence edge thereof on instance migration, Wherein, the dynamic dependency graph after yojan is expressed as PDDG=(NPDDG,EPDDG), NPDDGRepresent the active junction point of dynamic dependency graph Collection, EPDDGRepresent the dependence edge collection between node.As preferably embodiment, it implements and comprises the following steps:
2.1 by Services Composition P1Project on all variablees under current state Services Composition i.e. BPEL process model after evolution, Obtain the projection ReachingDefs (P of all variablees1,σ)∩V(P2), P2For the Services Composition after developing, V (P2) represent P2In All activities;
2.2 traversal projection ReachingDefs (P1,σ)∩V(P2All variablees in), it is the most fixed i.e. to find out in dynamic dependency graph DDG The active junction point of justice variable;
2.3 active junction points obtained based on step 2.2, take Dynamic Slicing method backward to obtain directly or indirectly variation value Movable section S;
2.4 deletion dynamic dependency graph DDG are not belonging to the activity of the most movable section S (because of they shapes current to migration example State is to V (P2) projection do not affect) and dependence edge corresponding with this activity, thus obtain the dynamic dependency graph after yojan PDDG。
Wherein, the realization of step 2.4 comprises the steps:
2.4.1 active junction point collection N is initializedPDDGWith dependence edge collection EPDDGFor sky, traversal projection ReachingDefs (P1,σ)∩V(P2) In all variablees, if there is variable by movable σiDefinition, and movable σiThe not active junction point collection of dynamic dependency graph after yojan NPDDGIn, then by this activity σiAdd active junction point collection N toPDDGNeutralize in a storehouse traversalQueue;
If 2.4.2 storehouse traversalQueue is not empty, then in traversalQueue first activity is popped, if with This activity is that the dependence edge of terminal belongs to dependence edge collection EDDGBut it is not belonging to dependence edge collection EPDDG, add this dependence edge to dependence Limit collection EPDDGIn;If the starting point of this dependence edge is not at active junction point collection NPDDGIn, add this node to active junction point collection NPDDGIn, and add in storehouse traversalQueue;
2.4.3 repeat the above steps 2.4.1-2.4.2, until having traveled through projection ReachingDefs (P1,σ)∩V(P2All variablees in);
2.4.4 the active junction point collection N obtained based on step 2.4.1 to 2.4.4PDDGWith dependence edge collection EPDDG, after building yojan Dynamic dependency graph PDDG.
In the present embodiment, the above-mentioned step that implements can use following algorithm 2 to realize, certainly, and the ordinary skill of this area Personnel can realize in the way of using other, the most only one one exemplary embodiment.
Algorithm 2 isolates the dynamic dependency graph after yojan:
1.begin
2.N'←Ф
3.E'←Ф
4.Defs←Defs∩V(P2)
5.for each varσ[i]∈Defs
6.N'←N'∪{σ[i]}
7.traversalQueue←{σ[i]}
8.while traversalQueue≠Ф
9.σ[k]←traversalQueue.dequeue()
10.for each<σ[j],σ[k]>∈E
11.if<σ[j],σ[k]>E'and<σ[j],σ[k]>
is not an anti-or output dependence edge
12.E'←E'∪{<σ[j],σ[k]>}
13.endif
14.ifσ[j]N'
15.N'←N'∪{σ[j]}
16.traversalQueue.enqueue(σ[j])
17.endif
18.endfor
19.endwhile
20.endfor
21.PDDG(N',E')←DDG(N,E)↑N'
22.end
As in figure 2 it is shown, it follows that enter:
Step 3: use control flow analysis method to obtain controlling stream graph the Services Composition after developing.
In the present embodiment, the controlling stream graph of the Services Composition after using the control flow analysis method of routine to be developed.Such as, " a kind of program control flowchart Layout Algorithm and the realization thereof " that Yuan Yuan, Jin Maozhong et al. propose;Constructing Control Flow Graph for Java by Decoupling Exception Flow from Normal Flow,Jang-Wu Jo,Byeong-Mo Chang in Computational Science and Its Applications ICCSA 2004 (2004), Volume 3043,2004, pp 106-113;Generation of Control and Data Flow Graphs from Scheduled and Pipelined Assembly Code, David C.Zaretsky, Gaurav Mittal ... in Languages and Compilers for Parallel Computing, Volume 4339,2006, pp 76-90 (2006), be not limited thereto system certainly.
As preferably embodiment, in the present embodiment, the acquisition of controlling stream graph comprises the following steps:
3.1 travel through given BPEL process according to the mode of depth-first, obtain all of active junction point, and to BPEL mistake The root activity of journey is set as that territory<scope>is movable;
3.2 according to the type of acquired activity, and select that the analytical function corresponding with this Activity Type analyze during BPEL is every The attribute of individual active junction point, extracts activity attributes common for all activities and is stored in internal memory, then according to Activity Type, Store attribute specific to each type of activity separately.
Analytical function can be divided into following 4 classes according to Activity Type:
A) attribute of the basic activity that the analytical function of basic activity reads during BPEL, movable attribute mainly comprises name Title, type, the follow-up relation of forerunner, input/output variable, partner's link and port type, in block structure, only in order Just there is the follow-up relation of forerunner between activity under<sequence>is movable, and block structure is by structured activities and its subactivity group Become, there is longitudinal stereovision;
B) for structured activities<if>,<switch>,<pick>,<while>with<repeatUtil>, their input variable is only Can obtain out from conditional statement<condition>, but these conditional statements must are fulfilled for bpel:getVariableProperty (", ' ') or bpws:getVariableData (", ") both forms can be resolved, and output variable in structured activities is all Empty null;
C) select the analytical function movable with loop structure to read the attribute of this type activity during BPEL, wherein input change Amount parses from condition<condition>, and, read the branch under respective conditions<conditon>movable;
D) analytical function of concurrent structure and sequential organization activity reads the attribute of this type activity during BPEL, and reads Take the activity under its Mei Tiao branch.
Operate as in figure 2 it is shown, next enter step 4, the migration validity of respective service example combinations is judged.
Step 4, controlling stream graph based on the Services Composition after dynamic dependency graph PDDG after yojan and evolution, it is judged that this is dynamic Whether there is a topological sorting ρ (i.e. active sequences) under dependency graph PDDG can reappear under the Services Composition after evolution, i.e. Judge whether that a topological sorting ρ is the Services Composition P after developing2An active sequences, if it is present migrate Validity is met, otherwise is unsatisfactory for.
With reference to shown in Fig. 3-Fig. 4, as one preferably embodiment, migrate implementing of availability deciding and include following step Rapid:
The active junction point collection N of dynamic dependency graph PDDG after 4.1 traversal yojanPDDGIn all activities, if after yojan The dependence edge collection E of dynamic dependency graph PDDGPDDGIn, often there is dependence edge with node n as terminal, then node n In-degree indegree [n] adds 1, and wherein this indegree [n] represents the in-degree of node n, and initial value is 0;
If 4.2 node n in-degrees are 0, then add in set zeroIndegreeNodeSet, this set ZeroIndegreeNodeSet represents the node set that in-degree is 0, and initial value is
4.3 repeat above-mentioned 4.1 and 4.2, until having traveled through the active junction point collection N of dynamic dependency graph PDDGPDDGIn all activities;
If 4.4 set zeroIndegreeNodeSet are notDetect whether to there is an in-degree indegree [ni] be 0 activity niMeet (P2, SC)[ni>(P2,SC'), i.e. can be at the Services Composition P after evolution2Current state (P2, SCOccur under), if Do not exist, then the migration validity of Services Composition example is unsatisfactory for, wherein (P2,SC)[ni>(P2,SC') represent niCan be in process P2 SCPerform and along with n under stateiExecution P2Can be by state SCEnter new state SC’;
4.5 if there is movable ni, then by node niDelete from set zeroIndegreeNodeSet and add topological sorting ρ to In, update P simultaneously2Current state;
The dependence edge collection E of 4.6 traversal dynamic dependency graph PDDGPDDG, by all and node niAdjacent node in-degree subtracts 1;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet isNow if there is an active sequences Topological sorting ρ can be in Services Composition process P after evolution2Middle playback, then the migration validity of Services Composition example meets.
In the present embodiment, the above-mentioned step that implements can use following algorithm 3 to realize, certainly, and the ordinary skill of this area Personnel can realize in the way of using other, the most only one one exemplary embodiment.
Algorithm 3 migrates validation verification:
1.begin
2.zeroIndegreeNodeSet←Ф
3.(P2,Sc)←(P2,S0)
4.for each n∈N'
5.indegree[n]←0
6.for each<n',n>∈E
7.indegree[n]←indegree[n]+1
8.endfor
9.if indegree [n]=0
10.zeroIndegreeNodeSet←zeroIndegreeNodeSet∪{n}
11.endif
12.endfor
13.while zeroIndegreeNodeSet.isEmpty ()=false
14.ifni∈zeroIndegreeNodeSet,satisfying(P2,Sc)[ni>(P2,Sc')
15.zeroIndegreeNodeSet←zeroIndegreeNodeSet-{ni}
16.(P2,Sc)←(P2,Sc')
17.for each n∈N satisfying<ni,n>∈E
18.indegree[n]←indegree[n]-1
19.if indegree [n]=0
20.zeroIndegreeNodeSet←zeroIndegreeNodeSet∪{n}
21.endif
22.endfor
23.else
24.validity←false
25.return
26.endif
27.endwhile
28.validity←true
29.end
Shown in Fig. 4-7, using the BPEL process model of travel agent as Services Composition example, the present embodiment is carried Specific description is done in the migration availability deciding process gone out and realization thereof, and the BPEL process model of travel agent includes plane ticket booking, Hotel reservations etc. service, and this model is made up of 14 active junction points, including selecting, and the structure such as concurrently.
In order to judge that can example that generate under the definition of the Services Composition process before evolution, that have not carried out end safely and effectively Moving to continue executing with under the particular state definition of the Services Composition process after developing, the enforcement of its decision process includes:
1. analyze Services Composition example P to be migrated1Execution route σ=< A1.1,A2.1,A3.1,A4.1,A5.1,A6.1,A7.1,A8.1,A9.1, A1.2,A2.2,A3.2,A4.2,A5.2,A6.2,A7.2,A8.2,A9.2,A10.1,A12.1,A11.1> carry out dependence R, obtain dynamic dependency graph DDG, and acquire the set ReachingDefs (P up to variable-definition1, σ) and={ queryInputA1.2,airlineQueryA2.2, hotelQueryA2.2,airlineResultA3.2,hotelResultA4.2,queryOutputA5.2,AcknowledgementA8.2, airlineBookingA10.1,hotelBookingA10.1,hotelOfferA12.1,airlineOfferA11.1},Ai.jExpression activity AiJth time Occurring, its detailed process is as follows:
1.1 initialize ReachingDefs and Uses isAll work of the execution route of the BPEL process instance before traversal evolution Dynamic node, adds the active junction point collection N of dynamic dependency graph toDDGIn, obtain NDDG={ A1.1,A2.1,A3.1,A4.1,A5.1,A6.1, A7.1,A8.1,A9.1,A1.2,A2.2,A3.2,A4.2,A5.2,A6.2,A7.2,A8.2,A9.2,A10.1,A12.1,A11.1, analyze and obtain all movable knots Control dependence collection S between pointCD={ (A9.1,A1.2),(A9.1,A2.2),(A9.1,A3.2),(A9.1,A4.2),(A9.1,A5.2),(A9.1, A6.2),(A9.1,A7.2),(A9.1,A8.2),(A9.2,A10.1),(A9.2,A12.1),(A9.2,A11.1) and asynchronous call dependence collection SAD= {(A7.1,A8.1),(A7.2,A8.2)};
1.2 traversal active junction point collection NDDGIf existing between the movable i of fruit and movable j and controlling to rely on or asynchronous call relies on, i.e. its two Unit's relation belongs to control dependence collection SCDWith asynchronous call dependence collection SAD, then dependence edge or asynchronous call will be controlled accordingly Dependence edge adds the dependence edge set E of dynamic dependency graph toDDGIn;
1.3 use dataflow analysis method, by all true data dependence edge (A1.1,A2。1),(A2。1,A3。1),(A3.1,A5.1),(A4.1,A5.1), (A5.1,A6.1),(A5.1,A7.1),(A7。1,A8。1),(A8.1,A9.1),(A2.1,A1.2),(A3.1,A2.2),(A4.1,A2.2),(A5.1,A3.2),(A5.1, A4.2),(A6.1,A5.2),(A7.1,A5.2),(A5.2,A10.1),(A1.2,A2.2),(A2.2,A3.2),(A2.2,A4.2),(A4.2,A5.2),(A5.2, A6.2),(A5.2,A7.2),(A7.2,A8.2),(A8.2,A9.2),(A10.1,A12。1),(A10.1,A11.1) add in dynamic dependency graph DDG, it may be assumed that Movable A in traversal execution route σ1.2All input variables because at execution activity A1.1Time, by A1.2Input variable QueryInput has added in defined variable set ReachingDefs, so movable A1.2Employ movable A1.1The change of definition Amount queryInput, then will be with movable A1.1For starting point, movable A1.2True data dependence edge for terminal adds in DDG, with Time queryInput is added in used variables collection Uses;
1.4 use dataflow analysis method, by anti-data dependence limit (A9.1,A8.2) add in dynamic dependency graph DDG, it may be assumed that traversal Movable A in execution route σ8.2All output variables.Because at execution activity A9.1Time, by A8.2Output variable Acceptance has added use variables collection Uses to, so movable A8.2Define movable A9.1The variable used, then will be with Movable A9.1For starting point, movable A8.2Anti-data dependence limit for terminal is added in DDG, is added to by acceptance simultaneously Def(A8.2In);
1.5 use dataflow analysis method, by all output data dependence limit (A1.1,A1.2), (A2.1,A2.2), (A3.1,A3.2), (A4.1, A4.2), (A5.1,A5.2), (A8.1,A8..2) add in dynamic dependency graph DDG, it may be assumed that movable A in traversal execution route σ8.2Institute There is output variable, because at execution activity A8.1Time, by activity A8.2Output variable acceptance added to defined Variables collection ReachingDefs, so movable A8.2Redefine movable A8.1The variable acceptance of definition, then will be with work Dynamic A8.1For starting point, movable A8.2Output data dependence limit for terminal is added in DDG, simultaneously by A8.2The variable of output Acceptance adds Def (A to8.2In), by A8.1The variable acceptance of output add Kill (A to8.2In);
1.6 by Def (A8.2Elements A in)8.2The variable acceptance of output add defined set ReachingDefs to In, by Kill (A8.2Elements A in)8.1The variable acceptance of output add to from dynamically up to definition set ReachingDefs deletes, i.e. uses A8.2The acceptance of definition overrides A8.1The acceptance of definition;
1.7 repeat 1.2 to 1.6, until all activities in complete execution route σ of traversal;
1.8 establish the activity of dynamic dependency graph DDG according to active junction points all in execution route and the dependence between them Nodal set NDDG={ A1.1,A2.1,A3.1,A4.1,A5.1,A6.1,A7.1,A8.1,A9.1,A1.2,A2.2,A3.2,A4.2,A5.2,A6.2,A7.2,A8.2, A9.2,A10.1,A12.1,A11.1And dependence edge collection EDDG={ (A9.1,A1.2),(A9.1,A2.2),(A9.1,A3.2),(A9.1,A4.2),(A9.1, A5.2),(A9.1,A6.2),(A9.1,A7.2),(A9.1,A8.2),(A9.2,A10.1),(A9.2,A12.1),(A9.2,A11.1),(A1.1,A2。1),(A2。1,A3。 1),(A3.1,A5.1),(A4.1,A5.1),(A5.1,A6.1),(A5.1,A7.1),(A7。1,A8。1),(A8.1,A9.1),(A1.1,A1.2),(A2.1,A1.2),(A2.1, A2.2),(A3.1,A2.2),(A3.1,A3.2),(A4.1,A2.2),(A4.1,A4.2),(A5.1,A3.2),(A5.1,A4.2),(A5.1,A5.2),(A6.1,A5.2), (A7.1,A5.2),(A8.1,A8.2),(A5.2,A10.1),(A1.2,A2.2),(A2.2,A3.2),(A2.2,A4.2),(A4.2,A5.2),(A5.2,A6.2), (A5.2,A7.2),(A7.2,A8.2),(A8.2,A9.2),(A10.1,A12。1),(A10.1,A11.1), build dynamic dependency graph DDG, such as Fig. 4 Shown in, for dynamic dependency graph DDG of Services Composition execution route before developing.
2., by the method for Dynamic Slicing backward, delete the Services Composition P after developing2Do not has influential movable A6.1, A6.2And Corresponding dependence edge (A5.1,A6.1), (A5.2,A6.2), (A6.1,A5.2)(A9.1,A6.2) obtain the dynamic dependency graph after yojan, its concrete mistake Journey is as follows:
2.1 by Services Composition example P1Project on all variablees under current state BPEL process model after evolution, it is thus achieved that Projection ReachingDefs (P1, σ) ∩ V (P2)={ queryInputA of all variablees1.2,airlineQueryA2.2,hotelQueryA2.2, airlineResultA3.2,hotelResultA4.2,queryOutputA5.2,AcknowledgementA8.2,airlineBookingA10.1, hotelBookingA10.1,hotelOfferA12.1,airlineOfferA11.1};
2.2 traversal ReachingDefs (P1, σ) ∩ V (P2) all variablees, find out the activity of defined variable in dynamic dependency graph DDG Node A1.2, A2.2, A3.2, A4.2, A5.2, A8.2, A10.1, A11.1, A12.1
2.3 take Dynamic Slicing method backward to obtain the movable section S of direct or indirect variation value;
The 2.4 movable A deleting in dynamic dependency graph the S that is not belonging to arbitrarily to cut into slices6.1, A6.2And the limit (A relevant to this activity5.1,A6.1), (A5.2,A6.2),(A6.1,A5.2),(A9.1,A6.2), thus obtain dynamic dependency graph PDDG after yojan;
Wherein, step 2.4 is specific as follows:
2.4.1 active junction point collection N is initializedPDDGWith dependence edge collection EPDDGFor sky, traversal projection ReachingDefs (P1, σ) ∩ V (P2) In all variablees, variable queryInputA1.2, the not active junction point collection N of the dynamic dependency graph after yojanPDDGIn, then will live Dynamic A1.2Add nodal set N toPDDGIn and by activity A1.2Add in a storehouse traversalQueue;
2.4.2 with A1.2Limit (A for terminal1.1,A1.2),(A2.1,A1.2),(A9.1,A1.2) belong to dependence edge collection EDDGBut it is not belonging to EPDDG, add this dependence edge to EPDDGIn;
2.4.3A1.1, A2.1, A9.1Not at NPDDGIn, by A2.1, A9.1Add N toPDDGIn;
2.4.4 the analysis method of step 2.4.1-2.4.4 is repeated, until having traveled through projection ReachingDefs (P1,σ)∩V(P2Own in) Variable;
2.4.5 by the active junction point collection N obtainedDDG={ A1.1,A2.1,A3.1,A4.1,A5.1,A7.1,A8.1,A9.1,A1.2,A2.2,A3.2, A4.2,A5.2,A7.2,A8.2,A9.2,A10.1,A12.1,A11.1And dependence edge collection EDDG={ (A9.1,A1.2),(A9.1,A2.2),(A9.1,A3.2), (A9.1,A4.2),(A9.1,A5.2),(A9.1,A7.2),(A9.1,A8.2),(A9.2,A10.1),(A9.2,A12.1),(A9.2,A11.1),(A1.1,A2。1),(A2。 1,A3。1),(A3.1,A5.1),(A4.1,A5.1),(A5.1,A7.1),(A7。1,A8。1),(A8.1,A9.1),(A1.1,A1.2),(A2.1,A1.2),(A2.1,A2.2), (A3.1,A2.2),(A3.1,A3.2),(A4.1,A2.2),(A4.1,A4.2),(A5.1,A3.2),(A5.1,A4.2),(A5.1,A5.2),(A7.1,A5.2), (A8.1,A8.2),(A5.2,A10.1),(A1.2,A2.2),(A2.2,A3.2),(A2.2,A4.2),(A4.2,A5.2),(A5.2,A7.2),(A7.2,A8.2), (A8.2,A9.2),(A10.1,A12。1),(A10.1,A11.1) build dynamic dependency graph PDDG after yojan, as it is shown in figure 5, for after yojan Dynamic dependency graph PDDG.
3. the Services Composition P after pair evolution2Existing control flow analysis method is used to obtain its controlling stream graph CFG, such as Fig. 6 a-6b Shown in, for the example of the controlling stream graph of Services Composition after developing.For the sake of contrast, this example gives Services Composition before developing Controlling stream graph, as shown in Fig. 7 a-7b.
4. dynamic dependency graph PDDG after yojan judges, if there is a topological sorting ρ=< A1.1,A2.1,A3.1,A4.1, A5.1,A7.1,A8.1,A9.1,A1.2,A2.2,A3.2,A4.2,A5.2,A7.2,A8.2,A9.2,A10.1,A11.1,A12.1> can be at P2Controlling stream graph CFG is upper to be reappeared, then judge that respective service example combinations meets and migrate validity, and what it judged specifically comprises the following steps that
The dependence edge collection E of dynamic dependency graph PDDG after 4.1 traversal yojanPDDG, if there is the limit with certain node as terminal, Then in-degree indegree of this node adds 1, finally obtains indegree [A1.1]=0, indegree [A2.1]=1, indegree [A3.1]=1, indegree[A4.1]=0, indegree [A5.1]=2, indegree [A7.1]=1, indegree [A8.1]=1, indegree [A9.1]=1, indegree[A1.2]=3, indegree [A2.2]=5, indegree [A3.2]=4, indegree [A4.2]=4, indegree [A5.2]=5, indegree[A7.2]=2, indegree [A8.2]=4, indegree [A9.2]=1, indegree [A10.1]=2, indegree [A11.1]=2, indegree[A12.1]=2;
4.2A1.1In-degree is 0, then add in set zeroIndegreeNodeSet;
4.3 repeat above-mentioned 4.1 and 4.2, until having traveled through the active junction point collection N of dynamic dependency graph PDDGPDDGIn all activities;
4.4 one in-degree of existence are the movable A of 01.1Meet (P2, SC)[A1.1>(P2,SC’);
4.5 by node A1.1Add in topological sorting ρ, delete from set zeroIndegreeNodeSet and add topology row to In sequence ρ, update P simultaneously2Current state;
The dependence edge collection E of 4.6 traversal dynamic dependency graph PDDGPDDG, by all and node niAdjacent node A1.2,A2.1In-degree Subtract 1, i.e. indegree [A1.2]=0, indegree [A2.1]=0;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet isNow if there is an active sequences Topological sorting ρ=< A1.1,A2.1,A3.1,A4.1,A5.1,A7.1,A8.1,A9.1,A1.2,A2.2,A3.2,A4.2,A5.2,A7.2,A8.2,A9.2,A10.1, A11.1,A12.1> can be in BPEL process P after evolution2Middle playback, can determine that the migration validity of this Services Composition example meets.
Although the present invention is disclosed above with preferred embodiment, so it is not limited to the present invention.The technical field of the invention Middle tool usually intellectual, without departing from the spirit and scope of the present invention, when being used for a variety of modifications and variations.Therefore, originally The protection domain of invention is when being as the criterion depending on those as defined in claim.

Claims (4)

1. a Services Composition instance migration availability deciding method based on dynamic dependency graph, it is characterised in that before and after developing Services Composition and example to be migrated executed path for input, with the migration availability deciding result of example to be migrated be Output, its realization comprises the following steps:
Step 1, analyze the dependence between activity in the executed path of example to be migrated, automatically generate the dynamic of executed path State dependency graph, the dynamic dependency graph of example the most to be migrated, and obtain arrive executed path terminate place all up to variable-definition Set;
Step 2, yojan dynamic dependency graph: by the method for Dynamic Slicing backward, delete and do not have influential activity on instance migration And corresponding dependence edge;
Step 3, to develop after Services Composition use control flow analysis method obtain controlling stream graph;And
Dynamic dependency graph after step 4, controlling stream graph based on the Services Composition after developing and example yojan to be migrated, it is judged that about Whether there is a topological sorting under dynamic dependency graph after letter to reappear under the Services Composition after evolution, i.e. judge whether to deposit An active sequences of Services Composition after a topological sorting is to develop, if it is present the validity migrated is met, Otherwise it is unsatisfactory for;
Wherein, in the implementing of described step 1, the executed path representation of example to be migrated is σ={ σ12... }, σ1, σ2... Expression activity, movable σiAll input variables be inPut (σi), all output variables are outPut (σi);Dependence between activity is closed System is expressed as R=(σij), σiAnd σjRepresenting the activity in aforementioned execution route, it comprises control dependence, asynchronous call Dependence and data dependence relation, and represented in dynamic dependency graph DDG by the form of directed edge;Example to be migrated Dynamic dependency graph is expressed as DDG=(NDDG, EDDG), NDDGRepresent the active junction point collection of dynamic dependency graph, by event log All unduplicated movable compositions, EDDGRepresent the dependence edge collection between dynamic dependency graph node, by controlling dependence collection, asynchronous Call Dependency Set and data dependence relation collection composition;The realization of this step 1 comprises the following steps:
1.1 initialize set ReachingDefs (P1, σ) and set Uses beSet Uses represents the variables collection used, Set ReachingDefs (P1, σ) and it is all defined variable set dynamically terminating place up to definition set, i.e. execution route σ, its Middle P1For the Services Composition before developing, before traversal evolution, all active junction points in the execution route of example to be migrated, add to dynamic The active junction point collection N of state dependency graphDDGIn, analyzing can control dependence collection S between all active junction pointsCDAnd asynchronous call Dependence collection SAD
1.2 traversal active junction point collection NDDGIf, movable σiWith movable σjBetween exist control rely on or asynchronous call rely on, namely: Movable σiWith movable σjBetween binary crelation belong to control dependence collection SCDWith asynchronous call dependence collection SAD, then by phase The control dependence edge answered or asynchronous call dependence edge add the dependence edge set E of dynamic dependency graph toDDGIn;
1.3 use dataflow analysis method, are added by all true data dependence edges in dynamic dependency graph DDG, specifically, and traversal Movable σ in execution route σjAll input variable var ∈ inPut (σj), if movable σjEmploy movable σkThe variable of definition, I.e. movable σkVariable belong to described set ReachingDefs (P1, σ), then will be with movable σjFor starting point, with movable σkFor terminal True data dependence edge add in dynamic dependency graph DDG, simultaneously by activity σjInput variable add described set Uses to In;
1.4 use dataflow analysis method, join in dynamic dependency graph DDG by all anti-data dependence limits, specifically, time Go through movable σ in execution route σjAll output variable var ∈ outPut (σj), if movable σjDefine movable σkThe change used Amount, i.e. movable σkVariable belong to described set Uses, then will be with movable σkFor starting point, with movable σjAnti-data for terminal Dependence edge adds in dynamic dependency graph DDG, simultaneously by activity σjOutput variable add movable σ tojDefined all changes Set Def (the σ of amountjIn);
1.5 use dataflow analysis method, join in dynamic dependency graph DDG by all output data dependence limits, specifically, Movable σ in traversal execution route σjAll output variable var ∈ outPut (σj), if this output variable is by movable σiDefinition, I.e. movable σiVariable belong to described set ReachingDefs (P1, σ), and movable σjRedefined this output variable, then will be with Movable σiFor starting point, with movable σjOutput data dependence limit for terminal is added in DDG, simultaneously by activity σjOutput become Amount adds described set Def (σ tojIn), movable σiDefined variable add to set Kill (σj), this set Kill (σj) it is to be migrated Example along execution route σ perform time, all arrival activity σjAnd by movable σjThe variable-definition being capped after redefining is constituted Set;
All elements in described set Def (σ j) is added to described set ReachingDefs (P by 1.61, σ) in, by described Kill (σj) In all elements from described set ReachingDefs (P1, σ) and middle deletion;
1.7 repeat the above steps 1.2 to 1.6, until all activities in complete execution route σ of traversal;And
1.8 establish the activity of dynamic dependency graph DDG according to active junction points all in execution route and the dependence between them Nodal set NDDGWith dependence edge collection EDDG
Services Composition instance migration availability deciding method based on dynamic dependency graph the most according to claim 1, its feature Being, in described step 2, the dynamic dependency graph after yojan is expressed as PDDG=(NPDDG,EPDDG), NPDDGRepresent and dynamically depend on Rely the active junction point collection of figure, EPDDGRepresent the dependence edge collection between node;The realization of this step 2 comprises the following steps:
2.1 by Services Composition P before described evolution1Project on all variablees under current state Services Composition after evolution, it is thus achieved that Projection ReachingDefs (the P of all variablees1,σ)∩V(P2), P2For the Services Composition after developing, V (P2) represent P2In all Movable;
2.2 traversal projection ReachingDefs (P1,σ)∩V(P2All variablees in), i.e. find out in described dynamic dependency graph DDG The active junction point of defined variable;
2.3 active junction points obtained based on step 2.2, take Dynamic Slicing method backward to obtain directly or indirectly variation value Movable section S;And
2.4 deletion dynamic dependency graph DDG are not belonging to the activity of the most movable section S and dependence edge corresponding with this activity, Thus obtain dynamic dependency graph PDDG after yojan.
Services Composition instance migration availability deciding method based on dynamic dependency graph the most according to claim 2, its feature Being, the realization of described step 2.4 comprises the following steps:
2.4.1 active junction point collection N is initializedPDDGWith dependence edge collection EPDDGFor sky, traversal projection ReachingDefs (P1,σ)∩V(P2) In all variablees, if there is variable by movable σiDefinition, and movable σiThe not active junction point collection of dynamic dependency graph after yojan NPDDGIn, then by this activity σiAdd active junction point collection N toPDDGNeutralize in a storehouse traversalQueue;
If 2.4.2 storehouse traversalQueue is not empty, then in traversalQueue first activity is popped, if with This activity is that the dependence edge of terminal belongs to dependence edge collection EDDGBut it is not belonging to dependence edge collection EPDDG, add this dependence edge to dependence Limit collection EPDDGIn;If the starting point of this dependence edge is not at active junction point collection NPDDGIn, add this node to active junction point collection NPDDGIn, and add in storehouse traversalQueue;
2.4.3 repeat the above steps 2.4.1-2.4.2, until having traveled through projection ReachingDefs (P1,σ)∩V(P2All variablees in); And
2.4.4 the active junction point collection N obtained based on step 2.4.1 to 2.4.4PDDGWith dependence edge collection EPDDG, after building yojan Dynamic dependency graph PDDG.
Services Composition instance migration availability deciding method based on dynamic dependency graph the most according to claim 3, its feature It is, in described step 4, migrates the concrete of validity and judge to comprise the following steps:
The active junction point collection N of dynamic dependency graph PDDG after 4.1 traversal yojanPDDGIn all activities, if after yojan The dependence edge collection E of dynamic dependency graph PDDGPDDGIn, often there is dependence edge with node n as terminal, then node n In-degree indegree [n] adds 1, and wherein this indegree [n] represents the in-degree of node n, and initial value is 0;
If 4.2 node n in-degrees are 0, then add in set zeroIndegreeNodeSet, this set ZeroIndegreeNodeSet represents the node set that in-degree is 0, and initial value is
4.3 repeat above-mentioned 4.1 and 4.2, until having traveled through the active junction point collection N of dynamic dependency graph PDDGPDDGIn all activities;
If 4.4 set zeroIndegreeNodeSet are notDetect whether to there is an in-degree indegree [ni] be 0 activity niMeet (P2, SC)[ni>(P2,SC'), i.e. can be at the Services Composition P after evolution2Current state (P2, SCOccur under), if Do not exist, then the migration validity of Services Composition example is unsatisfactory for, wherein (P2,SC)[ni>(P2,SC') represent niCan be in process P2 SCPerform and along with n under stateiExecution P2Can be by state SCEnter new state SC’;
4.5 if there is movable ni, then by node niDelete from set zeroIndegreeNodeSet and add topological sorting ρ to In, update P simultaneously2Current state;
The dependence edge collection E of 4.6 traversal dynamic dependency graph PDDGPDDG, by all and node niAdjacent node in-degree subtracts 1;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet isNow if there is an active sequences Topological sorting ρ can be in Services Composition process P after evolution2Middle playback, then the migration validity of Services Composition example meets.
CN201310581404.XA 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph Active CN103606042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310581404.XA CN103606042B (en) 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310581404.XA CN103606042B (en) 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph

Publications (2)

Publication Number Publication Date
CN103606042A CN103606042A (en) 2014-02-26
CN103606042B true CN103606042B (en) 2016-08-17

Family

ID=50124262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310581404.XA Active CN103606042B (en) 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph

Country Status (1)

Country Link
CN (1) CN103606042B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10769113B2 (en) * 2016-03-25 2020-09-08 Microsoft Technology Licensing, Llc Attribute-based dependency identification for operation ordering
CN107038025B (en) * 2016-09-28 2020-04-07 阿里巴巴集团控股有限公司 SOA architecture-based system calling method and device
US10969929B2 (en) * 2018-10-19 2021-04-06 Oracle Financial Services Software Limited Dependency graph-controlled object and compute pipeline migration
CN115756929B (en) * 2022-11-23 2023-06-02 北京大学 Abnormal root cause positioning method and system based on dynamic service dependency graph

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325601A (en) * 2008-07-31 2008-12-17 南京大学 Method for choosing service based on quality dependency relationship under service composite surroundings
CN102255955A (en) * 2011-06-22 2011-11-23 浙江工商大学 Dynamic Web service combination method based on dependency relationship

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325601A (en) * 2008-07-31 2008-12-17 南京大学 Method for choosing service based on quality dependency relationship under service composite surroundings
CN102255955A (en) * 2011-06-22 2011-11-23 浙江工商大学 Dynamic Web service combination method based on dependency relationship

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Web服务组合动态演化的实例可迁移性;宋巍等;《计算机学报》;20090930;第32卷(第9期);第1817-1829页 *
一个带环检测的深度优先搜索拓扑排序算法;付勇;《电脑编程技巧与维护》;20130429(第4期);全文 *
广度优先遍历方式下拓扑排序算法的实现;刘海琴;《科技信息》;20070301(第7期);全文 *
面向方面程序的简化动态依赖图切片方法;张广泉等;《计算机科学与探索》;20110315(第3期);第230-235页 *

Also Published As

Publication number Publication date
CN103606042A (en) 2014-02-26

Similar Documents

Publication Publication Date Title
Ghamarian et al. Modelling and analysis using GROOVE
Orsini et al. Context-aware computation offloading for mobile cloud computing: Requirements analysis, survey and design guideline
CN103606042B (en) Services Composition instance migration availability deciding method based on dynamic dependency graph
Dräxler et al. Specification, composition, and placement of network services with flexible structures
CN110032597A (en) The visible processing method and device of application program operation behavior
Daszczuk Communication and resource deadlock analysis using IMDS formalism and model checking
Chan et al. Dynamic web service composition: A new approach in building reliable web service
Quesada et al. Using dominators for solving constrained path problems
CN112805984B (en) System for deploying incremental network updates
WO2019007403A1 (en) Service configuration-driven flow table method and device
US8966094B2 (en) Managing session data of a composite service session in a communication network
La et al. An efficiency-centric design methodology for mobile application architectures
Akbar et al. The importance of granularity in multiobjective optimization of mobile cloud hybrid applications
Theeten et al. Towards the optimization of a parallel streaming engine for telco applications
Schäfer et al. Increasing availability of workflows executing in a pervasive environment
Gafni et al. The weakest failure detector for solving k-set agreement
CN112817567A (en) Openwhisk no-service framework migration method for micro-service application
Zhu et al. Validation of pervasive cloud task migration with colored petri net
Klenik et al. Adding semantics to measurements: Ontology-guided, systematic performance analysis
CN113391795A (en) Method and system for realizing self-adaptive mapping of application scene and software development kit
Dizdarević et al. Enhancing Service Management Systems with Machine Learning in Fog-to-Cloud Networks
Qian et al. A dynamic service composition schema for pervasive computing
Gherari et al. A smart mobile cloud environment for modelling and simulation of mobile cloud applications
CN113760226B (en) Service construction method, device, electronic equipment and storage medium
Hendijani Fard Detecting and fixing emergent behaviors in distributed software systems using a message content independent method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant