<!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>Modelling the Behaviour of Management Operations in Cloud-based Applications?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Antonio Brogi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Canciani</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jacopo Soldani</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>PengWei Wang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Pisa</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <fpage>191</fpage>
      <lpage>206</lpage>
      <abstract>
        <p>How to flexibly manage complex applications over heterogeneous clouds is one of the emerging problems in the cloud era. The OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) aims at solving this problem by providing a language to describe and manage complex cloud applications in a portable, vendoragnostic way. TOSCA permits to define an application as an orchestration of nodes, whose types can specify states, requirements, capabilities and management operations - but not how they interact each another. In this paper we first propose how to extend TOSCA to specify the behaviour of management operations and their relations with states, requirements, and capabilities. We then illustrate how such behaviour can be naturally modelled, in a compositional way, by means of open Petri nets. The proposed modelling permits to automate different analyses, such as determining whether a deployment plan is valid, which are its effects, or which plans allow to reach certain system configurations.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Available cloud technologies permit to run on-demand distributed software
systems at a fraction of the cost which was necessary just a few years ago. On the
other hand, how to flexibly deploy and manage such applications over
heterogeneous clouds is one of the emerging problems in the cloud era.</p>
      <p>
        In this perspective, OASIS recently released the Topology and Orchestration
Specification for Cloud Applications (TOSCA [
        <xref ref-type="bibr" rid="ref19 ref20">19,20</xref>
        ]), a standard to support
the automation of the deployment and management of complex cloud-based
applications. TOSCA provides a modelling language to specify, in a portable and
vendor-agnostic way, a cloud application and its deployment and management.
An application can be specified in TOSCA by instantiating component types, by
connecting a component’s requirements to the capabilities of other components,
and by orchestrating components’ operations into plans defining the deployment
and management of the whole application.
      </p>
      <p>
        Unfortunately, the current specification of TOSCA [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] does not permit to
describe the behaviour of the management operations of an application. Namely,
it is not possible to describe the order in which the management operations of
? This work has been partly supported by the EU-FP7-ICT-610531 project SeaClouds.
a component must be invoked, nor how those operations depend on the
requirements and affect the capabilities of that component. As a consequence, the
verification of whether a plan to deploy an application is valid must be performed
manually, with a time-consuming and error-prone process.
      </p>
      <p>In this paper, we first propose a way to extend TOSCA to specify the
behaviour of management operations and their relations with states, requirements,
and capabilities. We define how to specify the management protocol of a TOSCA
component by means of finite state machines whose states and transitions are
associated with conditions on (some of) the component’s requirements and
capabilities. Intuitively speaking, those conditions define the consistency of
component’s states and constrain the executability of component’s operations to the
satisfaction of requirements.</p>
      <p>
        We then illustrate how the management protocols of TOSCA components can
be naturally modelled, in a compositional way, by means of open Petri nets [
        <xref ref-type="bibr" rid="ref14 ref2">2,14</xref>
        ].
This allows us to obtain the management protocol of an arbitrarily complex cloud
application by combining the management protocols of its components. The
proposed modelling permits to automate different analyses, such as determining
whether a deployment plan is valid, which are its effects, or which plans allow
to reach certain system configurations.
      </p>
      <p>The rest of the paper is organized as follows. Sect. 2 introduces the needed
background (TOSCA and open Petri nets), while Sect. 3 illustrates a scenario
motivating the need for an explicit, machine-readable representation of
management protocols. Sect. 4 describes how TOSCA can be extended to specify
the behaviour of management operations, how such behaviour can be naturally
and compositionally modelled by means of open Petri nets, and how the
proposed modelling permits to automate different types of analysis. Related work
is discussed in Sect. 5, while some concluding remarks are drawn in Sect. 6.
2
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <sec id="sec-2-1">
        <title>TOSCA</title>
        <p>
          TOSCA [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] is an emerging standard whose main goals are to enable (i) the
specification of portable cloud applications and (ii) the automation of their
deployment and management. In this perspective, TOSCA provides an XML-based
modelling language which allows to specify the structure of a cloud application
as a typed topology graph, and deployment/management tasks as plans. More
precisely, each cloud application is represented as a ServiceTemplate (Fig. 1),
which consists of a TopologyTemplate and (optionally) of management Plans.
        </p>
        <p>The TopologyTemplate is a typed directed graph that describes the
