• Tidak ada hasil yang ditemukan

NOTATIONS

5.3 Query processing: construction of composition search tree (CST)tree (CST)

5.3.2 Process of CST Construction

In order to visualize the composition process and to find possible compositions that satisfy a given user query we propose to construct a composition search tree. Every node of thecomposition search treestores the web service(or set of web services) that satisfies desired output parameters of its parent node (W S), number of web services used for composition(N W S) and set of additional input parameters required by the web service(or set of web services) (DO). Each node in thecomposition search treehas utmost 3 child nodes, aleft child node representingexact composition, a middle child noderepresentingsuper compositionand aright child noderepresentingcollaborative composition.

The structure of a node incomposition search treeis given by Backus Naur Form(BNF) in Fig 5.2.The abbreviations used in BNF are described in Table 5.2.

Thecomposition search treehas 4 types of nodes as described below -

1. Root node: A CST node from where the composition process begins, having the

Abbreviation Description

WS web Service/Set of web services participating in composition.

NWS Number of web services used in composition DO Desired set of output parameters.

Table 5.2: Abbreviations used in BNF

Figure 5.2: BNF of a CST Node

• hW Si=∅

• hN W Si= 0

• hDOi=QO

• hCompositionT ypei=N IL

• hP arentN odei=N U LL

2. Internal node: A CST node that represents a composition (exact, super or collab- orative) satisfyingDOof its parent node. Every internal node of thecomposition search treehas utmost 3child nodes, aleft child noderepresentingexact compo- sition(EC), amiddle child noderepresentingsuper composition(SC) and a right

child node representingcollaborative composition(CC). Although there may be many compositions in each type : exact, super and collaborative, that satisfyDO of the parent node, we propose to select one in each type that best matches the requirement using the service selection method described earlier in section5.2, for every internal node and hence limit the number of children to three. Note that theroot nodeis also an internal node with special properties as explained before.

3. Unsolvable node : It is a leaf node that cannot be solved further, since DO of such a node does not have matching services in the service registry. These type of nodes have the following special properties -

• hCompositionT ypei=hExacti|hSuperi|hCollaborativei

• hDOi={parameterSymbol}

• hLef tChildi=N U LL

• hM iddleChildi=N U LL

• hRightChildi=N U LL

4. Solution node : A leaf node that need not be solved further sinceDO of such a node is∅. These type of nodes represent compositions solving the given user query and have the following special properties -

• hCompositionT ypei=hExacti|hSuperi|hCollaborativei

• hDOi=∅

• hLef tChildi=N U LL

• hM iddleChildi=N U LL

• hRightChildi=N U LL.

The following terminologies are used forcomposition search treeconstruction:

• Live node: A node that is unsolved. These are the nodes for which compositions

• Current node: A node that is currently being solved.

• Solution node: A node that represents the solution.

• Unsolvable node: A node that cannot be solved further.

• LivenodesQ: A Queue to store the live nodes.

• Solutions: An array that stores all theSolution Nodes.

The process for tree construction is given below :

1. Create aroot nodethat has desired output parameters equal to the output param- eters specified in the query, i.eDO =QO , initialize the number of web services used in composition,N W S, to0and set of web services participating in compo- sition as empty set,W S =∅.

2. Inserttheroot nodetoLivenodesQ.

3. Deletealive nodefromLivenodesQand set it as thecurrent node.

4. From the covering clusters (obtained by clustering services on frequent output parameter pattern as discussed earlier in chapter 4) find services that match with DOof thecurrent node.

5. Classify these services according to their match type: exact, partial and super ( as discussed in chapter 3).

6. Find different compositions that satisfy DO from these services based on their type of composability as -

(a) If there exists a exact matching servicewsforDOin service repository, then create aleft child node for thecurrent node, storewsand updateN W S as N W S=N W S+1. If there are many exact matching services, then the best matching service is chosen using the service selection approach discussed

in section5.2.2.2. Calculate the additional input parameters required, to exe- cutews, asRIEC =wsI−QI, wherewsIis input parameters of web service ws. RIECis the new set of desired output parameters that need to be satisfied, i.e.,DO = RIEC. IfDO 6= ∅ thenInsert theleft child nodeto LivenodesQ, otherwise mark theleft child nodeassolution nodeandInserta copy of the node toSolutions. Make theleft child nodepoint to itsparent node.

(b) If there exists a super matching servicewsforDOin service repository, then create amiddle child node forcurrent node, storewsand updateN W S as N W S = N W S+ 1. If there are many super matching services, then the best matching service is chosen using the service selection approach dis- cussed in section5.2.2.2. Calculate the additional input parameters required, to executews, asRIRC =wsI−QI, wherewsI is input parameters of web servicews. RISC is the new set of desired output parameters that need to be satisfied, i.e.,DO = RIRC. IfDO 6= ∅thenInsert themiddle child node toLivenodesQ, otherwise mark themiddle child nodeassolution nodeand Inserta copy of the node toSolutions. Make themiddle child nodepoint to itsparent node.

(c) Among services that have partial match withDO, search for a set of services that can collaboratively satisfyDO. If such a set, W S, is available, create a right child node for the current node, store W S and update N W S as N W S=N W S+|W S|. Calculate the additional input parameters required, if any, to execute the services inW S, asRCCI =W SI−QI−W SFOwhere W SI is collective input parameters required by the set W S, i.e , W SI = wsI1∪wsI2∪....∪wsIn andW SF is a set of services such thatW SF ⊆ W S, W SF ={ws1, ws2, ..} |∀wsj ∈W SF, wsOj ⊆QI. RICC is the new set of desired output parameters that need to be satisfied, i.e., DO = RICC. If DO 6=∅then insert theright child nodetoLivenodesQ, otherwise mark the right child nodeassolution nodeandInserta copy of the node toSolutions.

Make theright child nodepoint to itsparent node.

(d) If DO cannot be satisfied by any of the above 3 cases then mark current nodeasunsolvable node.

7. Deletealive nodefromLivenodesQand set it as thecurrent node.

8. From theservice clustersfind services that match withDOof thecurrent node.

9. Repeat steps 5 to 8 until theLivenodesQbecomes empty.