<!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>Towards Pattern-Based Optimization of Cloud Applications?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Martin Fleck</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Javier Troya</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Philip Langer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manuel Wimmer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Vienna University of Technology, Business Informatics Group</institution>
          ,
          <country country="AT">Austria</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>With the promise of seemingly unlimited resources and the flexible pay-as-you-go business model, more and more applications are moving to the cloud. However, to fully utilize the features offered by cloud providers, the existing applications need to be adapted accordingly. To support the developer in this task, different cloud computing patterns have been proposed. Nevertheless, selecting the most appropriate patterns and their configuration is still a major challenge. This is further complicated by the costs usually associated with deploying and testing an application in the cloud. In this paper, we encode the pattern selection problem as a model-based optimization problem to automatically compute good solutions of configured pattern applications. Particularly, we propose a two-phased approach, which is guided by user-defined constraints on the non-functional properties of the application. In the first phase, a preliminary set of promising solutions is computed using a genetic algorithm. In the second phase, this set of solutions is evaluated in more detail using model simulation. We demonstrate the proposed approach and show its feasibility by an initial case study.</p>
      </abstract>
      <kwd-group>
        <kwd>Cloud Computing</kwd>
        <kwd>Goal Modeling</kwd>
        <kwd>Model Simulation</kwd>
        <kwd>Genetic Algorithm</kwd>
        <kwd>Cloud Computing Patterns</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The seemingly unlimited resource offerings and the flexible pay-as-you-go business
