<!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>Peer-to-Peer Execution of BPEL Processes</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Weihai Yu</string-name>
          <email>weihai@cs.uit.no</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science University of Tromsø</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <fpage>29</fpage>
      <lpage>32</lpage>
      <abstract>
        <p>This paper presents a peer-to-peer approach to execution of BPEL processes. It does not pre-allocate resources as in existing decentralized approaches. Nor does it involve global coordination for normal executions. The approach is of continuation-passing style, where continuations, or the reminder of executions, are passed along with messages for process execution. Two continuations are associated with an execution: a success continuation and a failure continuation. Recovery plans for processes are automatically generated at runtime and attached to failure continuations.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        WS-BEPL [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], or simply BPEL, is becoming a de-facto standard for services
composition based on the workflow technology. Using BPEL, a composite service is
a BPEL process that uses other services (processes) in some prescribed order. Today,
executions of BPEL processes are typically conducted by heavyweight central
engines. The cost of deploying a central engine is usually too high for a large number
of small businesses or end-users. Moreover, a central engine can become a potential
processing and communication bottleneck as well as a central point of failure [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Several decentralized or peer-to-peer approaches have been proposed
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][
        <xref ref-type="bibr" rid="ref4">4</xref>
        ][
        <xref ref-type="bibr" rid="ref5">5</xref>
        ][
        <xref ref-type="bibr" rid="ref6">6</xref>
        ][
        <xref ref-type="bibr" rid="ref7">7</xref>
        ][
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Common to most of these, a process is instantiated prior to its
execution. During instantiation, proper resources and control are pre-allocated in the
distributed environment. These approaches inevitably allocate resources even for the
parts that are not executed. They also tend to have limited adaptability at runtime due
to the complication of re-allocating the pre-allocated resources and control.
      </p>
      <p>Our peer-to-peer approach does not involve process instantiation before execution.
The approach is of continuation-passing style, which is a common practice in the
functional programming community. Basically, a continuation represents the rest of
an execution at a certain point of the execution. It is automatically derived during the
execution. By knowing the continuation of the current execution, the control can be
passed to the proper subsequent processing entities without the involvement of a
central engine. In addition, the approach supports automatic process recovery by
associating two continuations with any particular point of execution. The success
continuation represents the path of execution towards the successful completion of the
process. The failure continuation represents the path of execution towards the proper
compensation of committed effects after certain failure events.</p>
    </sec>
    <sec id="sec-2">
      <title>BPEL Processes</title>
      <p>In BPEL, processes and (composite) services are synonymous. A (sub-) process is an
activity, which has a hierarchical structure. Basic activities include empty activities,
activities for providing and invoking services, cast of fault events, etc. A structured
activity consists of a collection of activities to be executed in some prescribed order,
such as in sequence and in parallel.</p>
      <p>Activities run within scopes, which provide boundaries for fault handling and
recovery. A process instance runs within a top-level scope. A scope can be associated
with a number of activities, including a number of event handlers and fault handlers,
an optional compensation handler, and a primary activity that defines its normal
behavior. Within a scope, a fault can be thrown with a fault name. The fault will be
captured by the scope and handled with a corresponding fault handler. A fault handler
typically contains a compensation activity, which executes the compensation
operations currently installed within the scope.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Continuation-Passing Messaging for Process Execution</title>
      <p>Basically, a message tells a site what to do next. If a message also contains a
continuation, the site can figure out the execution plan that follows up. In our
approach, conducting the execution of a process is the sequences of sending and
interpreting messages that contain continuations.</p>
      <p>There are some specific issues to be addressed for peer-to-peer process execution
using continuations.
1. A partially executed process must be rolled back if some fault event occurs. To
enable process rollbacks, two continuations are associated with any particular
execution point. The success continuation represents the path of execution towards
the successful completion of the process. The failure continuation represents the
path of execution towards the proper compensation of committed effects after
certain failure events.
2. Some management tasks, such as proper handling of parallel branches and
termination of scopes, must be carried out by the proper sites at proper time. The
management tasks are defined as auxiliary activities that are automatically added
into continuations during execution.
3. Parallel branches must be kept track of in order to: (a) stop all branches of a scope
when the scope terminates, and (b) stop and rollback all branches of a scope in
case of some fault event. This is done with scope agents.</p>
      <p>More specifically, a message for process execution contains a control activity and two
continuations. The control activity is the activity to be executed immediately. It is
either a BPEL activity or an auxiliary activity. One of the two continuations, the
success or the failure continuation, is to be executed after the control activity. A
continuation is represented as a stack of activities.</p>
      <p>The local architecture at a site is shown in Figure 1. Requests for process
executions at the site are delivered to its message queue (1). A process interpreter is a
pool of threads that interpret the messages. A thread dequeues a message from the
message queue (2) and decides the next action according to the control activity of the
message. There are two possibilities here: either can the process move on with local
processing, or it is dependent on some other messages that are not available yet, such
as a provided service waiting for an incoming invoking message. In the former case,
the thread invokes (3, 4) some local programs, which might interact with human
users. In the latter case, the current message is put in the pending message pool (5).
This message will be used later (6) when a dependent message is available (2 again).
After the execution of local programs, new messages are either put in the pending
message pool (5) or sent to a remote site (7).</p>
      <p>from
network
message
queue
1
2</p>
      <p>7
process
interpreter
5
pending
message
pool
6
3</p>
      <p>4
8
9</p>
      <p>local
programs
scope
registry</p>
      <p>to
network</p>
      <p>If a site is also a scope agent, it maintains the scope state in the scope registry (8,
9). Basically, the scope state contains the current locations of all active parallel
branches. The location of a branch changes when a message is sent. To keep this
location state up to date, when a site sends a message (7), it also notifies the
management agent of the immediate enclosing scope. To terminate a scope, the scope
agent asks all registered sites to stop and clear up the corresponding local activities.
To rollback a scope, all these sties run the respective parts of failure continuations.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Discussions and Related Work</title>
      <p>
        One important property of our approach is that the next step a site should take is only
dependent on local information. No global coordination is needed. Moreover,
housekeeping of runtime states is limited within scopes. This inherently addresses the
scalability and reliability problems of centralized approaches [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Another important property of our approach is that it allows for dynamic
invocation of services and just-in-time distribution of resources. That is, the resources
can be allocated when the services are to be executed. This is contrary to most other
decentralized approaches [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][
        <xref ref-type="bibr" rid="ref4">4</xref>
        ][
        <xref ref-type="bibr" rid="ref5">5</xref>
        ][
        <xref ref-type="bibr" rid="ref6">6</xref>
        ][
        <xref ref-type="bibr" rid="ref7">7</xref>
        ][
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] where resources for the entire process are
pre-allocated during process instantiation a prior to their executions. INCA [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] goes a
step further than most of the decentralized approaches. A message (called information
carrier, INCA) contains a log of the execution so far and rules for further enactment.
The rules and the log thus play the roles similar to success and failure continuations of
our approach. INCA does not totally eliminate pre-allocation of resources: workflows
are enacted using both rules carried in messages and pre-installed local rules.
      </p>
      <p>
        This paper extends our earlier work [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] by dealing with features specific to BPEL
processes, including dependencies between parallel branches and scope management.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>Our contribution is a new peer-to-peer approach to execution of BPEL processes. The
continuation-passing style of the approach makes the conduction of process execution
as local operations rather than global coordination. As a distinct feature, it does not
unnecessarily pre-allocate resources prior to process executions. Furthermore, it
supports process recovery by automatically generating recovery plans into failure
continuations. The approach is supported by a working prototype.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Alonso</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>El Abbadi</surname>
          </string-name>
          , C. Mohan, “
          <article-title>Functionality and Limitations of Current Workflow Management Systems”</article-title>
          ,
          <source>IEEE Expert 12(5)</source>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Barbara</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mehrotra</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Rusinkiewicz</surname>
          </string-name>
          , “
          <article-title>INCAs: Managing Dynamic Workflows in Distributed Environments”</article-title>
          ,
          <source>Journal of Database Management</source>
          , Special Issues on Multidadatabases,
          <volume>7</volume>
          (
          <issue>1</issue>
          ),
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Benatallah</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dumas</surname>
          </string-name>
          and
          <string-name>
            <given-names>Q. Z.</given-names>
            <surname>Sheng</surname>
          </string-name>
          , “
          <article-title>Facilitating the Rapid Development and Scalable Orchestration of Composite Web Services”</article-title>
          ,
          <source>Distributed and Parallel Databases</source>
          ,
          <volume>17</volume>
          (
          <issue>1</issue>
          ), pp
          <fpage>5</fpage>
          -
          <lpage>37</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Chafle</surname>
            , G.,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Chandra</surname>
            and
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Mann</surname>
          </string-name>
          , “Decentralized Orchestration of Composite Web Services”,
          <source>13th international World Wide Web conference (Alternate track papers &amp; posters)</source>
          , pp
          <fpage>134</fpage>
          -
          <lpage>143</lpage>
          , May,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Gokkoca</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Altinel</surname>
          </string-name>
          , I. Cingil,
          <string-name>
            <given-names>N.</given-names>
            <surname>Tatbul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Koksal</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Dogac</surname>
          </string-name>
          , “
          <article-title>Design and Implementation of a Distributed Workflow Enactment Service”</article-title>
          ,
          <source>2nd IFCIS International Conference on Cooperative Information Systems (CoopIS 97)</source>
          , pp.
          <fpage>89</fpage>
          -
          <lpage>98</lpage>
          , June,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Marazakis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Papadakis</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Nikolaou</surname>
          </string-name>
          , “
          <article-title>Aurora: An Architecture for Dynamic and Adaptive Work Sessions in Open Environments”</article-title>
          ,
          <source>9th International Conference on Database and Expert Systems Applications (DEXA 98)</source>
          , pp.
          <fpage>480</fpage>
          -
          <lpage>491</lpage>
          , LNCS 1460 Springer-Verlag,
          <year>August</year>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Muth</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wodtke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Weißenfels</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Dittrich</surname>
          </string-name>
          and G. Weikum, “
          <article-title>From Centralized Workflow Specification to Distributed Workflow Execution”</article-title>
          ,
          <source>Journal of Intelligent Information Systems</source>
          ,
          <volume>10</volume>
          (
          <issue>2</issue>
          ), pp
          <fpage>159</fpage>
          -
          <lpage>184</lpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>WS-BPEL</surname>
          </string-name>
          ,
          <source>Web Services Business Process Execution Language Version</source>
          <volume>2</volume>
          .0, public review draft, QISIS Open http://docs.oasis-open.
          <source>org/wsbpel/2</source>
          .0/wsbpelspecification-draft.
          <source>pdf, August</source>
          <volume>23</volume>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Yan</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yang</surname>
          </string-name>
          , and G. Raikundalia, “
          <article-title>Enacting Business processes in a Decentralised Environment with p2p-Based Workflow Support”</article-title>
          ,
          <source>4th International Conference on Web-Age Information Management (WAIM 03)</source>
          ,
          <source>LNCS 2762</source>
          , pp
          <fpage>290</fpage>
          -
          <lpage>297</lpage>
          , Springer-Verlag,
          <year>September</year>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Yang</surname>
          </string-name>
          , “
          <article-title>Continuation-Passing Enactment of Distributed Recoverable Workflows”</article-title>
          ,
          <source>22nd Annual ACM Symposium on Applied Computing (SAC</source>
          <year>2007</year>
          ), Seoul, Korea, March
          <volume>11</volume>
          - 15,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>