Information Technology Reference
In-Depth Information
Next, the composition representation that resulted from the clear services (algo-
rithm
Basic
) is simplified by the algorithm
Join
(Algorithm 3). The main function of
this algorithm is to replace the
split
controls with
split-join
, wherever this is possible.
In every step, two parameters of the functional representation are examined for the
existence of a common part. If one such part is found, it is removed from both the
parameters and the results are added to a new
split-join
relationship. Finally, a new
sequence
control is created, the
split-join
is added as the first parameter and the
common part is added as a second parameter.
Algorithm 3 (Join):
Replaces split with split-join where
possible in a composite service
Inputs
: C=f(a
0
,a
1
,…,a
n
), a composite service with sequence
and split constructs
Output
: C, a composite service with sequence, split and
split-join constructs
do
for each (a
i
,a
j
): i,j in [0,n]
Set L(a
i
,a
j
) = 0
if a
i
= a
i
'
∪
k, a
j
= a
j
'
∪
k then
L(a
i
,a
j
) = |k|
arg
max(
j
i
a
a
(
,
a
))
=
(
a
,
a
)
i
j
x
y
(
,
)
L
xy
= max(L
ij
)
if L
xy
> 0 then
Let f
ax
(a
x0
,a
x1
,...,a
xn
) the
construct containing k in a
x
Let f
ay
(a
y0
,a
y1
,...,a
yn
) the
construct containing k in a
y
k
1
=k
2
=k
if f
ax
= split then
k
1
= f
ax
(a
x0
,a
x1
,...,a
xn
)
if f
ay
= split then
k
2
= f
ay
(a
y0
,a
y1
,...,a
yn
)
C= C-{a
x
,a
y
}
C=C
∪
seq(s+j(a
x
',a
y
'),s(k
1
,k
2
))
while L
xy
> 0
return C
For each pair (
a
i
,
a
j
) of parameters, the size of their common part is stored in the
structure
L
(
a
i
,
a
j
). The size of
x
is expressed as |
x
| and refers to the number of simple
web services that take part in the functional representation of
x
. When all the pairs are
traversed, the one with the largest common part is selected, that is the pair (
a
x
,
a
y
). If
the size is a positive number, then the next step checks whether the common part is in
a
split
control in the two parameters of the selected pair. If so, the
split
expression
must not be divided instead it should be completely removed.
Since this procedure is performed twice, once for every parameter of the couple,
the results are two new common parts that should be removed respectively from the
parameters. This is realized in parameters
a
x
'
and
a
y
'
. The resulting expressions are
added as members of the
split-join
control, symbolized as '
s+j
', which in turn is
added as a parameter of the sequence control. Then, the common parts are combined
in a
split
control, symbolized as '
s
' and the result becomes the second parameter of
the
sequence
control. Finally, this new
sequence
representation replaces the two