topological structure of the composite cloud application. Its nodes (NodeTemplates)
model the application components, while its edges (RelationshipTemplates)
model the relations between those application components. NodeTemplates and
RelationshipTemplates are typed by means of NodeTypes and
RelationshipTypes, respectively. A NodeType defines (i) the observable properties of an
application component C, (ii) the possible states of its instances, (iii) the requirements
needed by C, (iv) the capabilities offered by C to satisfy other components’
requirements, and (v) the management operations of C. RelationshipTypes
describe the properties of relationships occurring among components.
Syntactically, properties are described by PropertiesDefinitions, states by
InstanceStates, requirements by RequirementDefinitions (of certain
RequirementTypes), capabilities by CapabilityDefinitions (of certain CapabilityTypes),
and operations by Interfaces and Operations.</p>
        <p>On the other hand, Plans enable the description of application deployment
and/or management aspects. Each Plan is a workflow that orchestrates the
operations offered by the application components (i.e., NodeTemplates) to address
(part of) the management of the whole cloud application1.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 (Open) Petri nets</title>
        <p>
          Before providing a formal definition of open Petri nets (Def. 2), we recall the
definition of Petri nets just to introduce the employed notation. We instead omit
to recall other very basic notions about Petri nets (e.g., marking of a net, firing
of transitions, etc.) as they are well-know and easy to find in literature [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ].
Definition 1. A Petri net is a tuple P = hP, T, •·, ·•i where P is a set of places,
T is a set of transitions (with P ∩ T = ∅), and •·, ·• : T → 2P are functions
assigning to each transition its input and output places.
        </p>
        <p>
          According to [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], an open Petri net is an ordinary Petri net with a
distinguished set of (open) places that are intended to represent the interface of the
net towards the external environment, meaning that the environment can put or
remove tokens from those places. In this paper, we will employ a subset of open
Petri nets, where transitions consume at most one token from each place, and
where the environment can both add/remove tokens to/from all open places.
Definition 2. An open Petri net is a pair Z = hP, Ii, where P = hP, T, •·, ·•i
is an ordinary Petri net, and I ⊆ P is the set of open places. The places in P \ I
will be referred to as internal places.
1 A more detailed and self-contained introduction to TOSCA can be found in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Motivating scenario</title>
      <p>
        Consider a developer who wants to deploy and manage the web services
SendSMS and Forex on a TOSCA-compliant cloud platform. She first describes her
services in TOSCA, and then selects the third-party components (i.e. NodeTypes)
needed to run them. For instance, she indicates that her services will run on a
Tomcat server installed on an Ubuntu operating system, which in turn runs on an
AmazonEC2 virtual machine. Fig. 2 illustrates the resulting TopologyTemplate,
according to the Winery graphical notation [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. For the sake of simplicity, and
without loss of generality, in the following we focus only on the lifecycle interface
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] of each NodeType instantiated in the topology (i.e., the interface containing
the operations to install, configure, start, stop, and uninstall a component).
      </p>
      <p>Suppose that the developer wants to describe the automation of the
deployment of the SendSMS and Forex services by writing a TOSCA Plan. Since
TOSCA does not include any representation of the management protocols of
(third-party) NodeTypes, developers may produce invalid Plans. For instance,
while Fig. 3 illustrates three seemingly valid Plans, only the third is a valid
(a) An invalid BPMN plan.
(b) Another invalid BPMN plan.</p>
      <p>(c) A valid BPMN plan.
plan. The other Plans cannot be considered valid since (a) Tomcat’s Configure
operation cannot be executed before Tomcat is running, and (b) Tomcat cannot
be installed when the Ubuntu operating system is not running.</p>
      <p>While the validity of Plans can be manually verified, this is a time-consuming
and error-prone process. In order to enable the automated verification of the
validity of Plans, TOSCA should be extended so as to permit specifying the
behaviour of and the relations among NodeTypes’ management operations.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Modelling management protocols</title>
      <p>While a TOSCA NodeType can be described by means of its states, requirements,
capabilities, and management operations, there is currently no way to specify
how management operations affect states, how operations or states depend on
requirements, or which capabilities are concretely provided in a certain state.</p>
      <p>The objective of the next section is precisely to propose a way to extend
TOSCA to specify the behaviour of management operations and their relations
with states, requirements, and capabilities.
4.1</p>
      <sec id="sec-4-1">
        <title>Cloud-based application management protocols in TOSCA</title>
        <p>Let N be a TOSCA NodeType, and let us denote its states, requirements,
capabilities, and management operations with SN , RN , CN , and ON , respectively.</p>
        <p>We want to permit describing whether and how the management operations
