<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Timed Transition Discovery from Conversation Logs Web Service</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Didier Devaurs</string-name>
          <email>ddevaurs@uwindsor.ca</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kreshnik Musaraj</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabien De Marchi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mohand-Sad Hacid</string-name>
          <email>mohand-said.hacidg@liris.cnrs.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universite Claude Bernard Lyon 1, LIRIS, UMR CNRS 5205</institution>
          ,
          <addr-line>Villeurbanne</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Windsor, School of Computer Science</institution>
          ,
          <addr-line>Windsor, Ontario</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <fpage>53</fpage>
      <lpage>56</lpage>
      <abstract>
        <p>Despite their importance, Web service business protocols are not always published with service interfaces, which hinders automatic management. A solution is to extract them from past executions. One of the raised issues is the discovery of temporal constraints called timed transitions, which are not explicitly recorded. In this paper we present our approach for discovering such transitions. We de ne a class of patterns called proper timeouts which are equivalent to timed transitions, and present a polynomial algorithm for extracting these patterns.3</p>
      </abstract>
      <kwd-group>
        <kwd>Web service</kwd>
        <kwd>business protocol</kwd>
        <kwd>knowledge extraction</kwd>
        <kwd>temporal constraint</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        A very important ambition associated with Web services relates to
looselycoupled integration, which is already partially carried out by the fact that
services use widespread standards. A good exibility is possible only if users know
how to interact with a service. This requires to associate with services elaborate
descriptions (such as WSDL) enabling a good understanding of their execution
semantics. However descriptions like WSDL are not su cient for a sophisticated
and automatic use of services because they provide only static properties [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This
is what motivated authors in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to de ne a higher level model, the so-called
business protocol, which speci es the conversations supported by a service, i.e. all
valid sequences of message exchanges. It is formalized by a deterministic
nitestate machine, where states represent the various service phases; transitions are
triggered when the service sends or receives messages. A timed business protocol
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is an enhanced version of the basic model allowing for the de nition of timed
transitions, which are not related to the emission of explicit messages but to
temporal constraints (validity period, expiration date, etc); they are triggered
automatically after a time interval is elapsed or after some date is reached.
3 This work is partially funded by the ANR project Service Mozac (2007{2009,
JCJC06 134393) and by the EU Framework 7 STREP project COMPAS (215175,
FP7-ICT-2007-1).
      </p>
      <p>
        Business protocols o er automatic reasoning mechanisms with many
applications, such as correctness veri cation, compatibility testing, etc. However they
are not often speci ed in real life services. Potential reasons include lack of
time during implementation or uncontrolled evolution. A solution is then to
infer this protocol from the conversation logs of a service. Direct applications
are re-engineering issues, such as implementation correctness checking or service
evolution. Once automated this extraction process could be applied in service
discovery architectures [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for automatic service composition or replacement.
      </p>
      <p>
        Discovering service protocols includes many technical challenges: cleaning
logs from \noise", identifying the di erent conversations, de ning assessable
models, developing re ning tools for an interactive extraction, etc. The rst
contribution to this problem has been proposed in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], but relates only to
untimed business protocols. With the importance of temporal aspects in real life
services it becomes crucial to extend this work to timed business protocols, which
contain both explicit and timed transitions.
      </p>
      <p>
        This paper presents our approach for extracting timed transitions from
conversation logs.4 We de ne a class of patterns called proper timeouts which reveal
the presence of timed transitions in the protocol. We propose a characterization
of the set of proper timeouts satis ed by the logs, which leads to a polynomial
extraction algorithm. This work is an extension of [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and both take part in
ServiceMosaic international project (http://servicemosaic.isima.fr) which aims at
developing a platform for modeling, analysing and managing Web services [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Associating Patterns with Timed Transitions</title>
      <p>We de ne an episode as a sequence of two message names. Given an episode
= hm; m0i, an occurrence of is a sequence of two consecutive occurrences
of m and m0 in the logs. The occurrence duration of an episode occurrence is
the di erence between the message timestamps. The minimal (respect. maximal)
occurrence duration of an episode is the smallest (respect. greatest) occurrence
duration of all its occurrences. The occurrence duration interval (ODI) of
an episode is the interval which includes all its occurrence durations. The
minimal (respect. maximal) occurrence duration of a set of episodes is the minimum
(respect. maximum) of all the minimal (respect. maximal) occurrence durations
of these episodes. The occurrence duration interval (ODI) of a set of episodes
is the interval which includes all the occurrence durations of these episodes. For
each message m, we denote by Pm the set of episodes whose rst message is m.</p>
      <p>
        Given two sets of episodes A and B, we say that A precedes B (denoted by
A B) if ODI(A) is before ODI(B).5 We say that A and B are not comparable
(denoted by A k B) if A B and B A. Given A; B Pm, we show that:
if there exists a timed transition between the state from which the transitions
corresponding to the elements of A are going out, and the one from which the
4 Technical results are presented in an extended version of this paper [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
5 is a strict order relation on sets of episodes.
transitions corresponding to the elements of B are going out, then A
B.
      </p>
      <p>We de ne a proper timeout as a triplet P T (m; A; B), where m is a message
and A; B Pm. We say that logs L satisfy the proper timeout P T (m; A; B),
which is denoted by L P T (m; A; B), if:
8 A
&lt;</p>
      <p>B
8 2 Pm n (A [ B); f g , A [ B
: 8 Z 2 fA; Bg; 8 X; Y Z (X; Y 6= ); (X [ Y = Z) ) (X
Y ) :
(1)</p>
      <p>Given a message m and A; B Pm, we show that: if there exists a timed
transition in the protocol, between two states s1 and s2 such that the sets of
transitions going out of s1 and s2 respectively are in bijection with A and B,
then there exist A0 A and B0 B such that L P T (m; A0; B0). Since each
timed transition involves the satisfaction of a proper timeout, we can nd all
of them. However we can discover more proper timeouts than there are timed
transitions, if some messages always take longer to be sent or received than
messages associated with other transitions of the same state. Thus we will say that:
a satis ed proper timeout reveals the presence of a potential timed transition.</p>
      <p>We show that: for practical purposes, proper timeouts are the best possible
representations of timed transitions. That justi es the relevance of the
development of a timed transition discovery method based on the research of the proper
timeouts satis ed by the logs.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Extracting the Proper Timeouts</title>
      <p>The complexity of a basic \generate and test" method for extracting proper
timeouts is exponential. Instead, we propose a nice characterization of the set of
satis ed proper timeouts, which leads to a polynomial algorithm. This
characterization, formalized by Theorem 1, states that: the proper timeouts satis ed
by the logs and related to message m are exactly given by the pairs of
consecutive elements of the partition of Pm satisfying (2). Thus, partitioning all sets
Pm gives us all the proper timeouts satis ed by the logs.</p>
      <p>Theorem 1. Consider a mesage m, im 2 IN , and fP m(1); P m(2); : : : ; P m(im)g a
partition of Pm. The following assertions are equivalent:</p>
      <p>P m(2)
: : :</p>
      <p>P m(im)
i
im; 8 X; Y</p>
      <p>P m(i) (X; Y 6= ); (X [ Y = P m(i)) ) (X
Y ) :
( P m(1)</p>
      <p>We propose a polynomial algorithm, called partitionPm, for constructing this
partition in an incremental way. The input of algorithm partitionPm comprises
a message m, the set Pm, and the ODIs of all episodes in Pm. The output is
the partition of Pm satisfying (2). is constructed by inserting one by one
the elements of Pm in such a way that (2) is satis ed at each step. In order
to describe the general step of the algorithm, let us consider that is already
partly constructed. Let be an episode of Pm not yet considered. A single pass
is made over the partition to determine (i) whether the ODIs of some elements
of overlap ODI( ), and (ii) between which sets of is situated according
to . If there is no overlap, a new set containing is created and inserted into
the partition in compliance with . If the overlap takes place with only one
element of , is simply inserted in this set. If the overlap occurs between
and several parts of , they are necessarily consecutive according to ; as such
they are merged and is inserted into the resulting set. As for each episode
2 Pm only one pass is made over the partition, the complexity is O(jPmj2).</p>
      <p>The global method for extracting all the proper timeouts satis ed by the logs
is divided in two steps. The rst one is a preprocessing of the data, performed
in order to obtain the set of messages, the set of episodes, and the ODIs of
all episodes. A single pass is made over the logs, during which the occurrence
duration of each sequence of two consecutive messages is calculated. The second
step consists in constructing all sets Pm, and running algorithm partitionPm for
each of them. The logs' size being far greater than the number of episodes, the
rst step is the most costly in term of running time. Thus the complexity of the
global algorithm is O(jLj).</p>
      <p>We have implemented our discovery process to test its scalability. In order
to easily have a big amount of data, we have also implemented a log generator
which creates conversation logs from a given business protocol by mimicking
the behaviour of a service. Results of our experiments con rm the complexity
results we have established formally. The nal test will be to run our algorithm
on real-life data in further experiments.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Benatallah</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Casati</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toumani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Representing, analysing and managing web service protocols</article-title>
          .
          <source>Data &amp; Knowledge Engineering</source>
          <volume>58</volume>
          (
          <issue>3</issue>
          ) (
          <year>2006</year>
          )
          <volume>327</volume>
          {
          <fpage>357</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ponge</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Benatallah</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Casati</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toumani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Fine-grained compatibility and replaceability analysis of timed web service protocols</article-title>
          . In: ER '
          <fpage>07</fpage>
          . (
          <year>2007</year>
          )
          <volume>599</volume>
          {
          <fpage>614</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Denaro</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pezze</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tosi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schilling</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Towards self-adaptive service-oriented architectures</article-title>
          .
          <source>In: TAV-WEB '06</source>
          ,
          <string-name>
            <surname>Portland</surname>
          </string-name>
          , Maine, USA, ACM (
          <year>2006</year>
          )
          <volume>10</volume>
          {
          <fpage>16</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Motahari</given-names>
            <surname>Nezhad</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.R.</surname>
          </string-name>
          , Saint-Paul,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Benatallah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Casati</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          :
          <article-title>Protocol discovery from imperfect service interaction logs</article-title>
          . In: ICDE '
          <fpage>07</fpage>
          . (
          <year>2007</year>
          )
          <volume>1405</volume>
          {
          <fpage>1409</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Devaurs</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Musaraj</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Marchi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hacid</surname>
            ,
            <given-names>M.S.:</given-names>
          </string-name>
          <article-title>Timed transition discovery from web service conversation logs (extended version)</article-title>
          .
          <source>Technical Report RR-LIRIS2008-007, LIRIS UMR 5205 CNRS/Universite Claude Bernard Lyon</source>
          <volume>1</volume>
          ,
          <string-name>
            <surname>Villeurbanne</surname>
          </string-name>
          , France (
          <year>2008</year>
          ) http://liris.cnrs.fr/publis/?id=
          <fpage>3369</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Benatallah</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Casati</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toumani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ponge</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Motahari</given-names>
            <surname>Nezhad</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.R.</surname>
          </string-name>
          :
          <article-title>Service mosaic: A model-driven framework for web services life-cycle management</article-title>
          .
          <source>IEEE Internet Computing</source>
          <volume>10</volume>
          (
          <issue>4</issue>
          ) (
          <year>2006</year>
          )
          <volume>55</volume>
          {
          <fpage>63</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>