model are, amongst others, the main driver of the adoption of the cloud computing
paradigm. As a result, many different cloud providers have emerged. This has also
sparked a major interest in the migration of existing applications to the cloud [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
Besides the cloud provider selection, adapting the application to make the best out of the
cloud provider offerings is often very challenging. Cloud computing patterns [
        <xref ref-type="bibr" rid="ref13 ref18 ref6">6, 13, 18</xref>
        ]
have been introduced as cloud provider-independent solutions to reoccurring problems
in cloud computing. Developers can use these patterns in their design decisions and
operationalize them in the context of a specific cloud provider. This step, however, requires
detailed insight of the software architecture, the cloud computing paradigm, the
offerings of specific cloud providers, and the usage of the given application. Furthermore,
the developers have to deal with a possibly infinite search space of pattern applications
and a solution has to satisfy multiple, probably conflicting, objectives [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
? This work is co-funded by the European Commission under the ICT Policy Support
Programme, grant no. 317859.
      </p>
      <p>In this paper, we present a model-based approach aimed to support developers in
selecting the most appropriate cloud patterns and their configurations. Particularly, the
approach consists of two phases and is guided by user-defined constraints on the
nonfunctional properties of the application. In the first phase, a preliminary set of promising
solutions is computed using a multi-objective genetic algorithm which uses estimates
to determine the fitness of a solution due to the huge search space. In the second phase,
this set of solutions is evaluated in more detail using model simulation to better support
the final decision by the user, i.e., selecting the most appropriate solution.</p>
      <p>The rest of the paper is organized as follows. In Section 2, we describe our proposed
approach as well as the necessary input from the stakeholders. Section 3 showcases the
applicability of our approach in a case study, while Section 4 discusses related work.
The paper concludes in Section 5 with an outlook on future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Approach</title>
      <p>The central aim of our approach is to find a configuration of patterns that best satisfies
the needs of the application stakeholder, i.e., the reason why the application is moved to
the cloud in the first place. We therefore provide the stakeholder with a goal modeling</p>
      <p>Goals
language that is capable to express these needs in terms of non-functional properties
(NFPs). BaOsriegidnal on theseEvogluotioanlasry, we apFpinreo-garacinhedthe paCttloeurdnifiedselection problem with two
subsequenAtppslitceatpiosn, as shoEwxpnloriantionFigure 1E.vIanluattihone first sAtepppli,caatiomnulti-objective evolutionary
algorithm is used to calculate a preliminary set of good solutions. A solution is a set of
configured cloud optimNizFPa-tInioflunenpceatterns andCloeuvdaluated based on estimates on how certain
patterns impact propertieEsstoimfattehs e applicatiPoatntesrn.sIn the second step, each solution returned
by the evolutionary algorithm is additionally ranked based on the more detailed analysis
performed by model simulation. The resulting ranked set of solutions together with their
approximated success to fulfill the goals is then presented to the stakeholders.</p>
      <p>Original
Application</p>
      <p>Evolutionary
Exploration</p>
      <p>CClolouuddifiifeiedd
Cloudified
Applicaatitoionn
AApppplilcication</p>
      <p>Fine-grained
Evaluation</p>
      <p>Cloudified
Application
[ranked]
Goals</p>
      <p>NFP-Influence</p>
      <p>Estimates</p>
      <p>Cloud Pattern</p>
      <p>Templates
Goal modeling originally stems from early phases of requirements engineering, where
a goal is an objective for the system from the perspective of a stakeholder. In the goal
modeling language we provide, the goals are based on a set of (non-functional)
properties. More concretely, a goal defines a target value or target range for a specific property
in the context of the software application, e.g., the response time of a request or the
utilization of a specific component. These target values must be set in the range of the
property under consideration, e.g., utilization can only take floating point values
between zero and one. Each goal must be set into the context of a specific workload or
usage scenario, as it is not feasible to show that a goal holds in all possible cases.
Furthermore, the importance of a goal is given by a numeric priority, whereby a smaller
9
Problem The same entities are Not all day-to-day user Not all user requests can be handled due to a lack of resources.
retrieved multiple requests can be handled However, the resource demand changes often resulting in low times
times from the due to a lack of resources. and high peaks.</p>
      <p>database.</p>
      <p>Effect The frequently- Deploy multiple instances Start with a certain number of nodes and dynamically adjust the
accessed entities are of one node to provide number depending on certain monitored properties, thus providing
stored in a Cache, more resources. more resources only if necessary.
improving the
retrieval of data
(reads).</p>
      <p>Caching Horizontal Scaling
Problem: The same entities Problem: Not all day-to-day Problem: Not all user requests
are retrieved multiple times user requests can be handled can be handled due to a lack of
from the database. due to a lack of resources. resources. However, the
iaEncffcaeecCst:saeTcdhheee,nfirmteitqipeursoevnaitrnleyg-stthoered itEnofsfpetarcont:vciDedseepomlfoooyrnemeruenltsoiopduleer/cseesrv.ice rrpeeessaoukultsirn.cge idnelmowantidmcehsaanngdeshiogfhten
rTeetmriepvlaatleo:f data (reads). TemHpolartiez:ontal Scaling ndEuyffnmeacbmte:irScoatafllryntoawddietjhussaatncthdeertaniunmber
ApplicatCiaocnh:e Entity ANprpIlnisctaatnicoens::  SIenrtv[i2c,e∞] rdperesopopeuenrrdctieienssg,ootnhnluycsiefprnrtaoeivcniedmsinsoganrmiyt.oorreed
number indicates a higher priority. Summarizing, we consider goals to be Boolean
conditions concerning NFPs in the context of a software system under a specific workload
with a user-defined priority.</p>
      <p>Example: The most important objective (priority 1) is that the average response time
of a log in-request is less than 2 seconds when ten users log in at the same time.</p>
      <sec id="sec-2-1">
        <title>2.2 Cloud Computing Patterns</title>
        <p>
          Cloud computing patterns provide a generic solution to a reoccuring problem in a
specific context in the cloud computing domain and need to be concretized by the developer
when used. In the ARTIST project [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] we have collected over 30 of these cloud
computing patterns from different sources [
          <xref ref-type="bibr" rid="ref13 ref18 ref6">6, 13, 18</xref>
          ]. In this work we focus on patterns that
are applied in order to optimize the properties of an application that is to be deployed
on the cloud. We therefore assume that the base architecture of the application is
already suitable for the cloud and no major architectural refactorings need to be done. To
use the informally described patterns in our approach, we translate them into so-called
pattern templates, which specify where the pattern can be applied and how it can be
configured. Figure 2 shows a small excerpt of the collected patterns and the resulting
pattern templates.
        </p>
        <p>Caching can be applied on any entity class that is persisted in a datastore, while
scaling can be applied on any service class. In horizontal scaling, the number of instances of
a service is fixed from the beginning and can range from two instances to a theoretically
unlimited number of instances – in practice this number is limited by the specific cloud
provider. By contrast, auto-scaling provides a lower and upper bound on the number
of instances, and the actual number is adapted during the application runtime based on
the value of the ScalingVariable and the two variable-specific scaling thresholds. If the
value of the variable is less or equal than the specified ScaleInThreshold, one service
instance is removed; if the variable value is greater or equal than the
ScaleOutThreshold, an additional instance is created. Any numerical variable which can be evaluated
during runtime can serve as auto-scaling variable, e.g., utilization.</p>
        <p>When applying a cloud computing pattern in a concrete use case, we create an
instance of the respective pattern template, i.e., we provide concrete values for all the
parameters defined in the template. The set of the concrete values for a pattern is called
a pattern configuration. Each applied pattern configuration has an impact on the
(nonfunctional) properties of the system. This impact is usually specific to the software
system. Estimations about the gained impact on the properties may be gained from
more detailed pattern descriptions, experience, and cloud benchmarking services. An
example can be found in Table 1.
8
2.3</p>
      </sec>
      <sec id="sec-2-2">
        <title>Evolutionary Algorithms</title>
        <p>
          The aim of our approach is to select a sequence of pattern applications that satisfies the
goals modeled by the stakeholder. The pattern selection problem consists of a possibly
infinite search space of configurations and a solution has to satisfy multiple, probably
conflicting, objectives [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. We therefore categorize our problem as a multi-objective
combinatorial optimization (MOCO) problem, for which several methods have been
discussed in the literature (cf. [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]). For our approach, we choose an evolutionary
algorithm for the pattern selection problem, namely the nondominated sorting genetic
algorithm II (NGSA-II) [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], guided by the estimated impact of a pattern on the NFPs.
        </p>
        <p>Search Space. The search space consists of all possible patterns configurations as
defined by the pattern templates and may be infinite, e.g., when considering floating point
values. Therefore it is not possible to produce the complete search space in advance,
but rather generate new random configurations based on the templates, if necessary.</p>
        <p>Solution Space. A genetic algorithm maintains a set of solutions, called a population,
and deploys selection, re-combination, and mutation operators to improve the quality of
the solutions in the population in each iteration. In our approach, a (candidate) solution
is a selected sequence of pattern configurations. To ensure the validity of candidate
solutions, solution constraints requiring domain knowledge about the different patterns
can be used to specify how configurations can be combined. As an example, it makes
no sense to apply both, horizontal scaling and auto-scaling, on the same service, thus a
constraint classifying such a solution as invalid may be specified. One drawback when
using NSGA-II is that the length of the solution (n) must be fixed in advance, i.e.,
the number of pattern configurations appearing in a solution. To allow the calculation
of solutions with less or equal than n pattern configurations, we introduce a pattern
configuration placeholder, which may take one or more places in the solution, but has
no influence on any of the NFPs.</p>
        <p>Objective Space. To evaluate the quality (fitness) of a solution, the solution needs to
be mapped to the objective space. In multi-objective optimization, this objective space
consists of multiple dimensions, each dimension referring to one objective. Usually
these objectives are competing, so that no single point in the objective space exists
that dominates all other points, resulting in a set of optimal solutions. In our approach,
the objective space is not pre-defined, but specified by the stakeholder implicitly by
defining the goals. Each property that has a goal specified upon is one dimension in the
objective space that needs to be evaluated. The evaluation of a solution candidate for
each of these dimensions in the objective space is done by a so-called fitness function.
This fitness function guides the algorithm into good areas of the solution space.</p>
        <p>Fitness. We define the fitness of a solution in a specific dimension to be the sum of
the weighted, relative distance between the property value resulting from applying the
solution and the target value or target range set by the user for each goal of this property.
The relative distance of a goal is the difference between the resulting property value and
the user-defined target value or target range in relation to the target value or range. For
target ranges, the mean of the range is taken as target value, however a fulfilled goal
always results in a relative distance of zero. An additional penalty (weight) for each
goal that has not been achieved is calculated by multiplying the relative distance with
the proportional goal priority, resulting in a higher penalty for higher priority goals. The
goal of the algorithm is to find a solution that minimizes the fitness values.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.4 Model Simulation</title>
        <p>
          Running NSGA-II gives us a set of solutions which form the Pareto front from the
previously infinite solution space. These solutions can be evaluated in more detail using the
more execution expensive, but also more precise, model simulation. For this, we build
on our previous work [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] that is based on graph transformations supported by the
eMotions framework [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. By using e-Motions, we run the modeled system and perform
a more detailed evaluation also considering additional properties such as the contention
of resources. The results from the model simulation are used to rank the solution set
calculated by NSGA-II. The ranked solution set together with the approximate success
of each solution to fulfill the goals is then presented to the stakeholders for the final
decision about which configurations of the cloud computing patterns should be applied.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>The Petstore Case Study</title>
      <p>In this paper, we show the applicability and feasibility of our approach based on the
Petstore case study. The case study is executed with the Java prototype we have developed
using the NSGA-II implementation provided by the MOEA Framework1. The Petstore
is a small web application allowing potential customers to create an account, log into
this account, and order pets from a pre-defined pet catalogue. Previously the Petstore
has been running on the local web server of the company, however now the company
wants to move the Petstore application to the cloud to improve scalability and reduce
cost. The Petstore architecture is realized with three entity classes and five services.</p>
      <p>Entity Classes. The Petstore application maintains three entity classes, namely Item,
Customer, and Order. All products in the Petstore are stored in the form of an item
entity. Customers can create an account at the Petstore, log in, search for items, and
place orders. An order consists of the registered contact information of a customer as
well as the items and the quantity the customer has put into the shopping cart. Available
service functionality is depicted in Figure 3, as explained later.</p>
      <p>Services. Internally the Petstore uses different services to provide the necessary
functionality to customers. The Application Service is the only service that a customer
directly interacts with. It uses the Customer Service, Catalog Service and Order Service
to handle the customer data, item data, and order data, respectively. All of these three
services use the Entity Service to handle the persistence and the retrieval of data from a
permanent data store.</p>
      <sec id="sec-3-1">
        <title>3.1 Setup</title>
        <p>Patterns. For this case study, we select the three patterns already introduced in
Section 2.2: Caching, Horizontal Scaling, and Auto-Scaling. Considering the application
conditions, caching can be applied on any of the three entity classes, while scaling can
be applied on any of the five service classes. We assume that both scaling patterns
improve performance (the more instances, the faster they process data) and worsen cost
(each instance is billed by the cloud provider). Estimations about the gained speedup or
utilization can be partially retrieved from a more detailed pattern description, but can
also be gained from experience or dedicated cloud benchmarking services. Pricing
information can be gathered from the website of the specific cloud provider. The resulting
estimated impact for each pattern is summarized in Table 1.
1 MOEA Framework, Version 2.1: http://moeaframework.org/
: Client</p>
        <p>«Service»
: ApplicationService</p>
        <p>«Service»
: CustomerService</p>
        <p>«Service»
: CatalogService</p>
        <p>«Service»
: OrderService</p>
        <p>«Service»
: EntityService
login(login, pw)</p>
        <p>id =
login(login, pw)
findItem(name)</p>
        <p>item =
findItem(name)
addItemToCart</p>
        <p>(id, item)
confirmOrder(id)
login(login, pw)
customer =
login(login, pw)</p>
        <p>findAllCustomers()
customer = findAllCustomers()
findItem(name)
item = findItem(name)</p>
        <p>findAllItems()
allItems = findAllItems()
addItemToCart(customer, item)
confirmOrder(customer)
persist(cart)
persist(order)
Caching Price per TimeUnit Fig. 3. The Petstore0.S00c1e5nario Workload</p>
        <p>SpeedUp Item
scalability, or more precisely, to reduce the o(revaedrsa).ll cost and improve the respSopneseedUtpimCuestomer 3.0000
of customer requests and the utilization of different services. Cost and responsSepteiemdUepaOrreder
both prHoopriezorntitaels Nwothailcldhayc-aton-dahyauvseervreaqluueesstsicnantheDreapnlogyemoulftip[l0e:in0s;tance],s wof iotnhe anoldoewtoer value being
1</p>
        <p>Scaling be handled due to a lack of resources. provide more resources.
considered better than a higher value. Utilization has a value range of [0:0;P1ri:c0e]pewrTitimheUnit</p>
        <p>
          Auto- Not all user requests can be handled Start with a certain number of nodes and and service
neitherSlcoawlinger vadulueetosanlaocrk ohfirgeshoeurrcevsa. lHuoewsevbeer,ingdycnalemaicrallyly abdejutsttetrh,e mnuamkbienrgdepuetnidliinzgatioinnsstaunicteasble
for a target rangtheeirnessoteuracdedoefmaansdicnhgalnegetsaorfgteent vaolnucee.rtTaionomolnoitworeudtpilroizpearttiieosn,thcuasn suggest an idle
resulting in low times and high peaks. providing more resources only if necessary.
resource, which produces cost and brings no benefit. Too high utilization can indicate an
overloaded resouCracceh,e resulting in a slower performance or a situc1at=i oCnacwheh(Ietreem)consumers
of the aApppplliiccaattiioonn: aEnrteitnyoCtlassesrved.
h1 = HorizontalScaling(Orderservice, 2)
In this case study we assume that the following goals shohuld
2 = HobreizofnutlafilSllceadlinwg(iEtnhtiintyService, 4)
the contextHoorfiztohnetaPl eStcsatloirneg scenario. The application of a propae1 r=t yAuitsoSincadliicnag(teCudstboymertSheervice, 3, 6, 
Utilization, 0.6, 0.9)
propertAyppnliacmateioann: dSetrhveicaepplied element in parenthesis, an asterisk (*) marks the whole
...
applicaNtriIonns.taTnchees:p rIinot[r2it,y∞o]f a goal is given in square brackets after the condition.
c2 = Cache(Order)
Goal 3: 0.15 &lt;= Utilization(EntityService) &lt;= 0.25 [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]
Goal 4: 0.15 &lt;= Utilization(CustomerService) &lt;= 0.25 [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
6
        </p>
        <p>Auto‐Scaling
Application: Service
MinInstances: Int[1, ∞
MaxInstances: Int[1, ∞
ScalingVariable: Varia
ScaleInThreshold: Real
ScaleOutThreshold: Rea</p>
        <p>NSGA-II Configuration. As mentioned in the previous section, genetic algorithms
use selection, re-combination, and mutation operators to evolve the population into a
good area of the solution and thus objective space. For selecting candidate solutions,
we use a so-called tournament selection strategy, which takes n random candidate
solutions from the population and allows the best one to be considered for re-combination
(in our case, n = 4). Two candidate solutions are re-combined into two new
candidate solutions by means of a single point crossover operator. This operator splits each
solution at a random point into two parts and merges the first part of the first solution
with the second part of the second solution and vice versa. After re-combination the
validity of the resulting solutions is checked and mutation can take place. Invalid
solutions are given the worst possible fitness and should eventually be removed from the
population. Mutation occurs at a low rate (1.5%) in a solution and changes one of the
pattern configurations concrete values slightly. In our case, this means that each
parameter of a pattern configuration has a slight chance of being modified, e.g., the number
of instances for horizontal scaling. Furthermore, we define a solution length of eight, as
there are only eight classes on which at most one pattern can be applied. The algorithm
should maintain 200 solutions per population and continue for at most 1000 iterations.</p>
        <p>Fitness Function. To evaluate the quality of the solutions produced by the NSGA-II,
we need to provide values for response time, cost and utilization by incorporating the
impact estimations. As the fitness function is executed many times, we use a very simple
model analysis technique, which may not be very precise, but is very fast to execute.
First, we retrieve the configured number of instances for each of the services. Then
we execute the scenario for all requests and services and calculate the runtime of each
service by summing up the reduced execution times (original execution time divided by
number of instances) of each operation call that has been made to this service during the
execution. The sum of all operation executions is the total runtime of the application.
Each request is seen as independent and no contention of resources is considered. Based
on the runtime, we calculate both the utilization and the cost for each service using the
provided pricing and speedup information. The resulting response time for each request
is the total runtime divided by the number of requests.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 Results</title>
        <p>After running the NSGA-II algorithm, we are faced with 3 solutions, one of which is
depicted in Figure 4. On this set of solutions, we run the model simulation as described
in Section 2.4 to gain more detailed information about how close the solutions are to
fulfilling the goals set by the user. For this, we need to define a metamodel and
behavioral in-place rules that model the system at runtime. For each solution, an instance
of this metamodel containing the applied patterns must be created and executed. The
result of the model simulation is shown in Table 2. The first line presents the original
configuration (no patterns applied), while the other three have some patterns applied.
The left-hand side of the table shows the values for the NFPs of interest, while the
middle part shows the distance to each goal, and the right-hand side displays the overall
distance to the goals and the rank of the solutions.</p>
        <p>Regarding the solutions, (1) and (2) use four patterns, while (3) uses three. Solution
(1) auto-scales the Entity Service and the Application Service depending on the queue
length. The first service ranges between 3 and 7 instances, while the second one does
«Entity»
«Cache»
Item</p>
        <p>«Service»
«HorizontalScaling»
{ NrInstances = 4 }</p>
        <p>EntityService</p>
        <p>«Service»
«AutoScaling»
{ MinInstances = 2, MaxInstances = 4, </p>
        <p>ScalingVariable = QueueLength, 
ScaleInThreshold = 3, ScaleOutThreshold = 7 }</p>
        <p>CustomerService
«Entity»
«Cache»
Item</p>
        <p>«Service»
«Service» «AutoScaling»
«HorizontalScaling» { MinInstances = 2, MaxInstances = 4, 
{ NrInstances = 4 } ScalingVariable = QueueLength, </p>
        <p>EntityService ScaleInThreshold = 3, ScaleOutThreshold = 7 }</p>
        <p>CustomerService
«PlaceHolder»
«PlaceHolder» ...
between 1 and 4. Solution (1) also has horizontal scaling for Customer Service and
Order Service, with two instances for each one. Solution (2) auto-scales the Order Service
depending on the queue length between 1 and 4 instances, and it also applies horizontal
scaling in the Entity Service and Customer Service, with 4 and 3 instances, respectively.
Caching on Item is applied as well. Finally, Solution (3), also depicted in Figure 4,
applies caching on Item and horizontal scaling for Entity Service with 4 instances. It
auto-scales the Customer Service between 2 and 4 instances depending on the queue
length.</p>
        <p>While we have a clear ranking according to the model simulation and the calculated
distances, we still provide the user with all possible solutions and their detailed
evaluation values to allow additional human reasoning. A user could still decide to apply
solution (1) instead of the other solutions if she wanted the utilization of the Entity
Service to be closer to the smallest target value or she could also decide to apply solution
(3) instead of solution (2), because cost may still be the driving factor of the migration.
Despite the ranking, we can note that none of the solutions is surprising and they
probably could have been found by an expert using the estimated impact on the patterns and
the knowledge about the system execution. However, we assume that with a more
complex application and a higher number of goals and/or patterns, the manual derivation of
solutions becomes harder.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>
        In software engineering, patterns are important ingredients to document knowledge on
how to solve reocurring problems since the well-known book by the Gang of Four [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
describing patterns in the context of object-oriented design. With the appearance of the
cloud computing paradigm, the community has already started working on cloud
computing patterns [
        <xref ref-type="bibr" rid="ref13 ref18 ref6">6, 13, 18</xref>
        ]. For our approach, we studied different pattern descriptions,
created pattern templates, and estimated the effect of each pattern on the different NFPs.
      </p>
      <p>
        Optimization techniques are used to solve a variety of different problems [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
Research in metaheuristics for combinatorial optimization problems aims to optimize
the techniques applied in evolutionary algorithms [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. At the same time, the focus
of research has shifted from being rather algorithm-oriented to being more
problemoriented [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. This is also reflected in the emerging search-based software engineering
6
paradigm [
        <xref ref-type="bibr" rid="ref10 ref12">10, 12</xref>
        ], which considers cloud computing as one of its application fields to
tackle several multi-objective optimization problems [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Furthermore, the
combination of model-driven engineering with search-based techniques is also investigated in
several studies [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Following this path, we have applied a specific genetic algorithm
to our optimization problem. To the best of our knowledge, there is only one prior
work that applies optimization techniques to come up with an optimal configuration of
a cloud application. In [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], the authors also use a combination of multi-objective search
and simulation for finding an optimal deployment strategy for a given set of
components of an application. In our approach, we go one step further and aim to optimize not
only the deployment of the components, but also the usage of cloud computing patterns
that are applicable on class-level granularity, what is of major interest when moving to
PaaS providers.
      </p>
      <p>
        An orthogonal optimization of cloud applications is targeted in the MODAClouds2
and Passage3 projects, where the multi-cloud deployment of applications is studied by
the application of the models@runtime notion [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Our approach currently does not
foresee any support for the multi-cloud deployments, but may be extended by additional
patterns supporting such scenarios as well in the future.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and Future Work</title>
      <p>In this paper we have introduced a pattern-based optimization approach for cloud
applications. We follow a model-based approach to select configurations of cloud
optimization patterns that satisfy some restrictions in terms of non-functional properties, and we
determine the best configuration using model simulation.</p>
      <p>Currently, our approach faces some limitations, some of which we want to address
in the future. First of all, we have assumed that the base architecture is suitable for
the cloud. This might not be the case for all applications and additional architectural
refactoring patterns may be applied before our approach. Also, the simulation of the
results through e-Motions is not straightforward as we need to create a new meta-model
for each system the approach is applied upon. Furthermore, e-Motions presents some
scalability issues when the models to be simulated grow in size. Other simulation tools
might not have these drawbacks and might be more easy to use. For now, we have not
evaluated the scalability of our approach in detail. More use cases, also industrial-sized
use cases, need to be evaluated to experiment with more complex patterns as well as a
larger number of patterns, goals, and trade-offs involved. Regarding the input, we need
initial estimates on the impact a pattern has on an application. It may prove difficult to
get these estimates manually from experts. Automation support based on benchmarks,
partial application execution or log analysis could be integrated to support the user in
collecting the estimates.</p>
      <p>In the paper we have presented a proof-of-concept of our approach, from which we
will address several future lines of work next. Firstly, we will apply benchmarks to
measure the improvement associated with optimization patterns in large-scale applications
provided as use cases in the ARTIST project. Secondly, we also plan to consider more
optimization patterns from our catalogue, as well as study their influence after the
ap2 MODAClouds: http://www.modaclouds.eu/
3 Passage: http://www.paasage.eu
plication is deployed on the cloud. This would allow us to evaluate the feasibility and
scalability of our approach in a more realistic setting. Thirdly, we plan to extend our
goal modeling language to represent NFPs that are not taken into account in the current
version, such as security properties. Finally, we plan to further study the application
of different evolutionary algorithms for selecting the best configuration of optimization
patterns.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bergmayr</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Brunelie`re, H.,
          <string-name>
            <surname>Canovas</surname>
            <given-names>Izquierdo</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>J.L.</given-names>
            ,
            <surname>Gorronogoitia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Kousiouris</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Kyriazis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Langer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Menychtas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Orue-Echevarria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Pezuela</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Wimmer</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Migrating Legacy Software to the Cloud with ARTIST</article-title>
          .
          <source>In: Proc. of CSMR</source>
          . pp.
          <fpage>465</fpage>
          -
          <lpage>468</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Blum</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Puchinger</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raidl</surname>
            ,
            <given-names>G.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roli</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Hybrid metaheuristics in combinatorial optimization: A survey</article-title>
          .
          <source>Applied Soft Computing</source>
          <volume>11</volume>
          (
          <issue>6</issue>
          ),
          <fpage>4135</fpage>
          -
          <lpage>4151</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Coello</surname>
            ,
            <given-names>C.A.C.</given-names>
          </string-name>
          :
          <article-title>A Comprehensive Survey of Evolutionary-Based Multiobjective Optimization Techniques</article-title>
          .
          <source>Knowl. Inf. Syst</source>
          .
          <volume>1</volume>
          (
          <issue>3</issue>
          ),
          <fpage>129</fpage>
          -
          <lpage>156</lpage>
          (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Deb</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pratap</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agarwal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meyarivan</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II</article-title>
          .
          <source>Trans. Evol. Comp</source>
          <volume>6</volume>
          (
          <issue>2</issue>
          ),
          <fpage>182</fpage>
          -
          <lpage>197</lpage>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ehrgott</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gandibleux</surname>
            ,
            <given-names>X.:</given-names>
          </string-name>
          <article-title>A survey and annotated bibliography of multiobjective combinatorial optimization</article-title>
          .
          <source>OR-Spektrum</source>
          <volume>22</volume>
          (
          <issue>4</issue>
          ),
          <fpage>425</fpage>
          -
          <lpage>460</lpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Fehling</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leymann</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Retter</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schupeck</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arbitter</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          : Cloud Computing Patterns: Fundamentals to Design, Build, and Manage Cloud Applications. Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Ferry</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rossini</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chauvel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Solberg</surname>
            ,
            <given-names>A.: Towards</given-names>
          </string-name>
          <string-name>
            <surname>Model-Driven</surname>
            <given-names>Provisioning</given-names>
          </string-name>
          , Deployment, Monitoring, and
          <article-title>Adaptation of Multi-cloud Systems</article-title>
          .
          <source>In: Proc. of CLOUD</source>
          . pp.
          <fpage>887</fpage>
          -
          <lpage>894</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Frey</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fittkau</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hasselbring</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          :
          <article-title>Search-based genetic optimization for deployment and reconfiguration of software in the cloud</article-title>
          .
          <source>In: Proc. of ICSE</source>
          . pp.
          <fpage>512</fpage>
          -
          <lpage>521</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Helm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Johnson, R.,
          <string-name>
            <surname>Vlissides</surname>
          </string-name>
          , J.: Design Patterns:
          <article-title>Elements of Reusable Object-Oriented Software</article-title>
          .
          <string-name>
            <surname>Addison-Wesley Professional</surname>
          </string-name>
          ,
          <volume>1</volume>
          <fpage>edn</fpage>
          . (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Harman</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The current state and future of search based software engineering</article-title>
          .
          <source>In: Proc. of ICSE</source>
          . pp.
          <fpage>342</fpage>
          -
          <lpage>357</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Harman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lakhotia</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Singer</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>White</surname>
            ,
            <given-names>D.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yoo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Cloud engineering is search based software engineering too</article-title>
          .
          <source>Journal of Systems and Software</source>
          <volume>86</volume>
          (
          <issue>9</issue>
          ),
          <fpage>2225</fpage>
          -
          <lpage>2241</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Harman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mansouri</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
          </string-name>
          , Y.:
          <article-title>Search-based software engineering: Trends, techniques and applications</article-title>
          .
          <source>ACM Comput. Surv</source>
          .
          <volume>45</volume>
          (
          <issue>1</issue>
          ),
          <volume>11</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>11</lpage>
          :
          <fpage>61</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Homer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sharp</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brader</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Narumoto</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications</article-title>
          . Microsoft Patterns &amp;
          <string-name>
            <surname>Practices</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Kessentini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Langer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wimmer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Searching models, modeling search: On the synergies of SBSE and MDE</article-title>
          .
          <source>In: Proc. of CMSBSE@ICSE</source>
          . pp.
          <fpage>51</fpage>
          -
          <lpage>54</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Rivera</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duran</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vallecillo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A graphical approach for modeling time-dependent behavior of DSLs</article-title>
          .
          <source>In: Proc. of VL/HCC</source>
          . pp.
          <fpage>51</fpage>
          -
          <lpage>55</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Troya</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vallecillo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duran</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zschaler</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Model-driven performance analysis of rulebased domain specific visual models</article-title>
          .
          <source>Inf. and Soft. Technology</source>
          <volume>55</volume>
          (
          <issue>1</issue>
          ),
          <fpage>88</fpage>
          -
          <lpage>110</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>West</surname>
            ,
            <given-names>D.M.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Saving Money Through Cloud Computing. Brookings Institution</surname>
          </string-name>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Wilder</surname>
            ,
            <given-names>B.: Cloud</given-names>
          </string-name>
          <string-name>
            <surname>Architecture Patterns. O'Reilly</surname>
          </string-name>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Zitzler</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Deb</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thiele</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Comparison of Multiobjective Evolutionary Algorithms: Empirical Results</article-title>
          .
          <source>Evolutionary Computation</source>
          <volume>8</volume>
          ,
          <fpage>173</fpage>
          -
          <lpage>195</lpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>