of N depend on other operations of the same node as well as on operations of
the other nodes providing the capabilities that satisfy the requirements of N .
– The first type of dependencies can be easily described by specifying the
relationship between states and management operations of N . More precisely,
the order with which the operations of N can be executed can be described
by means of a transition relation T , that specifies whether an operation o
can be executed in a state s, and which state is reached by executing o in s.
– The second type of dependencies can be described by associating transitions
and states with (possibly empty) sets of requirements to indicate that the
corresponding capabilities are assumed to be provided. More precisely, the
requirements associated with a transition t specify which are the
capabilities that must be offered by other nodes to allow the execution of t. The
requirements associated with a state of a NodeType N specify which are the
capabilities that must (continue to) be offered by other nodes in order for N
to (continue to) work properly.</p>
        <p>To complete the description, each state s of a NodeType N also specifies the
capabilities provided by N in s.</p>
        <p>Definition 3. Let N = hSN , RN , CN , ON , MN i be a NodeType, where SN , RN ,
CN , and ON are the sets of its states, requirements, capabilities, and
management operations. MN = hs, R, C, T i is the management protocol of N , where
– s ∈ SN is the initial state,
– R is a function indicating, for each state s ∈ SN , which conditions on
requirements must hold (i.e., R(s) ⊆ RN , with R(s) = ∅)2,
– C is a function indicating which capabilities of N are concretely offered in a
state s ∈ SN (i.e., C(s) ⊆ CN , with C(s) = ∅), and
– T ⊆ SN × 2RN × ON × SN is a set of quadruples modelling the transition
relation (i.e., hs, H, o, s0i ∈ T means that in state s, and if condition H holds,
o is executable and leads to state s0).</p>
        <p>Syntactically, to describe MN we slightly extend the syntax for describing a
TOSCA NodeType. Namely, we enrich the description of an InstanceState by
introducing the nested elements ReliesOn and Offers. ReliesOn defines R (of
Def. 3) by enabling the association between states and assumed requirements,
while Offers defines C by indicating the capabilities offered in a state.
Furthermore, we introduce the element ManagementProtocol, which allows to specify
the InitialState s of the protocol, as well as the Transitions defining the
transition relation T .</p>
        <p>The management protocols of the NodeTypes in the motivating scenario of
Sect. 3 are shown in Fig. 4, where MWS is the management protocol for
WebServices, MS for Server, MOS for OperatingSystem, and MVM for
VirtualMachine. Consider for instance the management protocol MS of NodeType
MWS</p>
        <p>MS</p>
        <p>MOS</p>
        <p>MVM
Server defining the Tomcat server. Its states SN are Unavailable (initial state),
Stopped, and Working, the only requirement in RN is ServerContainer, the
only capability in CN is WebAppRuntime, and its management operations are
Setup, Uninstall, Run, Stop, and Configure. States Unavailable and Stopped
are not associated with any requirement or capability. State Working instead
2 Without loss of generality, we assume that the initial state of a management protocol
has no requirements and does not provide any capability.
specifies that the capability corresponding to the ServerContainer requirement
must be provided (by some other node) in order for Server to (continue to) work
properly. State Working also specifies that Server provides the WebAppRuntime
capability when in such state. Finally, all transitions (but those involving
operations Stop and Configure) constrain their firability by requiring the capability
that satisfies ServerContainer to be offered (by some other node).</p>
        <p>
          Note that Def. 3 permits to define operations that have non-deterministic
