<!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>Petri Net Sagas</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>University of Hamburg</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Faculty of Mathematics</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Informatics</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Natural Sciences</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Informatics</institution>
        </aff>
      </contrib-group>
      <fpage>65</fpage>
      <lpage>84</lpage>
      <abstract>
        <p>This paper introduces an integration of the Saga pattern for eventual data consistency in microservice deployments with concurrency supplied by labeled P/T work ow nets. Main bene ts are improved speeds due to parallelization and providing methods of veri cation on successful runs due to the well-studied underlying formalism of Petri nets. The Saga pattern o ers an availability-oriented alternative to classic distributed transaction and locking mechanisms. Use cases are large systems, that use the shared-nothing data model, which is typically fullled by microservice applications. Sagas are traditionally de ned by a sequence of local transactions, but often concurrency between transactions is possible. This paper presents a solution to model concurrent Sagas with P/T work ow nets, called Petri net Sagas. As a proof-ofconcept an implementation shows, how to translate Petri net Sagas to reference nets and to execute them using the Renew simulation core. The implementation is available as a library for the Java programming language.</p>
      </abstract>
      <kwd-group>
        <kwd>Data consistency</kwd>
        <kwd>Microservices</kwd>
        <kwd>P/T nets</kwd>
        <kwd>High-level Petri nets</kwd>
        <kwd>Work ow nets</kwd>
        <kwd>Saga pattern</kwd>
        <kwd>Shared-nothing data model</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The development of large-scale systems went through large changes of paradigms
