Skip to content

SPACE4Cloud short tutorial

miciav edited this page Oct 13, 2015 · 15 revisions

SPACE4Cloud short tutorial

Objective of this tutorial

Cloud Computing is assuming a relevant role in the ICT world, changing the way applications are designed, developed, and operated.

The cloud offers many useful services which application developers and operators can rely upon, but the adoption of such services requires specific expertise. As a matter of fact, given the heterogeneous technology offer and the pricing models currently available in the cloud market it is extremely complex and time consuming to design a cloud application choosing the most suitable services in order to fit functional and non-functional requirements while providing the best Quality of Service (QoS) and costs trade-offs Such situation calls for an integrated approach and special tools to guide designers, developers and operators through the adoption of specific cloud solutions. Within the framework of MODAClouds EU FP7 project, we propose, following the directives of Model-Driven Engineering, a state-of-the-art IDE (Creator 4Clouds) to design, by means of three levels of meta-models, a cloud application both in terms of architecture (components, interfaces, relationships) and QoS, expressing cloud-specific attributes and constraints. Among other things, such models include architectural and QoS constraints (e.g., VM utilisation or average application response time are lower than given thresholds), and a user-defined workload [detailed here], necessary to assess both performance and cost of the application under different load conditions.

Creator 4Clouds seamlessly interfaces with SPACE 4Clouds, the tool this tutorial focuses on, which has been specially designed for the assessment and optimisation of QoS characteristics for Cloud applications. It allows software architects to analyse and optimise cloud applications during the early stages of design and implementation. Internally it employs performance models and and a metaheuristic engine to explore the space of cloud service alternatives seeking for the configuration that minimises the leasing costs of resources while meeting the QoS requirements.

These two tools, used together, represent a powerful Decision Support System at the service of the application designer, allowing him/her to make informed decisions and, ultimately, save time and money.

Space4Cloud installation

Space4Cloud is implemented as an Eclipse plugin running atop Palladio Bench. It requires the installation of external libraries and solvers. The reader can refer to this short installation guide to install it.

Alternatively, SPACE4Cloud, Creator 4Clouds, Eclipse, Palladio and all the other components have been dockerized and can be quickly installed following this wiki.

Case study: MiC Application

MiC is a web application for social networking that allows the user to profile his/her topics of interest and to share them with similar users. Moreover, MiC identifies the most similar users in the network according to the registered users’ preferences. More specifically, during the registration process, the new user selects her topics of interest from a set of alternatives, providing a preference for each of them in the range 1 to 5. At the end of the registration, MiC calculates the Pearson coefficient based on the preferences expressed, identifies the users in the system with the most similar interests, and creates a list of contacts for the newcomer.

After the registration process, the user can log in into the MiC portal and interact with her Best Contacts by writing and reading posts on the selected topics. Users can also change their interests refining their profiles; in this case the system reacts re-evaluating the similarity and updating the list of recommended contacts. The application comprises two components deployed on the same tier, a Frontend to process the incoming http requests and a Backend running a Mysql database to stores users’ profiles, messages, and best contacts lists. In the rest of this tutorial the extended Palladio model for Mic application are used. Such model can be downloaded here.

Short usage tutorial

Space 4Clouds can be used in two main ways: to analyse the application architecture modelled in Creator 4Clouds and derive performance metrics like CPU utilisation of resources used to host the application or Response Time of the functionalities offered by the application to the user. Space 4Clouds can also be used to optimise the deployment of the application in the Cloud environment in order to minimise the cost of the infrastructure and guarantee QoS.

Application Assessment

The most basic functionality of Space4Cloud is to assess a fully specified application deployment in order to evaluate how the application react to different working conditions. The first step toward this analysis is the specification of the models exported by Creator 4Clouds in the user interface (UI) of Space4Cloud. To launch the Space4Cloud UI click on the cloud shaped in the top bar. The UI will be shown with the "Model" tab selected. In this tab the user can load the five models representing the application in the PCM language. Model extension The functionality tab allows to select the desired functionality, in this case the Assessment, and specify configuration files needed to connect to the database hosting performance characteristics of cloud resources and the performance model solver, e.g. LINE. The tab also allows to select among the supported solvers, LINE and LQNS. If LINE is chosen then an optional Random Environment specification file can be loaded to take into consideration variability in the performance of cloud resources.

Functionality assessment

When the assessment is completed a window with the performance results is shown. This window report three images, from top to bottom, they represent the number of VMs used to host each application tier, the expected average CPU utilisation for each tier and the expected average response time for each functionality modelled in the application. Particular functionalities or tier can be selected with the menu on the right side of the window.

Assessment

The Details tab report the workload specified by the user and the expected availability of the application

Assessment details

Optimisation

The main functionality of Space 4Cloud is the automated exploration of possible deployment alternatives in order to optimise the application deployment to minimise costs and guarantee QoS requirements.

In order to exploit such functionality the user needs to load all the models discussed in the previous section and select the Optimisation functionality in the Functionality tab.

This choice enables another tab of the Space 4Clouds UI. The Optimisation tab allows the user to specify some parameters that drive the search for possible solutions. The default values can be used for most of the situations but in some cases it might be useful to change these parameter to allow a broader exploration of possible configuration or to restrict it and reduce optimisation times.

Optimisation

The progress of the optimisation are shown in the Optimisation window and summarised in three images. The leftmost image shows the total number of VM used to host each application tier for the entire day, the center image shows the daily cost of the solution in USD, the rightmost image shows the number of constraints violated by the solution under analysis.
Optimsation running

Good candidate solutions, as well as the final solution, can be explored in more details by clicking on the Inspect Solution Button. The best solution window explorer shows the number of VMs used to host each tier of the application on each hour of the day, the cost of the solution and the size of the cloud resource chosen. In case of deployment on multiple clouds this information is reported for all the selected cloud providers. Optimisation solution