effects when applied in a state (e.g., a state can have two outgoing transitions
corresponding to the same operation and leading to different states). This form of
non-determinism is not acceptable in the management of a TOSCA application
[
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. We will thus focus on deterministic management protocols, i.e. protocols
ensuring deterministic effects when performing an operation in a state.
Definition 4. Let N = hSN , RN , CN , ON , MN i be a NodeType. The
management protocol MN = hs, R, C, T i is deterministic if and only if
        </p>
        <p>∀hs1, H1, o1, s01i, hs2, H2, o2, s02i ∈ T : s1 = s2 ∧ o1 = o2 ⇒ s01 = s02
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Modelling cloud-based application management protocols in (open) Petri nets</title>
        <p>A (deterministic) management protocol MN of a NodeType N can be easily
encoded by an open Petri net. Each state of MN is mapped into an internal
place of the Petri net, and each capability and requirement of N is mapped into
an open place of the same net. Furthermore, each transition hs, H, o, s0i of MN
is mapped into a Petri net transition t with the following inputs and outputs:
(i) The input places of t are the places denoting s, the requirements that are
needed but not already available in s (i.e., (R(s0) ∪ H) − R(s)), and the
capabilities that are provided in s but not in s0 (i.e., C(s) − C(s0)).
(ii) The output places of t are the places denoting s0, the requirements that
were needed but are no more assumed to hold in s0 (i.e., (R(s)∪H)−R(s0)),
and the capabilities that are provided in s0 but not in s (i.e., C(s0) − C(s)).
The initial marking of the obtained net prescribes that the only place initially
containing a token is that corresponding to the initial state s of MN .
Definition 5. Let N = hSN , RN , CN , ON , MN i be a NodeType, with MN =
hs, R, C, T i. The management protocol MN is encoded into an open net ZN =
hPN , IN i, with PN = hPN , TN , •·, ·•i and IN ⊆ PN , as follows.</p>
        <p>– The set PN of places contains a separate place for each state in SN , for each
requirement in RN , and for each capability in CN .
– The set IN ⊂ PN of open places contains the places denoting the requirements
in RN and the capabilities in CN .
– The set TN contains a net transition t for each transition hs, H, o, s0i ∈ T .
(i) The set •t of input places contains the place s, the places denoting the
requirements in (R(s0) ∪ H) − R(s), and those denoting the capabilities
in C(s) − C(s0).
(ii) The set t• of output places contains the place s0, the places denoting the
requirements in (R(s) ∪ H) − R(s0), and those denoting the capabilities
in C(s0) − C(s).</p>
        <sec id="sec-4-2-1">
          <title>The initial marking of ZN consists of only one token in place s.</title>
          <p>The above definition ensures that the Petri net encoding of a management
protocol satisfies the following properties:
– There is a one-to-one correspondence between the marking of the internal
places of the Petri net and the states of a management protocol. Namely,
there is exactly one token in the internal place denoting the current state,
and no tokens in the other internal places.
– Each operation can be performed if and only if all the necessary requirements
are available in the source state, and no capability required by any connected
component is disabled in the target state.</p>
          <p>Consider for instance the management protocol MS (Fig. 4), whose
corresponding Petri net is shown in Fig. 5. Each state in MS is translated into an
internal place (represented as a circle), while the ServerContainer requirement
and the WebAppRuntime capability are translated into open places (represented
as diamonds). Additionally, protocol transitions are translated into net
transitions. For example, the transition hStopped, {ServerContainer}, Run, Workingi
is translated into a Petri net transition, whose inputs places are Stopped and
ServerContainer, and whose outputs places are Working and WebAppRuntime.</p>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>Analysis of cloud-based application management protocols</title>
        <p>We now show how the Petri net modelling the management protocol of a TOSCA
TopologyTemplate (specifying a whole cloud-based application) can be obtained,
in a compositional way, from the Petri nets modelling the management protocols
of the NodeTypes in such TopologyTemplate.</p>
        <p>We first need to model (by open Petri nets working as a capability
controllers) the RelationshipTemplates that define in a TopologyTemplate the
association between the requirements of a NodeTypes and the capabilities of
other NodeTypes. To do that, we first define an utility binding function that
returns the set of requirements with which a capability is associated.
Definition 6. Let S be a ServiceTemplate, and let c be a capability offered
by a NodeType in S. We define b(c, S) = {r1, . . . , rn}, where r1, . . . , rn are the
requirements connected to c in S by means of RelationshipTemplates.
We now exploit function b to define capability controllers. On the one hand, the
controller must ensure that once a capability c is available, the nodes exposing
the connected requirements r1, . . . , rn are able to simultaneously exploit it. This
is obtained by adding a transition c↑ able to propagate the token from place
c to places r1, . . . , rn (i.e., the input place of c↑ is c, and its output places
are r1, . . . , rn). On the other hand, the controller has also to ensure that the
capability is not removed while at least another node is actively assuming its
availability (with a condition on a connected requirement). Thus, we introduce
a transition c↓ whose input places are r1, . . . , rn and whose output place is c.
Definition 7. Let S be a ServiceTemplate, and let c be a capability offered by
a NodeType instantiated in S. Let r1, . . . , rn be the requirements exposed by the
nodes in S such that b(c, S) = {r1, . . . , rn}. The controller of c is an open Petri
net Zc = hPc, Ici, with Pc = hPc, Tc, •·, ·•i, defined as follows.</p>
        <p>– The set Pc of places contains a separate place for the capability c and for
each requirement r1, . . . , rn.
– The set Ic coincides with Pc.
– The set Tc contains only two Petri net transitions c↑ and c↓.</p>
        <p>• The input and output places of c↑ are the place c and the places r1, . . . , rn,
respectively (i.e., •c↑ = {c} and c↑• = {r1, . . . , rn}).
• The input and output places of c↓ are the places r1, . . . , rn and the place
c, respectively (i.e., •c↑ = {r1, . . . , rn} and c↑• = {c}).</p>
        <sec id="sec-4-3-1">
          <title>The initial marking of Zc is empty (i.e., no place contains a token).</title>
          <p>An example of controller (for a capability c connected to two requirements r1
and r2) is illustrated in Fig. 6.</p>
          <p>We can now compose the nets modelling the management protocols of the
NodeTypes instantiated in a ServiceTemplate’s topology by interconnecting them
with the above introduced controllers. The composition is quite simple: We just
collapse the open places corresponding to the same requirements/capabilities.
Definition 8. Let S be a ServiceTemplate. We encode S with an open Petri
net ZS = hPS, ISi, where PS = hPS, TS, •·, ·•i, as follows.</p>
          <p>– For each node N in the topology of S, we encode its management protocol
with an open Petri net ZN obtained as shown in Def. 5.
– For each capability c exposed by a NodeTemplate in S, we create an open</p>
          <p>Petri net Zc (acting as its controller) as shown in Def. 7.
– We then compose the above mentioned nets by taking their disjoint union
and merging the places denoting the same requirement r or capability c.
The initial marking of ZS is the union of the markings of the collapsed nets.
For example, Fig. 7 shows the net obtained for the motivating scenario in Sect. 3.</p>
          <p>The Petri net encoding of the management of a ServiceTemplate S, permits
us defining what is a valid plan according to such management. Essentially,
thanks to the encoding of capability controllers and to the way we compose
these controllers with management protocol encodings, the obtained net ensures
that no requirement can be assumed to hold if the corresponding capability
is not provided, and that no capability can be removed if at least one of the
corresponding requirements is assumed to hold. This permits to consider a plan
valid if and only if it corresponds to a firing sequence in the net encoding of S.
Definition 9. Let S be a ServiceTemplate and let ZS = hPS, ISi, with PS =
hPS, TS, •·, ·•i, be the Petri net encoding of S. A sequential plan3 o1o2 . . . om is
valid if and only if there is a firing sequence t1t2 . . . tn in ZS from the initial
marking such that o1 · o2 · . . . · om = λ(t1) · λ(t2) · . . . · λ(tn), where · indicates the
concatenation operator4 and:
λ(t) =
(</p>
          <p>if t denotes a c↑ or c↓transition
o if t denotes a management protocol transition hs, H, o, s0i
It is easy to see now that plan (c) of Fig. 3 is valid since, for instance,
AmazonEC2:Start Container↑ Ubuntu:Install Ubuntu:Start SoftwareContainer↑
Tomcat:Setup Tomcat:Run Tomcat:Configure WebAppRuntime↑ SendSMS:Deploy
SendSMS:Start Forex:Deploy Forex:Start
is a corresponding firing sequence for the Petri net in Fig. 7. Conversely, plans
(a) and (b) in Fig. 3 are not valid as there are no corresponding firing sequences.
Intuitively speaking, (a) is not valid since after firing, for instance,
AmazonEC2:Start Container↑ Ubuntu:Install Ubuntu:Start SoftwareContainer↑</p>
          <p>Tomcat:Setup
3 In Def. 9 we consider sequential plans. A workflow plan is valid if and only if all its
sequential traces are valid.
4 The empty string is the neutral element of ·, hence controllers’ net transitions are
ignored (as λ(t) = when t denotes a c↑ or c↓ transition).
transition Tomcat:Configure cannot be fired. It indeed requires a token in the
Working place, but that place is empty and it is not possible to add tokens to it
without firing Tomcat:Run. On the other hand, (b) is not valid since after firing</p>
          <p>AmazonEC2:Start Container↑ Ubuntu:Install
transition Tomcat:Setup cannot fire. It requires a token in the place denoting the
ServerContainer requirement, but that place is empty and it is not possible to
add tokens to it without firing SoftwareContainer↑, which in turn cannot fire
as it misses a token in the place denoting the Ubuntu’s SoftwareContainer
capability (and no token can be added to such place without firing Ubuntu:Start).</p>
          <p>
            It is important to observe that the correspondence between firing sequences
and valid plans can be exploited for many other purposes besides checking plans’
validity. The effects of a plan on the states of the components of a TOSCA
ServiceTemplate, as well as on the requirements that are satisfied and the
capabilities that are available, can be directly determined from the marking that
is reached performing the corresponding firing sequence. Additionally, various
classical notions in the Petri net context assume a specific meaning in the
context of TOSCA applications. For example the problem of finding whether there
is a plan which achieves a specific goal (e.g., bringing some components of an
application to specific states or making some capabilities available) can be reduced
in a straightforward way to the coverability problem [
            <xref ref-type="bibr" rid="ref18">18</xref>
            ] on the associated Petri
net. Moreover, it is possible to consider as initial marking any other (reachable)
marking so as to analyse maintenance plans (starting from non-initial states)
besides deployment plans. Obviously, the very same properties and techniques
also apply in this case. Finally, the Petri net is reversible [
            <xref ref-type="bibr" rid="ref18">18</xref>
            ] if and only if it is
always possible to (softly) reset the application. This is a very convenient
property, because it guarantees that it is always possible to generate a plan for any
reachable goal from any application state.
5
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Related work</title>
      <p>
        Automating application management is a well-known problem in computer
science. With the advent of cloud computing, it has become even more prominent
because of the complexity of both applications and platforms [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. This is
witnessed by the proliferation of so-called configuration management systems , like
Chef [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] or Puppet [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. These systems provide a domain-specific language to
model the desired configuration for a machine and employ a client-server model
in which a server holds the model and the client ensures this configuration is met.
However, the lack of a machine readable representation of management protocols
of application components inhibits the possibility of automating verification on
components’ configurations and dependencies.
      </p>
      <p>
        A large body of research has been devoted to model interacting systems
by means of finite state machines, Petri nets, and other formal models [
        <xref ref-type="bibr" rid="ref11 ref4">4,11</xref>
        ].
Because of space limitations, we discuss next only the work more closely related
to ours, tailored to to model the behaviour of cloud application management.
      </p>
      <p>
        A first attempt to master the complexity of the cloud is given by the
Aeolus component model [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The Aeolus model is specifically designed to describe
several characteristics of cloud application components (e.g., dependencies,
nonfunctional requirements, etc.), as well as the fact that component interfaces might
vary depending on the internal component state. However, the model only
allows to specify what is offered and required in a state. Our approach instead
allows developers to clearly separate the requirements ensuring the consistency
of a state from those constraining the applicability of a management operation.
This allows developers to easily express transitions where requirements are
affecting only the applicability of an operation and not the consistency of a state
(e.g., the transition hUnavailable, {ServerContainer}, Setup, Stoppedi of the
management protocol MS in Fig. 4). Such a kind of transitions cannot be easily
modelled in Aelous. Furthermore, Aelous and other emerging solutions like Juju
[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and Engage [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], differ from our approach since they are geared towards
the deployment of cloud applications, thus not including also their maintenance.
Additionally, Aelous, Juju, and Engage are currently not integrated with any
cloud interoperability standard, thus limiting their applicability to only some
supported cloud platforms. Our approach, instead, intends to model the entire
lifecycle of a cloud application component, and achieves cloud interoperability
by relying on the TOSCA standard [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>
        To this end, TOSCA offers a rich type system permitting to match, adapt and
reuse existing solutions [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Since our proposal extends this type system, it can
also be exploited to refine existing reuse techniques, like [
        <xref ref-type="bibr" rid="ref22 ref5 ref6">5,6,22</xref>
        ]. Currently, these
techniques are matchmaking and adapting (fragments of) existing
ServiceTemplates to implement a desired NodeType by checking whether the features
of the latter are all offered by the former. To overcome syntactic differences,
ontologies may be employed to check whether two different names are denoting
the same concept. However, these techniques are behaviour-unaware: There is no
way to determine whether the behaviour of the identified (fragment of)
ServiceTemplate is coherent with that of the desired NodeType. Since our approach
permits describing the behaviour of management operations, it can be exploited
to extend the aforementioned techniques to become behaviour-aware.
      </p>
      <p>
        It is also worth highlighting that we could directly compose the finite state
machines specifying management protocols, and model valid plans as the
language accepted by the composite finite state machine. However, the size of the
latter grows exponentially with the number of application components. This
results in a high computational complexity, even if we exploit composition-oriented
automata (e.g., interface automata [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). On the other hand, with open Petri nets
[
        <xref ref-type="bibr" rid="ref14 ref2">2,14</xref>
        ], we have a very simple composition approach, and the exponential growth
only affects the amount of reachable markings (instead of the size of the net). A
simpler composition approach is even more convenient since cloud applications
can change over time. For instance, to add another web service to our
motivating scenario, our approach just requires to add the open Petri net encoding its
management protocol, and to connect the open places denoting its requirement
with the corresponding c↑ and c↓ transitions. On the other hand, with an
automata based approach, the composition would be much harder, as it requires
to compute the Cartesian product of the automatons’ states.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>In this paper we have proposed an extension of TOSCA that permits to specify
the behaviour of management operations of cloud-based applications, and their
relations with states, requirements, and capabilities. We have then shown how
the management protocols of TOSCA components can be naturally modelled, in
a compositional way, by means of open Petri nets, and that such modelling
permits to automate different analyses, such as determining whether a plan is valid,
which are its effects, or which plans allow to reach certain system configurations.</p>
      <p>Please note that, while some of those Petri-net analyses have an exponential
time complexity in the worst case, they still constitute a significant improvement
with respect to the state of the art, where the validity of deployment plans can be
verified only manually, after delving through the documentation of application
components. Please also note that our approach builds on top of, but is not
limited to, TOSCA. It can be easily adapted to other stateful behaviour models
of systems that describe states, requirements, capabilities, and operations.</p>
      <p>
        We see different possible extensions of our work. We are currently working
on a prototype implementation of our approach, which includes a graphical user
interface to support the definition of valid TOSCA specifications that include
management protocols. The graphical user interface will compile the
management protocols of a TOSCA application into a PNML file [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], hence enabling to
plug-in different PNML processing environments (e.g., LoLa, ProM, or WoPeD,
just to mention some) to implement the analyses described in Sect. 4.3. We also
intend to improve the efficiency of the analyses by reducing the complexity of
the nets that is due to the c↑ and c↓ transitions introduced by the controllers.
Indeed the net encoding of a cloud application can be simplified by “folding"
the controllers’ transitions (by modifying the transitions whose input/output
places contain a place representing capability c so that they are replaced by the
places representing the requirements connected to c by means of
RelationshipTemplates). Another interesting direction for future work is to investigate the
applicability of more sophisticated fault diagnosis analyses (like [
        <xref ref-type="bibr" rid="ref16 ref17">16,17</xref>
        ]) to
identify the reasons why a plan may not be valid (besides just showing the points
in which a plan may get stuck, as we currently do). Finally, we want to extend
the matchmaking and adaptation techniques we previously proposed [
        <xref ref-type="bibr" rid="ref22 ref5 ref6">5,6,22</xref>
        ] by
including the behaviour information coming from management protocols (as
illustrated in Sect. 5).
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. de Alfaro,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Henzinger</surname>
          </string-name>
          , T.A.:
          <article-title>Interface automata</article-title>
          .
          <source>In: Proceedings of the 8th European Software Engineering Conference / 9th ACM SIGSOFT International Symposium on Foundations of Software Engineering</source>
          . pp.
          <fpage>109</fpage>
          -
          <lpage>120</lpage>
          . ESEC/FSE-9, ACM (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Baldan</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corradini</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ehrig</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heckel</surname>
          </string-name>
          , R.:
          <article-title>Compositional semantics for open Petri nets based on deterministic processes</article-title>
          .
          <source>Mathematical Structures in Computer Science</source>
          <volume>15</volume>
          (
          <issue>01</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>35</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Billington</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Christensen</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Van Hee</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kindler</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kummer</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Petrucci</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Post</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stehno</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weber</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The Petri Net Markup Language: Concepts, technology, and tools</article-title>
          .
          <source>In: Proceedings of the 24th International Conference on Applications and Theory of Petri Nets</source>
          . pp.
          <fpage>483</fpage>
          -
          <lpage>505</lpage>
          . ICATPN'
          <volume>03</volume>
          ,
          <string-name>
            <surname>Springer</surname>
          </string-name>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bochmann</surname>
            ,
            <given-names>G.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sunshine</surname>
            ,
            <given-names>C.A.</given-names>
          </string-name>
          :
          <article-title>A survey of formal methods</article-title>
          .
          <source>In: Computer Network Architectures and Protocols</source>
          , pp.
          <fpage>561</fpage>
          -
          <lpage>578</lpage>
          . Applications of Communications Theory, Springer (
          <year>1982</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Brogi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soldani</surname>
          </string-name>
          , J.:
          <article-title>Matching cloud services with TOSCA</article-title>
          .
          <source>In: Advances in Service-Oriented and Cloud Computing, CCIS</source>
          , vol.
          <volume>393</volume>
          , pp.
          <fpage>218</fpage>
          -
          <lpage>232</lpage>
          . Springer (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Brogi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soldani</surname>
          </string-name>
          , J.:
          <article-title>Reusing cloud-based services with TOSCA</article-title>
          .
          <source>In: INFORMATIK 2014. LNI</source>
          , vol.
          <volume>232</volume>
          , pp.
          <fpage>235</fpage>
          -
          <lpage>246</lpage>
          . Gesellschaft für Informatik (GI) (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Brogi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soldani</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>TOSCA in a Nutshell: Promises and Perspectives</article-title>
          . In: Villari,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Zimmermann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            ,
            <surname>Lau</surname>
          </string-name>
          , K.K. (eds.)
          <article-title>Service-Oriented and Cloud Computing</article-title>
          .
          <source>LNCS</source>
          , vol.
          <volume>8745</volume>
          , pp.
          <fpage>171</fpage>
          -
          <lpage>186</lpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Buyya</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yeo</surname>
            ,
            <given-names>C.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Venugopal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Broberg</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brandic</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Cloud computing and emerging IT platforms: Vision, hype, and reality for delivering computing as the 5th utility</article-title>
          .
          <source>Future Generation Computer Systems</source>
          <volume>25</volume>
          (
          <issue>6</issue>
          ),
          <fpage>599</fpage>
          -
          <lpage>616</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>9. Chef: Opscode. https://www.opscode.com/chef</mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Di</surname>
            <given-names>Cosmo</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Mauro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Zacchiroli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Zavattaro</surname>
          </string-name>
          , G.:
          <article-title>Aeolus: A component model for the cloud</article-title>
          .
          <source>Information and Computation</source>
          <volume>239</volume>
          (
          <issue>0</issue>
          ),
          <fpage>100</fpage>
          -
          <lpage>121</lpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Diaz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Modeling and analysis of communication and cooperation protocols using Petri net based models</article-title>
          .
          <source>Computer Networks</source>
          <volume>6</volume>
          (
          <issue>6</issue>
          ),
          <fpage>419</fpage>
          -
          <lpage>441</lpage>
          (
          <year>1982</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Fischer</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Majumdar</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Esmaeilsabzali</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Engage: A deployment management system</article-title>
          .
          <source>In: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation</source>
          . pp.
          <fpage>263</fpage>
          -
          <lpage>274</lpage>
          . PLDI '12,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. Juju:
          <article-title>DevOps distilled</article-title>
          . https://juju.ubuntu.com
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Kindler</surname>
          </string-name>
          , E.:
          <article-title>A compositional partial order semantics for Petri net components</article-title>
          .
          <source>In: Proceedings of ICATPN '97</source>
          . pp.
          <fpage>235</fpage>
          -
          <lpage>252</lpage>
          . Springer-Verlag (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Kopp</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Binz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Breitenbücher</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leymann</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Winery - Modeling Tool for TOSCA-based Cloud Applications</article-title>
          .
          <source>In: Proceedings of the 11th International Conference on Service-Oriented Computing</source>
          . Springer (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Lohmann</surname>
          </string-name>
          , N.:
          <article-title>Why does my service have no partners</article-title>
          ? In: Bruni,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Wolf</surname>
          </string-name>
          ,
          <string-name>
            <surname>K</surname>
          </string-name>
          . (eds.)
          <source>Web Services and Formal Methods, LNCS</source>
          , vol.
          <volume>5387</volume>
          , pp.
          <fpage>191</fpage>
          -
          <lpage>206</lpage>
          . Springer (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Lohmann</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fahland</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Where did I go wrong? In: Business Process Management, LNCS</article-title>
          , vol.
          <volume>8659</volume>
          , pp.
          <fpage>283</fpage>
          -
          <lpage>300</lpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Murata</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Petri nets: Properties, analysis and applications</article-title>
          .
          <source>Proceedings of the IEEE</source>
          <volume>77</volume>
          (
          <issue>4</issue>
          ),
          <fpage>541</fpage>
          -
          <lpage>580</lpage>
          (
          <year>1989</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. OASIS:
          <article-title>Topology and Orchestration Specification for Cloud Applications</article-title>
          . http: //docs.oasis-open.
          <source>org/tosca/TOSCA/v1.0/TOSCA-v1.0</source>
          .
          <string-name>
            <surname>pdf</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20. OASIS:
          <article-title>TOSCA Simple Profile in YAML</article-title>
          . http://docs.oasis-open.org/tosca/ TOSCA-Simple-Profile-YAML/
          <year>v1</year>
          .
          <article-title>0/TOSCA-Simple-Profile-YAML-v1.0</article-title>
          .
          <string-name>
            <surname>pdf</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21. Puppet:
          <article-title>Puppet labs</article-title>
          . https://puppetlabs.com
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Soldani</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Binz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Breitenbücher</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leymann</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brogi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>TOSCA-MART: A method for adapting and reusing cloud applications</article-title>
          .
          <source>Tech. Rep</source>
          ., University of Pisa (March
          <year>2015</year>
          ), http://eprints.adm.unipi.it/2331/1/SBBLB15_-_TR.pdf
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>