throughout the last decade. From the deployment of large monolithic
applications on a bare-metal server the architectural design of applications was heavily
in uenced by cloud technology, which was commercialized in the 2010s. One of
these architectural design shifts introduced the heavy use of the microservice
pattern. For an extended introduction see e.g. [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. It evolved from "service-oriented
architectures" (SOA) and is rooted in web technologies.
      </p>
      <p>Microservices decompose an application into small and independent parts,
which are usually managed by separate development teams each. A lot of
bene ts can be reaped by utilizing microservices, e.g. scaling up the overall
development workforce more easily. With the higher exibility, new drawbacks are
Copyright © 2021 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
introduced though. Microservice architectures usually use a shared-nothing data
model, meaning that every service features its own data model and database and
redundancy of data is inevitable.</p>
      <p>
        Microservice applications may span over hundreds or more individual
services. Therefore traditional database consistency technologies like distributed
commits, that utilize locking and focus on providing consistency over
availability, might not be feasible in this architecture anymore. This is due to frequent
and complex queries and an increased chance of node failure due to the higher
count of components in the system. According to the CAP-theorem [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] both,
consistency and availability cannot be provided at the same time, when the
network encounters partitioning or - more generally speaking - experiences node
or link failures. Being far ahead of its time back then, the Saga pattern was
introduced in the late 80s [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. It is a protocol designed to be used instead of
distributed transactions and features availability over consistency and promotes
eventual consistency. Multiple local transactions are incorporated into a large
so-called Saga spanning multiple services, hence the name. It ensures atomicity,
consistency, and durability (ACD) but leaves the isolation up to the developer
and the application level. With the rise of microservices, the Saga pattern found
its revival rather recently [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
      </p>
      <p>
        The Saga pattern is usually implemented using state machines in mind, de
ning a process step by step. Possible concurrency is not utilized and therefore the
approach misses out on the potential for speed-ups. Only very few approaches
exist, that apply parallelism to the Saga pattern, like e.g. [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] in the context of
and limited to the process calculus SOCK. Therefore the presented paper
provides a solid base for concurrency in Saga pattern applications in the shape of
Petri nets: Petri net Sagas. A general discussion on the approach is given as well
as the description of a proof-of-concept implementation of the results.
      </p>
      <p>
        Petri net Sagas are simple (labeled) P/T (work ow-)nets, that need to be
provided by the developer specifying the Saga. In our underlying proof-of-concept
implementation, the Petri net Saga is translated into a reference net [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], a
highlevel Petri net formalism with similarities to object-oriented programming. They
then can be run by the Renew simulator [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] inside a library transparent to the
developer.
      </p>
      <p>Our main contributions within this paper are the easy to use de nition of
Petri net Sagas along with the translation mechanics to Reference nets for
failure aware, concurrent, and transparent execution of Petri net Sagas. We thereby
aid the development of Saga based consistency implementations by providing
a mean to use a graphical representation of a Saga in the shape of a
workow net. The method also alleviates the complexity of implementing concurrent
steps by hand within a Saga, especially in the Java programming language, as
our proof-of-concept implementation is also Java-based. Java is one of the main
programming languages in microservice environments after web technology
languages like JavaScript1.
1 see e.g. https://tsh.io/state-of-microservices/#programming-languages</p>
    </sec>
    <sec id="sec-2">
      <title>Motivation and Goals</title>
      <p>Integrating services and providing eventual data consistency across multiple
heterogeneous services can be a daunting task to achieve. Introducing additional
concurrency usually increases the complexity even further. Therefore relying on
a well-researched Petri Net formalism can help to design e cient and responsive
microservice applications.</p>
      <p>While simple Sagas can be described easier with less complex formalisms,
Petri nets o er the possibility to describe more sophisticated procedures and
by that are more future proof for further research. An additional motivation
is the possibility to use model checking methods on Petri nets. Veri cation is
only sparsely discussed in the context of the Saga pattern on some websites and
online forums. There are to our best knowledge no citable sources related to
Saga pattern veri cation.</p>
      <p>The data, that is required by di erent services and might be required to be
passed along is also not explicitly addressed by the Saga pattern. Using Petri
nets as a base enables the notion of places and markings to model this kind of
relations.</p>
      <p>In summary, the goals of this paper are to provide a Petri net-based
extension to the Saga pattern. This is done to enable concurrency and data allocation
directly in the persistence model as well as providing ways to run formal veri
cations on the persistence operation more easily.
1.2</p>
    </sec>
    <sec id="sec-3">
      <title>Example</title>
      <p>To follow along the ideas presented in this contribution an example will be
helpful. The example will focus on an large online book store, that is realized as a
microservice application. Seven departments are considered: Order management,
an inventory control system, pricing, a payment provider, accounting, ful llment
and nally customer noti cations. Each department features an own system,
with own data models and databases. The processing of purchases and by that
interaction of the department systems is orchestrated by a classic sequential
Saga, that will be described later in more detail.
2</p>
      <sec id="sec-3-1">
        <title>Basics</title>
        <p>The required basics for the addressed context are described brie y. The core
aspects in the shape of microservices and the Saga pattern itself are introduced.
This section also contains a basic introduction to reference nets, as they are a
less generally known formalism of high-level Petri nets and di er in quite some
aspects from other formalisms.
2.1</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Microservices</title>
      <p>The term microservice is not globally uniquely de ned. As it, therefore, leaves
room for interpretation, this section explains microservices as they are
understood in the context of this paper. A microservice architecture consists of loosely
coupled components and follows the Unix philosophy to "make each program do
one thing well". They require additional infrastructure components and severely
increase the overall complexity of the system. Individual microservices are small2
and rather easy to maintain and are usually tied to one speci c development
team. However, microservices are no silver bullet and their use should always be
considered thoroughly beforehand.</p>
      <p>
        Microservices use a shared-nothing data model, meaning every microservice
manages its very own database. Multiple data models, as well as database
technologies, can coexist in microservice deployments. Despite this freedom, eventual
consistency must be guaranteed for the overall system to achieve meaningful
results. Technologies like e.g. X/OPEN DTP (e.g. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]) or other distributed
transaction and locking mechanisms can slow down the system substantially as well
as introduce deadlocks. The increased number of associated nodes in a
microservice deployment increases the overall risk of failures in the system. Using locking
mechanisms spanning multiple nodes may induce large downtimes upon failure
of a single node.
      </p>
      <p>This is usually tackled by relying on availability-oriented methods like the
here discussed Saga pattern for data consistency.
2.2</p>
    </sec>
    <sec id="sec-5">
      <title>Sagas</title>
      <p>
        A Saga [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] is a set of node-local transactions alongside an order in which to
invoke them. A Saga also requires the transactions to be of one of three
speci c types: Repeatable transactions, reversible transactions, and one so-called
pivot -transaction. All reversible transactions need to precede the
pivot-transaction, while all repeatable ones need to follow the pivot-transaction. The
pivottransaction may either succeed or fail and decides, whether the reversible
transactions need to be reversed or the repeatable transactions are called. Sagas are
thereby always cut into three distinct parts consisting only of the aforementioned
transaction types each.
      </p>
      <p>Example: Online book store For a more real-world view the earlier
introduced example is considered. The scenario involves a customer, who orders a
book and pays using a credit card. When the customer clicks an "order now"
button in the interface, rst an order id is generated and saved by the order
service ( rst transaction). The book then needs to be reserved in the system
managing available supplies with the order id (second transaction) and the
current price needs to be fetched for payment processing (third transaction). After
that, the credit card needs to be charged the amount required to pay for the
book and shipping by an external payment provider (fourth transaction). After
successful payment, the order gets transferred to the accounting system to be
archived ( fth transaction) and to a ful llment service to enqueue the shipping
2 There is no explicit size requirement. However, due to the limit to one functionality,
microservices tend to be much smaller in size than multi-purpose or monolithic
applications.
process (sixth transaction). Finally, the user receives a receipt via e-mail by the
noti cation service (seventh transaction).</p>
      <p>A Saga de nes the steps from the rst to the seventh transaction. Observe,
that transactions one, two, and three are all reversible, as an order id may be
deleted again and an item reservation may be canceled to make it available again.
Reversing a credit card charge by the external payment provider is not that easy,
hence it is considered the pivot-transaction in this case. It decides, whether the
whole Saga fails or succeeds. Transaction ve to seven are all repeatable and have
no non-technical reasons to fail. Upon technical failures, e.g. if the respective
service is unresponsive, it will be repeated until it succeeds. The whole example
is also shown as a linear P/T net in gure 1. Note, that the syntax for describing
the services and commands, separated with a double colon ("::"), is not speci c
to general Sagas, but used later in the here contributed Petri net Sagas and is
already used here as well for consistency reasons.</p>
      <p>Even in this small example, possible concurrency can easily be spotted. For
example (if this is within the corporate guidelines) the user might get a receipt
e-mail independent of the enqueueing of the shipping process or accounting and
ful llment might be noti ed at the same time. Also, the current price can be
fetched regardless of the progress in generating an order ID and reserving the
item, to name some possibilities. This example will be shown again later within
the paper with applied concurrency.</p>
      <p>
        Execution of a Saga There are two major approaches on how to implement
the execution of Sagas. The related literature (e.g. [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]) describes them as
"orchestration" and "choreography", which are terms also used for similar concepts
in other microservice related research subjects.
      </p>
      <p>Choreography is a classic fully decentralized approach, where each service
only knows whom to contact next to proceed with a speci c Saga. Because
services proactively call subsequent services the overall system is coupled more
tightly. This also complicates changes to the Saga and deployments.</p>
      <p>
        Orchestration in contrast relies on a centralized coordinator, that holds all
knowledge over the entire Saga process and the network coordinates of all
involved services. Maintainability and more loose coupling (every service is only
called within a Saga but never calls) are bought by introducing a single point of
failure into the system. Despite being the "impure" alternative, the
orchestration approach is often the preferred one in real-world applications. The reasons
are, that downtimes are more uncommon than the aforementioned deployment
problems and modern infrastructure solutions may provide backup solutions in
case of a node failure.
2.3
The prototype implementation of the presented contribution uses the reference
net formalism [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] in its underlying implementation. Therefore a quick
introduction to the formalism is given.
      </p>
      <p>
        Reference nets incorporate the "Nets within Nets"/"Object Nets" approach
[
        <xref ref-type="bibr" rid="ref29">29</xref>
        ] with graph transformation and synchronous channels [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. They feature the
concept of net instances, which can be instantiated from nets like objects can
be instantiated from classes in object-oriented programming. While their formal
de nition [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] is language-agnostic, they are almost always considered in the
context of the Java programming language, as the simulator Renew [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] implements
them. Tokens are references to data structures or other net instances. Reference
nets are therefore well suited to construct complex hierarchical models.
However, in the context of Petri net Sagas, they are chosen to support execution due
to their seamless integration into object-oriented programming and their ability
to directly handle function return values. Reference nets can use synchronous
channels for multidirectional information passing to and from other net instances
referenced by tokens.
      </p>
      <p>In gure 2 a simple example of a reference net is given to illustrate the
concept. The syntax is the Java-based one used by the Renew simulator.</p>
      <p>t1 may re twice, generating a new net instance of net2 each time. t2 then
may re synchronously with t4 swapping one token each between the net instance
net1 and one of the net instances of net2. After all rings, the net locks with
two tokens each of color 3, 9, or 12 in place p3 and one token of color 5 in one
net instance's place p7 and of color 7 in the other net instance's place p7.
3</p>
      <sec id="sec-5-1">
        <title>Related</title>
      </sec>
      <sec id="sec-5-2">
        <title>Work</title>
        <p>
          Several related elds of research with respective publications exist. To our best
knowledge, there is no direct approach to support eventual data consistency
with concurrent operations across micro or web services using Petri nets as base
formalism. A direct overview over Saga implementations is given by [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ], which
will be addressed again in section 5.5.
        </p>
        <p>
          There, however, have been some considerations regarding the implementation
of parallelized Sagas. They are related to process calculi, like [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], which considers
implementing parallel Sagas in the context of the process calculus SOCK.
        </p>
        <p>
          Some research integrating services with Petri nets or using them in other
service-related work have been presented. [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] considers performance on web
services, that are modeled with Petri nets but the focus lies on the mathematical
model behind and not on data consistency questions. Similarly, [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] considers
web service performance and elasticity of resources but focuses on business
processes and service allocation, instead of inter-service optimization. Other works
use speci c Petri net subformalisms, like stochastic nets (e.g. [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]) or timed nets
(e.g. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]), to model, analyze, or interact with service structures.
        </p>
        <p>
          [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] considers service choreography using the approach of Open Nets. The
work addresses formal realizability aspects of certain message structures. While
the topic is similar to our contribution, Petri net Sagas in general do not address
the actual construction of orchestrations or choreographies, as they are left to
the modeler. In this regard, the work of [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] can be used as a base to aid the
construction of choreographies for Petri net Sagas.
        </p>
        <p>
          Work related to running Petri nets in the cloud or Petri net-based cloud and
web- and microservice technologies has also been presented. [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ] and [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]
considered containerization with Petri net execution and [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ] contributed a framework
to control the scale of a distributed Petri net simulation from within the
simulation itself. [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ] investigated the integration of web service technology with Petri
nets but did not emphasize consistency.
        </p>
        <p>From a consistency point of view, most research does not incorporate the
shared-nothing data model. A respective example is the research area concerning
sharded or replicated databases.
4</p>
      </sec>
      <sec id="sec-5-3">
        <title>Integrating Sagas with a Petri Net Formalism</title>
        <p>To incorporate Sagas with a Petri net-based formalism multiple aspects need
to be considered. As the intended user group extends to developers, who are
not experts in the eld of Petri nets, the formalism needs to be kept simple to
remain appealing. Also, as veri cation possibility is one of the claims, using a
formalism with a thorough veri cation tool support is desirable. Further, being
a graphical representation of a process a clean representation of the Saga, that
minimizes boilerplate elements, is desired.</p>
        <p>While choreography based Sagas may seem more appealing from a scalable
system point of view, it has already been motivated in section 2.2, that most
realworld applications use orchestration-based Sagas instead. To address this and
also because running a net simulation on a centralized node avoids distributed
net simulation issues, in this paper Petri net Sagas are only presented with the
orchestration application type in mind. Possible extension to choreography based
applications is discussed in the outlook in section 8.
4.1</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Base Formalism</title>
      <p>As the example in gure 1 shows, simple P/T nets may be su cient to model
a Saga. To address the speci c service and desired endpoint a label should be
added to each transition. Using P/T nets yields the direct bene t of using the
most widely known kind of Petri net formalism. Developers, who are
unfamiliar with the concept of Petri nets, can rely on various courses and literature
to acquire the basics required. Also, there are numerous P/T net editor tools
to generate nets with. P/T nets are not Turing-complete and being a simple
vector addition system gives lots of mathematical possibilities. Veri cation on
P/T nets is well studied and established tools are available. Despite being well
suited for successful Petri net Sagas, P/T nets have insu cient means to model
di erent results from a single transition ring. This drawback, however, is not
problematic, as will be addressed in more detail in section 4.2.
4.2</p>
    </sec>
    <sec id="sec-7">
      <title>Failed (Pivot) Transactions vs. Transitions</title>
      <p>The rst problem to address is the possibility for transactions to fail. It is
important at this point to di erentiate between transactions and the transitions
displaying them.</p>
      <p>
        Methods to make a transition fail do exist, putting its consumed tokens back
into its preset places. This behavior was introduced by [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] in the shape of
task-transitions. However, transitions in Petri net Sagas are supposed to model
transaction invocations, and even upon a failed transaction, its invocation in fact
was successful. Also letting a transition fail (by using a task-transition) would
not yield a possibility to handle these kinds of failure, as the marking before
even ring the transition and after failing would be identical (except for other
concurrent actions concerning the speci c locality during the failed ring). In
a Saga, a failure of a single transaction in uences further processing of other
transitions/transactions, and by that, it is not limited to its locality. Therefore
speci c handling of failed transactions is required, which introduces additional
di culties using the P/T net approach. Adding separate transitions for failed
and successful transactions runs would require a change in P/T net semantics to
run these directly (as the transition to be red would not be chosen by activation
only anymore), which we decided is not desirable.
      </p>
      <p>Another problem occurs, when one concurrent branch of the Saga fails early
and synchronization in the Saga later on may never happen. To illustrate this,
consider the (sequential) Saga from the example in gure 1 alongside its
discussed ideas for concurrency. The stock service will require the order id
generated by the order service. However, the price service is independent of any
order id and thus may re concurrently with both the stock service and the
order service transactions. If for some reason, the order service fails and gets
rolled back, the stock service transaction will never be invoked. Still, the result
of the price service awaits the result of the stock service to join and proceed
with invoking the payment adapter service pivot-transaction, which will never
occur. Therefore some kind of global failure handling needs to be implemented
into each concurrent transaction and their results. A process, that is
deterministically computable and error-prone if done by hand and therefore undesirable
to do directly in the P/T net.</p>
      <p>Failures of compensatable transactions are sparsely discussed in literature.
As an additional feature we therefore decided, that pre-pivot-transitions of Petri
net Sagas are also allowed to fail and rollback the Saga, giving the developer more
freedom in implementations. It is, however, recommended to model transactions,
that have an actual chance to fail, that is non-negligible, as pivot-transactions.</p>
      <p>As failure handling transitions essentially do not add to the expressiveness of
the model, we decided to let Petri net Sagas only explicitly model the successful
cases and deduce the failure handling from these during execution. The model
including the failure paths is still interesting though when considering veri cation
purposes of the net. More thoughts on this are discussed in section 5.8 in the
context of our implementation.</p>
      <p>
        As Sagas describe a course of actions to pursue a speci c goal, modeling them
with work ow nets [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is a natural t and hence they are the type of nets we
recommended to model Petri net Sagas.
4.3
      </p>
    </sec>
    <sec id="sec-8">
      <title>Passing Data</title>
      <p>Executing (local) transactions during any step of a Saga usually requires some
kind of data from previous transaction(s), or else they could be run concurrently.
We assume the concurrent execution of di erent transactions implies no data
dependencies exist between the transactions. Therefore a transaction is only
dependent on the data of transactions, that are invoked before itself.</p>
      <p>Also as individual microservices implement their functionality in their own
domain, large exchanges of data between microservices can be assumed to be
uncommon. Therefore it is su cient to provide each transaction invocation with
a set of results that occurred before its invocation in the current Saga.</p>
      <p>Possible additions may explicitly state required data but for now, we will use
this rather simple approach.</p>
      <p>As the speci c required data can be deduced from the structure of the Petri
net Saga it is not necessary to explicitly model the data. It is already expressed
by the command ow black tokens moving through the Petri net Saga during
execution.
4.4</p>
    </sec>
    <sec id="sec-9">
      <title>Syntax</title>
      <p>Overall a P/T net representation of
a successful Saga run was chosen to
model the Saga because it is su cient
to model every aspect of the Saga,
while the remaining aspects can be
deduced implicitly. Labels hold
information over the addressed service and
the service endpoint (command)
delimited by a double colon ("::"). The
pivot-transaction is also speci cally
labeled with the "::pivot" su x. The
P/T net cannot be simulated directly,
due to possibly failing transactions
discussed earlier and therefore direct
veri cation on the P/T net only holds
for cases of successful runs. However,
depending on the implementation,
additional veri cation means are
available. Section 5.8 addresses this topic
in the context of the here presented
implementation. Fig. 3. Petri net Saga displayed as a
la</p>
      <p>Petri net Sagas also feature spe- belled P/T net.
ci c "init" and " nish" transitions to
enable the implementation to add
initialization and cleanup steps around the execution of the Saga.</p>
      <p>An example Petri net Saga (work ow net) of the concurrent version of the
sequential Saga presented in section 2.2 is shown in gure 3. The colors were
chosen to represent the di erent transaction types as well as clarity on the
relocation of transitions and arcs from the linear example. However, using colors
is not mandatory, as they do not bear any semantic meaning for the Petri net
Saga de nition itself.
5</p>
      <sec id="sec-9-1">
        <title>Implementing a Proof-of-concept Prototype</title>
        <p>To illustrate the concept of Petri net Sagas, the general approach to implement
an execution environment for them will be presented. The section is oriented
towards our proof-of-concept implementation. Figure 4 shows the general approach
on how Petri net Sagas are processed by our implementation.
5.1</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>Basic Approach</title>
      <p>
        We decided to execute the Saga by translating the P/T net representation into
a higher Petri net formalism rst: Reference nets. We did so to enable the
possibility to be able to also supply more complicated Saga de nitions using reference
nets. With reference nets it is also possible to easily model transaction failures
while staying inside the reference net semantics. Further the powerful simulator
Renew based on the Java programming language is available to directly execute
reference nets as code. Finally, veri cation tasks can still be done to some degree
on the more complex reference net variant, due to recent publications, like [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ].
      </p>
      <p>Using reference nets, however, introduces the requirement to transform P/T
net Saga de nitions into their reference net counterparts. During the translation,
additional places and transitions get added to express the failure, repeatable, and
rollback behavior to the net model. This is crucial for the advanced veri cation
thoughts presented at the end of the section.</p>
      <p>After being translated to a reference net representation the net will be
simulated by an embedded Renew simulator. During the simulation, the net will
promote calls to an abstract interface for Saga framework interaction. As di
erent implementations of the Saga pattern exist, this is held as general as possible.
Behind the general interface, a speci c implementation handles the calls and
passes them to the speci c framework it is written for. Upon reaching the
marking with just one token in the nishing place (in the work ow net sense) or the
"rolled back" place, which will be introduced later in this section, the simulation
terminates.</p>
      <p>The basic syntax of the Petri net Saga is identical to the one presented in
gure 3 and discussed in section 4.4.
5.2</p>
    </sec>
    <sec id="sec-11">
      <title>Data Format and Parsing</title>
      <p>The Petri net Saga is expected to be supplied in the PNML3 format. To construct
the speci c inscriptions, transitions, and places required to model the reference
net version of the Petri net Saga, a speci c data format was constructed. It is
based on a simple net data structure featuring net, place, transition, and arc
objects and adds Saga speci c content like pivot-transitions and mirror transitions
(for reversible pre-pivot-transactions).</p>
      <sec id="sec-11-1">
        <title>3 Petri Net Markup Language - http://www.pnml.org/</title>
        <p>The data is then transformed into its reference net counterpart, which is
discussed in detail in the next section. To be fed into the Renew simulation
core the data is then transferred back into a reference net speci c variant of
PNML. The reference net representation is not intended to be shown to the
developer by default. However, it can be saved during the process to aid in
troubleshooting and debugging scenarios. It is also possible to directly supply
advanced reference net-based de nitions and skip the transformation part.
5.3</p>
      </sec>
    </sec>
    <sec id="sec-12">
      <title>Transformation to reference nets</title>
      <p>
        Reference net transformation tools like the Renew Metamodelling and
Transformation approach [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] exist, that might help to transform the Petri net Saga
to its reference net counterpart. The transformation of the net requires some
steps, which are not limited to the locality of a net element, e.g. di
erentiating between transitions before and after the pivot-transition. Therefore existing
metamodelling tools could unfortunately not be used, as they focus on
localitybased transformation and cannot handle global constraints.
      </p>
      <p>The transformation process itself consists of ve parts: creation of the
transitions for compensating transactions, transformation of the labels, addition of
guards and data passing and nally detecting failures. To be easier to follow, it
will be described alongside the book store example. Figure 5 shows the nished
and translated reference net from gure 3. The net is much more complex and
displays detailed processing.</p>
      <p>The procedure for the example starts with the work ow net representation
depicted in gure 3. First the entire net structure prior to the pivot transition is
copied and its arcs are reversed. The result can be observed in the upper right
part of gure 5. This leads to an additional net part, that is able to execute
the compensatable transactions in reverse order (or concurrently if no order was
de ned by the original Saga net).</p>
      <p>In the lower part of the net for repeatable transactions (depicted as light blue
transitions) additional red repetition transitions are added to retry transactions
after failures.</p>
      <p>After that all the labels are converted into Renew-speci c calls: "step" calls
in the original part of the net, and "rollback" calls in the newly copied part
from the last step. These can be seen in the transaction inscriptions. During the
transformation of the labels data passing ("result" inscriptions on the arcs) and
guards are added, that handle possible failures and decide which route to take
throughout the net. An example for such a translation is:</p>
      <p>price service::get current price !
action result2 = Saga.step("price service", "get current price",
[result1]);</p>
      <p>Once data handling and guarding is nished, global running and failure
indicators can be added. These are shown as red and green places and transitions
in the upper left part of the gure. The "running" and failed place use so-called
test arcs (without a tip), that are read-only, non-consuming and non-blocking for
concurrent operations. Alongside these indicators, red failure handler transitions
are added, that can be observed in the gure as vertical array of red transitions
between the two groups of yellow transitions.</p>
      <p>Note, that the red "failed" places with double outline are so called virtual
places and have by de nition the same identity as the "failed" place with just
one outline. Virtual places are used here to keep the net less cluttered but bear
no semantic meaning. There are always two possibilities for failures: one, if the
last transaction prior to this one failed, and one, if another transaction on a
di erent concurrent branch failed. Synchronous channels are used for tidiness
here ("this:stop()").
5.4</p>
    </sec>
    <sec id="sec-13">
      <title>Execution Engine</title>
      <p>
        Due to their nature reference nets can be executed directly by the simulator.
The execution engine is given in our implementation by using the simulation
core of the Renew simulator. It is embedded into the Petri net Saga library
and invisible to the programmer and administrator, except for its log outputs
and attached libraries. For further information in regards to the usage of the
simulator please refer to the Renew user guide [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
5.5
      </p>
    </sec>
    <sec id="sec-14">
      <title>Generalized Framework Interface</title>
      <p>Di erent available implementations of the Saga pattern exist. They are usually
supplied in the shape of a framework and di er in functionality and licensing.
An implementation speci c to one framework is possible but limiting. Therefore
a general-purpose interface is put in front of the implementation for a speci c
framework. The actually used framework can thus be swapped when developing
with Petri net Sagas.</p>
      <p>
        Available implementations are e.g. the Eventuate framework4 and the Axon
framework5, which both are commercial. Micro-pro le-lra6 is an open source
implementation and is based on the Narayana7 project. A survey on these
frameworks can be found in [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ].
      </p>
      <p>The implementation expects the usage of a supplied class to pass data from
one Saga step to the next. The interface can then be extended for a speci c
framework by implementing the behavior before the actual invocation of the
Petri net Saga, after its completion, and the callbacks from the actual step or
rollback actions.
5.6</p>
    </sec>
    <sec id="sec-15">
      <title>Deployment and scope</title>
      <p>The intended use of our Petri net Saga implementation is as a Java library in the
development of microservice applications. Note, that enforcing consistency using
the Saga pattern is just one aspect of a microservice deployment. Therefore,
if considered in a larger scope, this work only addresses the orchestration of
Sagas being done based on Petri nets. Other components like commands, services
and service descriptors, message systems, etc., that are not Saga-related, need
to be implemented and supplied separately to realize an entire microservice
deployment.</p>
      <p>The participants of a speci c Saga do not need to be aware of the usage
of Petri net Sagas instead of conventional ones. This is due to the fact, that
participants in orchestration-based Sagas - as described at the beginning of this
contribution - are always only contacted by the orchestrator and do not possess
information about the global process. However, they still need to implement the
speci c command method or class used by the respective Saga framework.
5.7</p>
    </sec>
    <sec id="sec-16">
      <title>Implementation using the Eventuate Framework</title>
      <p>Being one of the available frameworks for handling Saga patterns, the Eventuate
framework is one of the most advanced ones and most dedicated to the Saga use
case. Despite using an All rights reserved license, it follows the visible source8
4 https://eventuate.io/ - All URLs have been checked in January 2021
5 https://axoniq.io/
6 https://github.com/eclipse/micropro le-lra
7 https://github.com/jbosstm/narayana/tree/master/rts/lra
8 https://github.com/eventuate-tram/eventuate-tram-sagas
approach. For the aforementioned reasons, we implemented a sample adapter
between our general-purpose interface and the Eventuate framework.</p>
      <p>Evenutate is tightly coupled to microservice frameworks such as the Spring
Framework or Micronaut. It also relies (as one possibility) on Apache Kafka9,
which again relies on Apache Zookeeper10. Eventuate also utilizes a local
backing database for the orchestrator. Globally seen, this setup is well known in
microservice environments.</p>
      <p>
        Despite its restrictive licensing, the code is designed to be very open for
additions, usually using interfaces instead of direct references. The context of
dependency injection[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] usually adopted in microservice environments supplies loose
coupling and eases integration of the reference net adapter. For the adapter, a
new implementation of the central management component has been introduced,
which moves the execution to the reference net implementation instead of using
a state machine.
5.8
      </p>
    </sec>
    <sec id="sec-17">
      <title>Veri cation</title>
      <p>Running veri cation tools and considerations on the Petri net Saga itself o ers
possibilities to express information about successful runs of the Petri net Saga.
The translation to reference nets presented within this implementation, however,
o ers the possibility to discuss all possible runs. This is in most cases more
desirable. Performing the transformation without restrictions on inscriptions and
on the reference nets concepts changes the formalism to reference nets.</p>
      <p>
        Reference nets are Turing-complete in their general form. However, there has
been the interesting recent contribution MoMoC [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ], that constructs
specialized reachability graphs for restricted reference nets. Undergoing attempts at
our research team try to incorporate these with the tool RenewKube [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] to
scale up reachability computation and the rst results look promising.
      </p>
      <p>
        Another attempt could be made by changing the semantics of the P/T Petri
net Saga in a way, that transition ring is controlled by the behavior of the
system instead of arbitrary rings of activated transitions. This would yield the
possibility to construct P/T nets similar to the presented reference net
translation, that models failures in separate transitions. Depending on the system
successfully or unsuccessfully completing a transaction the respective transition
could be red. In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] the well-known concept of work ow transitions has been
extended to a reference net implementation that could easily be adapted for this.
Extensions in that direction were addressed in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ].
6
      </p>
      <sec id="sec-17-1">
        <title>Example and Usage</title>
        <p>Our implementation can be downloaded from the project's website11. This
section will brie y describe the implementation of custom use cases, as well as the
implementation of the example presented throughout this paper.</p>
        <sec id="sec-17-1-1">
          <title>9 https://kafka.apache.org/</title>
          <p>10 https://zookeeper.apache.org/
11 https://paose.informatik.uni-hamburg.de/paose/wiki/PetriNetSagas
6.1</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-18">
      <title>Custom Use Cases</title>
      <p>First and foremost a PNML le describing the Petri net Saga needs to be
supplied, like the one supplied by the example application. Additionally, as the
implementation is based on Eventuate Tram Sagas, the respective Eventuate
libraries, as well as the Petri net Saga libraries need to be supplied to the
application. A Java Spring12 and Gradle13 based empty sample project containing
all required dependencies can be found at the download location as well.</p>
      <p>To use the framework several classes need to be implemented to specify the
respective actions to be executed when invoking the commands of the Saga.
A custom result type extending our base type needs to be created and
command classes need to be registered with the command registry. This also involves
de ning a custom aggregation implementation to aggregate multiple results of
previous concurrent invocations. Participants need to register themselves under
the service descriptor names with our command handle registry. If the setup of
remote participants is not intended the service descriptor local could be used,
though - if used exclusively - it de es the bene ts of using a Saga framework in
the rst place. For further assistance with the Eventuate part of the
implementation, please refer to the repositories and tutorials under its aforementioned
website.</p>
      <p>Handling a request with a Petri net Saga usually consists of instantiating
the initial result (data) object of the request and creating a Petri net Saga by
invoking the reference net Saga instance factory.
6.2</p>
    </sec>
    <sec id="sec-19">
      <title>Example: Book store</title>
      <p>Finally, an example of how to use our implementation of Petri net Sagas is
presented. To set up the example on a local machine as well, please refer to the
setup instructions at the download location. To run the example of our Petri net
Saga implementation a Linux environment is recommended, as well as Docker
and the tool docker-compose, although these are not strictly necessary, as well
as a Java JDK, which again is necessary.</p>
      <p>We will reuse the example shown in gure 3 in section 4.3. The example is
based - like the empty sample project - on the Spring framework and Gradle. It
uses Apache Kafka, Apache Zookeeper, the Eventuate Tram CDC service,
Zipkin14 and Mysql as backing services, which can be launched conveniently using
docker-compose. The example itself de nes a total of seven custom command
classes and a total of seven participating services. Each command just prints
to the command line, that it has been invoked and then returns. The example
de nes a single Saga with reference to the PNML net le. Results are aggregated
just by combining their success-states with an AND-operation.</p>
      <p>Upon starting, the consecutive and - where applicable concurrent - invocation
of the steps can be observed in the log output.
12 https://spring.io/
13 https://gradle.org/
14 https://zipkin.io/</p>
      <sec id="sec-19-1">
        <title>Evaluation and Discussion</title>
        <p>Based on the experiences with the prototype implementation our rst evaluation
of the method can be discussed.</p>
        <p>The approach integrated rather well with the Saga pattern, at least with
the Eventuate implementation, though the central management core needed to
be reimplemented accordingly. Sagas are already designed with concurrency
between di erent Sagas and Saga instances in mind. However, feedback time for
a user or process usually depends on the execution of one speci c Saga related
to the request, and not multiple concurrent Sagas. Other Sagas executed by the
system remain hidden by the transparency of the system. In the book store
example presented throughout the paper this results in just four sequential steps
instead of the original seven. Being a method of introducing concurrency, the
performance gain depends heavily on the possibility to parallelize the process.</p>
        <p>Traditional Saga systems hold some unused potential, as the robustness
towards concurrency in the overall system is present, but not used within an
individual Saga. Introducing the possibility of concurrency into a model designed
as a sequential system implies several aspects to consider. By backing the Saga
with a formal Petri net model we were able to mitigate these troublesome
details to a degree. This provides a solid base for describing concurrent Sagas and
successfully realizes the addressed potential.</p>
        <p>On the downside, by our choice to express Petri net Sagas with labeled P/T
nets, the possibilities to model data passings are (in this rst version) limited.
They need to be covered by the Petri net Saga implementation and also the
nal implementation of the system using the Petri net Saga library. Also, adding
another layer of dependencies to the equation of a microservice system further
increased its complexity.</p>
        <p>Overall, we see the concept and the implementation as very promising and
already plan certain use cases with its implementation in the context of the
Renew simulator itself.
8</p>
      </sec>
      <sec id="sec-19-2">
        <title>Conclusion</title>
        <p>A novel method of de ning concurrent Sagas based on P/T work ow nets has
been presented. The method is intended to be used in persistence operations in
availability-oriented microservice deployments. We have motivated, that
performance and response time for single Sagas can be improved by using the method
and outlined the use of veri cation methods on the underlying formal Petri net
model. In addition to the presented concept, a sample implementation based on
translation to reference nets and execution using a Renew simulation core and
the Eventuate Tram Sagas framework has been contributed.</p>
      </sec>
    </sec>
    <sec id="sec-20">
      <title>Outlook</title>
      <p>Further research may include support for choreography-based solutions. The
main challenges will include failure detection in concurrent branches.</p>
      <p>Another extension could model speci c data portions required by each
transaction invocation. Depending on the use case this might reduce the passed data
between orchestrator and local transaction invocation. The restriction to P/T
nets of manageable size might be di cult to hold under these circumstances and
the use of colored nets (by folding) might become more suitable.</p>
      <p>
        In further research, the here presented concepts can be applied to distributed
synchronous channels of distributed reference net simulations. The synchronous
channels may only hold at most one action15 inscription to be compatible with
the pivot-transaction model. This enables a much better scaling of distributed
reference net simulations [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] and is an extension of previous consideration in
this direction (see our contributions [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] and [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ]).
15 action inscriptions are usually used in commands causing side e ects. Our Renew
extension to use logical functional language inscriptions will address the avoidance
of side e ects of actions, see [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>van der Aalst</surname>
          </string-name>
          , W.,
          <string-name>
            <surname>Moldt</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valk</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wienberg</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Enacting interorganizational work ows using nets in nets</article-title>
          . In: Becker,
          <string-name>
            <surname>J.</surname>
          </string-name>
          , Muhlen,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Rosemann</surname>
          </string-name>
          , M. (eds.)
          <source>Proceedings of the 1999 Work ow Management Conference Work ow-based Applications</source>
          , Munster,
          <source>Nov. 9th 1999</source>
          . pp.
          <volume>117</volume>
          {
          <fpage>136</fpage>
          . Working Paper Series of the Department of Information Systems, University of Munster (
          <year>1999</year>
          ), working Paper No.
          <fpage>70</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Aalst</surname>
            , van der,
            <given-names>W.</given-names>
          </string-name>
          , Hee, van,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Houben</surname>
          </string-name>
          , G.:
          <article-title>Modeling work ow management systems with high-level petri nets</article-title>
          . In: Michelis, de, G.,
          <string-name>
            <surname>Ellis</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Memmi</surname>
            ,
            <given-names>G</given-names>
          </string-name>
          . (eds.)
          <source>Proceedings of the 2nd Workshop on Computer-Supported Cooperative Work, Petri Nets and related formalisms</source>
          . pp.
          <volume>31</volume>
          {
          <issue>50</issue>
          (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bendoukha</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>Multi-Agent Approach for Managing Work ows in an Inter-Cloud Environment</article-title>
          . Dissertation, Universitat Hamburg, Fachbereich Informatik,
          <source>VogtKolln Str</source>
          . 30,
          <string-name>
            <given-names>D</given-names>
            <surname>-</surname>
          </string-name>
          22527
          <string-name>
            <surname>Hamburg</surname>
          </string-name>
          (
          <year>2017</year>
          ), http://ediss.sub.uni-hamburg.de/ volltexte/2017/8241/
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bernine</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nacer</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          ssani,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Alla</surname>
          </string-name>
          , H.:
          <article-title>Towards a performance analysis of composite web services using petri nets</article-title>
          .
          <source>Int. J. Math. Oper. Res</source>
          .
          <volume>17</volume>
          (
          <issue>4</issue>
          ),
          <volume>467</volume>
          {
          <fpage>491</fpage>
          (
          <year>2020</year>
          ). https://doi.org/10.1504/IJMOR.
          <year>2020</year>
          .110847
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bhandari</surname>
            ,
            <given-names>G.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gupta</surname>
          </string-name>
          , R.:
          <article-title>Fault diagnosis in service-oriented computing through partially observed stochastic petri nets</article-title>
          .
          <source>Service Oriented Computing Applications</source>
          <volume>14</volume>
          (
          <issue>1</issue>
          ),
          <volume>35</volume>
          {
          <fpage>47</fpage>
          (
          <year>2020</year>
          ). https://doi.org/10.1007/s11761-019-00279-5
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Brewer</surname>
            ,
            <given-names>E.A.</given-names>
          </string-name>
          :
          <article-title>Towards robust distributed systems (abstract)</article-title>
          .
          <source>In: Proceedings of the Nineteenth Annual ACM Symposium on Principles of Distributed Computing</source>
          . p.
          <fpage>7</fpage>
          . PODC '
          <volume>00</volume>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA (
          <year>2000</year>
          ). https://doi.org/10.1145/343477.343502
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Buchs</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klikovits</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Linard</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mencattini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Racordon</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>A model checker collection for the model checking contest using docker and machine learning</article-title>
          . In: Khomenko,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Roux</surname>
          </string-name>
          ,
          <string-name>
            <surname>O.H</surname>
          </string-name>
          . (eds.)
          <article-title>Application and Theory of Petri Nets</article-title>
          and Concurrency - 39th International Conference,
          <source>PETRI NETS</source>
          <year>2018</year>
          , Bratislava, Slovakia, June 24-29,
          <year>2018</year>
          , Proceedings. LNCS, vol.
          <volume>10877</volume>
          , pp.
          <volume>385</volume>
          {
          <fpage>395</fpage>
          . Springer (
          <year>2018</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -91268-4 21
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Christensen</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Damgaard Hansen</surname>
          </string-name>
          , N.:
          <article-title>Coloured petri nets extended with channels for synchronous communication</article-title>
          . In: Valette,
          <string-name>
            <surname>R</surname>
          </string-name>
          . (ed.)
          <source>Application and Theory of Petri Nets</source>
          <year>1994</year>
          . pp.
          <volume>159</volume>
          {
          <fpage>178</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Donatelli</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haar</surname>
          </string-name>
          , S. (eds.):
          <article-title>Application and Theory of Petri Nets</article-title>
          and Concurrency - 40th International Conference,
          <source>PETRI NETS</source>
          <year>2019</year>
          , Aachen, Germany, June 23-28,
          <year>2019</year>
          ,
          <source>Proceedings, Lecture Notes in Computer Science</source>
          , vol.
          <volume>11522</volume>
          . Springer (
          <year>2019</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>030</fpage>
          -21571-2
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Entezari-Maleki</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Etesami</surname>
            ,
            <given-names>S.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghorbani</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Niaki</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sousa</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Movaghar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Modeling and evaluation of service composition in commercial multiclouds using timed colored petri nets</article-title>
          .
          <source>IEEE Trans. Syst. Man Cybern. Syst</source>
          .
          <volume>50</volume>
          (
          <issue>3</issue>
          ),
          <volume>947</volume>
          {
          <fpage>961</fpage>
          (
          <year>2020</year>
          ). https://doi.org/10.1109/TSMC.
          <year>2017</year>
          .2768586
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Fowler</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Inversion of control containers and the dependency injection pattern</article-title>
          .
          <source>Web</source>
          (
          <year>2004</year>
          ), https://martinfowler.com/articles/injection.html
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Garcia-Molina</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Salem</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          : Sagas.
          <source>In: Proceedings of the 1987 ACM SIGMOD International Conference on Management of Data</source>
          . pp.
          <volume>249</volume>
          {
          <fpage>259</fpage>
          . SIGMOD '87,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>1987</year>
          ). https://doi.org/10.1145/38713.38742
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Gray</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reuter</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Transaction Processing: Concepts and Techniques</article-title>
          . Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1st edn. (
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Jacob</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Implementierung einer sicheren und rollenbasierten Workow"=Managementkomponente fur ein Petrinetzwerkzeug</article-title>
          . Diplomarbeit, Universitat Hamburg, Fachbereich Informatik,
          <source>Vogt-Kolln Str</source>
          . 30,
          <string-name>
            <given-names>D</given-names>
            <surname>-</surname>
          </string-name>
          22527
          <string-name>
            <surname>Hamburg</surname>
          </string-name>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Kummer</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Referenznetze</surname>
          </string-name>
          . Logos Verlag (
          <year>2002</year>
          ), http://www.logos-verlag.de/ cgi-bin/engbuchmid?isbn=0035&amp;lng=eng&amp;id=
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Kummer</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wienberg</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duvigneau</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabac</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haustermann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mosteller</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          : Renew { User
          <source>Guide (Release 2.5.1)</source>
          . University of Hamburg, Faculty of Informatics, Theoretical Foundations Group (nov
          <year>2020</year>
          ), http://www.renew.de/
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Lacheheub</surname>
            ,
            <given-names>M.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hameurlain</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maamri</surname>
          </string-name>
          , R.:
          <article-title>Resources consumption analysis of business process services in cloud computing using petri net</article-title>
          .
          <source>J. King Saud Univ. Comput. Inf. Sci</source>
          .
          <volume>32</volume>
          (
          <issue>4</issue>
          ),
          <volume>408</volume>
          {
          <fpage>418</fpage>
          (
          <year>2020</year>
          ). https://doi.org/10.1016/j.jksuci.
          <year>2019</year>
          .
          <volume>08</volume>
          .005
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Lanese</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zavattaro</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>Programming sagas in SOCK</article-title>
          . In: Hung,
          <string-name>
            <given-names>D.V.</given-names>
            ,
            <surname>Krishnan</surname>
          </string-name>
          , P. (eds.)
          <source>Seventh IEEE International Conference on Software Engineering and Formal Methods</source>
          ,
          <string-name>
            <surname>SEFM</surname>
          </string-name>
          <year>2009</year>
          , Hanoi, Vietnam,
          <fpage>23</fpage>
          -
          <lpage>27</lpage>
          November
          <year>2009</year>
          . pp.
          <volume>189</volume>
          {
          <fpage>198</fpage>
          . IEEE Computer Society (
          <year>2009</year>
          ). https://doi.org/10.1109/SEFM.
          <year>2009</year>
          .23
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Lohmann</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolf</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Decidability results for choreography realization</article-title>
          . In: Kappel,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Maamar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Nezhad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.R.M</given-names>
            . (eds.)
            <surname>Service-Oriented</surname>
          </string-name>
          Computing - 9th International Conference, ICSOC 2011, Paphos, Cyprus, December 5-
          <issue>8</issue>
          ,
          <source>2011 Proceedings. Lecture Notes in Computer Science</source>
          , vol.
          <volume>7084</volume>
          , pp.
          <volume>92</volume>
          {
          <fpage>107</fpage>
          . Springer (
          <year>2011</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -25535-9 7
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Mosteller</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabac</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haustermann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Integrating Petri net semantics in a model-driven approach: The Renew meta-modeling and transformation framework</article-title>
          .
          <source>Transaction on Petri Nets and Other Models of Concurrency XI 11</source>
          ,
          <issue>92</issue>
          {
          <fpage>113</fpage>
          (
          <year>2016</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>662</fpage>
          -53401-4 5, http://dx.doi.org/ 10.1007/978-3-
          <fpage>662</fpage>
          -53401-4
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Nadareishvili</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mitra</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McLarty</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Amundsen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          : Microservice Architecture: Aligning Principles, Practices, and
          <string-name>
            <surname>Culture. O'Reilly Media</surname>
          </string-name>
          , Inc. (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Richardson</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Microservices Patterns: With Examples in Java</article-title>
          . Manning
          <string-name>
            <surname>Publications</surname>
          </string-name>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23. Rowekamp, J.H.:
          <article-title>Investigating the java spring framework to simulate reference nets with Renew</article-title>
          . pp.
          <volume>41</volume>
          {
          <fpage>46</fpage>
          . No.
          <year>2018</year>
          -02 in Reports / Technische Berichte der Fakultat fur Angewandte Informatik der Universitat
          <string-name>
            <surname>Augsburg</surname>
          </string-name>
          (
          <year>2018</year>
          ), https:// opus.bibliothek.uni-augsburg.de/opus4/41861
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24. Rowekamp,
          <string-name>
            <given-names>J.H.</given-names>
            ,
            <surname>Feldmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Moldt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Simon</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Simulating Place / Transition Nets by a distributed, web based, stateless service</article-title>
          . In: Moldt,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Kindler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Wimmer</surname>
          </string-name>
          , M. (eds.) Petri Nets and
          <string-name>
            <given-names>Software</given-names>
            <surname>Engineering</surname>
          </string-name>
          . International Workshop, PNSE'19,
          <string-name>
            <surname>Aachen</surname>
          </string-name>
          , Germany, June 24,
          <year>2019</year>
          .
          <source>Proceedings. CEUR Workshop Proceedings</source>
          , vol.
          <volume>2424</volume>
          , pp.
          <volume>163</volume>
          {
          <fpage>164</fpage>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2019</year>
          ), http://CEUR-WS.org/Vol-2424
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25. Rowekamp,
          <string-name>
            <given-names>J.H.</given-names>
            ,
            <surname>Moldt</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.:</surname>
          </string-name>
          <article-title>RenewKube: Reference net simulation scaling with Renew and Kubernetes</article-title>
          .
          <source>In: Donatelli and Haar [9]</source>
          , pp.
          <volume>69</volume>
          {
          <fpage>79</fpage>
          . https://doi.org/10.1007/978-3-
          <fpage>030</fpage>
          -21571-2 4
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26. Rowekamp,
          <string-name>
            <given-names>J.H.</given-names>
            ,
            <surname>Moldt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Feldmann</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Investigation of containerizing distributed Petri net simulations</article-title>
          . In: Moldt,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Kindler</surname>
          </string-name>
          ,
          <string-name>
            <surname>E.</surname>
          </string-name>
          , Rolke, H. (eds.) Petri Nets and
          <string-name>
            <given-names>Software</given-names>
            <surname>Engineering</surname>
          </string-name>
          . International Workshop, PNSE'
          <fpage>18</fpage>
          , Bratislava, Slovakia, June 25-26,
          <year>2018</year>
          .
          <source>Proceedings. CEUR Workshop Proceedings</source>
          , vol.
          <volume>2138</volume>
          , pp.
          <volume>133</volume>
          {
          <fpage>142</fpage>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2018</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2138</volume>
          /
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Simon</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moldt</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmitz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haustermann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Tools for Curry-Coloured Petri nets</article-title>
          .
          <source>In: Donatelli and Haar [9]</source>
          , pp.
          <volume>101</volume>
          {
          <fpage>110</fpage>
          . https://doi.org/10.1007/978- 3-
          <fpage>030</fpage>
          -21571-2 7
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Stefanko</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chaloupka</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rossi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>The saga pattern in a reactive microservices environment</article-title>
          . In: van Sinderen,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Maciaszek</surname>
          </string-name>
          ,
          <string-name>
            <surname>L.A</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 14th International Conference on Software Technologies, ICSOFT</source>
          <year>2019</year>
          , Prague, Czech Republic,
          <source>July 26-28</source>
          ,
          <year>2019</year>
          . pp.
          <volume>483</volume>
          {
          <fpage>490</fpage>
          .
          <string-name>
            <surname>SciTePress</surname>
          </string-name>
          (
          <year>2019</year>
          ). https://doi.org/10.5220/0007918704830490
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Valk</surname>
          </string-name>
          , R.:
          <article-title>Petri nets as token objects - an introduction to elementary object nets</article-title>
          . In: Desel,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Silva</surname>
          </string-name>
          , M. (eds.) 19th
          <source>International Conference on Application and Theory of Petri nets</source>
          , Lisbon, Portugal. pp.
          <volume>1</volume>
          {
          <fpage>25</fpage>
          . No. 1420
          <source>in Lecture Notes in Computer Science</source>
          , Springer-Verlag (
          <year>1998</year>
          ). https://doi.org/10.1007/3-540
          <source>-69108-1 1</source>
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Petri Net-based Combination and Integration of Agents and Workows</article-title>
          .
          <source>Ph.D. thesis</source>
          , Universitat Hamburg, Fachbereich Informatik,
          <source>Vogt-Kolln Str</source>
          . 30,
          <string-name>
            <given-names>D</given-names>
            <surname>-</surname>
          </string-name>
          22527
          <string-name>
            <surname>Hamburg</surname>
          </string-name>
          (
          <year>2018</year>
          ), http://ediss.sub.uni-hamburg.de/volltexte/ 2018/8995/
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Willrodt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moldt</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simon</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Modular model checking of reference nets: MoMoC</article-title>
          . In: Ko
          <fpage>hler</fpage>
          -Bu meier, M.,
          <string-name>
            <surname>Kindler</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          , Rolke, H. (eds.)
          <source>Proceedings of the International Workshop on Petri Nets and Software Engineering co-located with 41st International Conference on Application and Theory of Petri Nets and Concurrency (PETRI NETS</source>
          <year>2020</year>
          ), Paris, France, June 24,
          <year>2020</year>
          (due to COVID-
          <volume>19</volume>
          : virtual conference).
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <volume>2651</volume>
          , pp.
          <volume>181</volume>
          {
          <fpage>193</fpage>
          . CEURWS.org (
          <year>2020</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2651</volume>
          /paper12.pdf
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>