Installation and User Guide - CNR

27
ICT FET IP Project Installation and User Guide CONNECT PROPERTY META- MODEL (CPMM) http://www.connect-forever.eu

Transcript of Installation and User Guide - CNR

Page 1: Installation and User Guide - CNR

ICT FET IP Project

Installation and User Guide

CONNECT PROPERTY META-MODEL (CPMM)

http://www.connect-forever.eu

Page 2: Installation and User Guide - CNR
Page 3: Installation and User Guide - CNR

Project Number : 231167Project Title : CONNECT – Emergent Connectors for Eternal Software

Intensive Networked Systems

Title : CONNECT PROPERTY METAMODEL (CPMM): Installationand User Guide

Dissemination Level : PUInternal Version Number : v 1.0Contributing WPs : WP5Editor(s) : Antonia BertolinoAuthor(s) : Antonia Bertolino, Antonello Calabro, Antinisca Di Marco,

Francesca Lonetti, Antonino Sabetta

CONNECT 231167 3/27

Page 4: Installation and User Guide - CNR
Page 5: Installation and User Guide - CNR

Table of ContentsLIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 RUNNING CPMM EDITOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 USING CPMM EDITOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.1 Create a property model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2 Modeling the latency property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2.1 Create MetricsTemplate model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2.2 Create EventType model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.2.3 Create EventSet model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2.4 Create Metrics model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2.5 Create Property model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

CONNECT 231167 5/27

Page 6: Installation and User Guide - CNR
Page 7: Installation and User Guide - CNR

List of Figures

Figure 3.1: CPMM models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Figure 3.2: Create AverageLatencyMetricsTemplate model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Figure 3.3: Edit AverageLatencyMetricsTemplate model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Figure 3.4: Create new elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Figure 3.5: Set Math expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Figure 3.6: Create operand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Figure 3.7: Create template parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Figure 3.8: Create emergencyAlert eventType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Figure 3.9: emergencyAlert eventType Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Figure 3.10: Create sequenceOfAck eventType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Figure 3.11: Create eventSet e1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Figure 3.12: Load eventType emergencyAlert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Figure 3.13: Create eventSet e2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Figure 3.14: Load metricsTemplatelatency AVG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Figure 3.15: Load eventSet e2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Figure 3.16: Create LatencyReachingGuard property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Figure 3.17: Load LatencyReachingGuard metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Figure 3.18: LatencyReachingGuard property model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

CONNECT 231167 7/27

Page 8: Installation and User Guide - CNR
Page 9: Installation and User Guide - CNR

1 IntroductionThe Connect Property Meta-Model (CPMM) is an eCore model developed into the Eclipse EMF

framework [2] for specifying the Connect properties and metrics. It includes: EventType.ecore andEventSet.ecore modeling the event and the eventSet respectively, Metrics.ecore and MetricsTemplate.ecorefor specifying the metrics and metricsTemplate concepts and the Property.ecore representing the Propertymeta-model.

The editor, obtained as an Eclipse Plugin, contains the information of the defined eCore models andallows to create new model instances of the Property, Metrics, MetricsTemplate, EventType and EventSetmeta-models.

This tutorial provides a guide for installing and using the CPMM editor.

CONNECT 231167 9/27

Page 10: Installation and User Guide - CNR
Page 11: Installation and User Guide - CNR

2 Running CPMM editorDownload the CPMM editor from http://labsewiki.isti.cnr.it/labse/tools/cpmm/public/main,

in the selected destination folder.Into your Eclipse workspace import the project (via File/New/Import/Existing Projects into Workspace),

then select from your destination folder, the connectpropertymetamodel as the root directory.The following Eclipse projects will be created:it.cnr.isti.labse.connect.metrics,it.cnr.isti.labse.connect.metrics.edit,it.cnr.isti.labse.connect.metrics.editor.For running the CPMM Editor, select the it.cnr.isti.labse.connect.metrics.editor project and run the

plugin. Selecting the plugin.xml file, right click on it and then press Launch as Eclipse application.This should start a new Eclipse runtime application.

CONNECT 231167 11/27

Page 12: Installation and User Guide - CNR
Page 13: Installation and User Guide - CNR

3 Using CPMM EditorWe will show in this chapter how to use the CPMM Editor.In particular, we present the steps that you need to follow for creating a quantitative property model in

Section 3.1 and we show in detail how to use the editor for modeling a specific property in Section 3.2.

3.1 Create a property model

The quantitative properties are quantifiable/measurable and they have an associated metric. In the fol-lowing, we briefly describe the main steps for modeling a quantitative property.

1. For modeling a quantitative property you need to first define a metricsTemplate that represents ageneric specification for a metric and it is defined upon a generic set of actions/events/operations,that is not coupled with a particular application domain.

2. After defining a metricTemplate, you need to define one or more eventType elements modeling thetype of the events belonging to a specific application domain that you want to represent. They canbe primitive/simple events or composite/complex ones.

3. Then, you have to define one or more eventSet elements representing the set of event instancesthat refer to the previously defined eventType elements. The event occurrences collected into aneventSet define the parameters upon which the metrics are defined for measuring a quantitativeproperty. However, the event occurrences collected into an eventSet can also represent observablesystem behaviors modeled by a qualitative property.

4. After defining the eventSet elements you can define the metric that will refer to the metricsTemplatepreviously defined. For actualizing the metricsTemplate parameters, the metric will refer to theeventSet elements previously defined that describe the application based event definitions and therelative occurrences.

5. Finally, you can define the property that will be associated to the previously defined metric.

In Section 3.2, we will show how to define a specific quantitative property following the previous definedmodeling steps.

3.2 Modeling the latency property

As a complete example, we show how to generate the models for the latency property required in thesystem for the terrorist alert scenario. Specifically, the required latency property is: average time neededby the CONNECTEed system to reach k% guard devices must be at maximum equal to 10 seconds whenin the system there are 10 alerts. For “time needed by the Connected system to reach a set percentageof guard devices” we mean the average latency experienced in the system from the incoming Emergen-cyAlert message to the reception of a percentage of eAck coming back from the reached guards’devices.The models for the property, metric, metricsTemplate, eventSet and eventTypes associated to this latencyproperty are presented in Deliverable 5.2 [1].

In the new Eclipse application obtained by running the Editor plugin (see Chapter 2), you can model:EventSet, EventType, Metrics, MetricsTemplate and Property (see Figure 3.1). We show in detail in thefollowing sections how to model these elements.

3.2.1 Create MetricsTemplate modelWe start by modeling the AverageLatencyMetricsTemplate.

Select File/New/MetricsTemplate Model and specify a file name for your model (see Figure 3.2).You should now see an editor for your AverageLatencyMetricsTemplate model. To edit the model use

the Properties View. You can set the dimension that for this metricTemplate will be TIME, a name and adescription for this model (Figure 3.3).

CONNECT 231167 13/27

Page 14: Installation and User Guide - CNR

Figure 3.1: CPMM models

Right click on MetricsTemplate latency AVG and pressing New Child create a new element (Figure3.4).

Create a complex mathematical expression by selecting the AVG operator and then the DIFFERENCEoperator that are in turn other Expressions (Figure 3.5).

Create the two operands of the mathematical expression as two event based expressions named xand y with operator TIMESTAMP (Figure 3.6).

Specify two TemplateParameters setting the e1 and e2 keys respectively. Link e1 and e2 to Named-Expression y and x respectively (Figure 3.7).

Note that, this template model is generic and can be used in different scenarios.

3.2.2 Create EventType model

You have to define two eventType needed for specifying the required latency property: the emergencyAlertand the SeqOfAck. Select File/New/EventType Model and specify a file name for your model.

The former eventType that you define is a simple eventType named emergencyAlert (Figure 3.8). Youneed to define a specification, that is a label identifying the type or class of the observable events and,one or more parameters and one or more constraints. As shown in Figure 3.9 for the emergencyAlerteventType you have to define the specification emergencyAlert(IDe) and one parameter named IDe rep-resenting the event identifier.

Then, you have to define the SeqOfAck eventType (see Figure 3.10). This latter eventType is a complexevent type since it is defined as a sequence of eAck simple EventType. It has two parameters: theemergencyAlert ID (named IDe) that refers to an emergencyAlert simple eventType and the list of senderidentifiers (named IDgList) representing the list of guard messages acknowledging an alert messagereception. For specifying this complex event you define, by a label, a relation between the sequence

CONNECT 231167 14/27

Page 15: Installation and User Guide - CNR

of sender identifiers acknowledging an alert message, identified by IDgList and the emergencyAlert ID,named IDe, representing the emergencyAlert the sequence of eAck refers to.

3.2.3 Create EventSet modelYou have to define two eventSet named e1 and e2 that refer to emergencyAlert and sequenceOfAckeventType presented in Section 3.2.2 respectively.

Select File/New/EventSet Model and specify a file name for your model.For defining the Event set e1 you need to specify a name, a description and an eventType. Initially

the eventType field is empty (see Figure 3.11). You need to load the eventTypes previously defined byright clicking on the eventSet element and then press Load Resource. The selected eventType, that inthis case is the emergencyAlert, will be loaded into the eventSet model (Figure 3.12).

Figure 3.13 shows the e2 eventSet that refers to SeqOfAck eventType. As the e1 eventSet it has adescription, a name and a type. The type of e2 EventSet is SeqOfAck EventType. Moreover, the e2eventSet model defines an additional condition specified by the property of the definition element. Thiscondition specifies that e2 eventSet includes the occurrences of SeqOfAck containing at least k eAckoccurrences referring to the same emergencyAlert message.

3.2.4 Create Metrics modelAfter defining the latency AVMetricsTemplate and the e1 and e2 eventSet, you can define the Laten-cyReachingGuard metric.

Select File/New/Metrics Model and specify a file name for your model. In this model you have todefine a description, a name and the template that the metric actualizes.

For defining the LatencyReachingGuard metric you need to specify a name, a description and a met-ricsTemplate that the metric actualizes. Initially the template field is empty. You need to load the la-tency AVG MetricsTemplate defined as in Section 3.2.1, by right clicking on the latencyReachingGuardmetric and then pressing Load Resource. The selected latency AVG MetricsTemplate will be loaded intothe LatencyReachingGuard metric model (Figure 3.14).

For actualizing the latency AVG MetricsTemplate you need to specify two event based metric parame-ters that link the generic template parameters to the eventSet e1 and e2 (defined as in Section 3.2.3). Anevent based metric parameter has a name and an eventSet that can be loaded into the metric model (Fig-ure 3.15 shows how to load the e2 eventSet). Then, you have to define a metric constraint specifying thatthe two event sets e1 and e2 must be related to each other and they refer to the same emergencyAlert.

3.2.5 Create Property modelFinally, you can model the required latency property. Select File/New/Property Model and specify a filename for your model. As model object select quantitative property (Figure 3.16) since the propertycan be associated to a metric. In particular, the associated metric is the LatencyReachingGuard metric,defined as in Section 3.2.4, that you can load as in Figure 3.17.

You have to specify for this property a name and a description. Moreover, the editor allows you to se-lect: the nature of the property that in this case will be PRESCRIPTIVE, an operator that will be LESS EQUAL

and a propertyClass that will be PERFORMANCE. Then, you have to specify a value and a unit for the propertyand finally the workload. The final model for the ReachingGuard Property is shown in Figure 3.18.

CONNECT 231167 15/27

Page 16: Installation and User Guide - CNR

Figure 3.2: Create AverageLatencyMetricsTemplate modelCONNECT 231167 16/27

Page 17: Installation and User Guide - CNR

Figure 3.3: Edit AverageLatencyMetricsTemplate model

Figure 3.4: Create new elements

CONNECT 231167 17/27

Page 18: Installation and User Guide - CNR

Figure 3.5: Set Math expression

Figure 3.6: Create operand

CONNECT 231167 18/27

Page 19: Installation and User Guide - CNR

Figure 3.7: Create template parameter

CONNECT 231167 19/27

Page 20: Installation and User Guide - CNR

Figure 3.8: Create emergencyAlert eventType

Figure 3.9: emergencyAlert eventType Parameters

CONNECT 231167 20/27

Page 21: Installation and User Guide - CNR

Figure 3.10: Create sequenceOfAck eventType

Figure 3.11: Create eventSet e1

CONNECT 231167 21/27

Page 22: Installation and User Guide - CNR

Figure 3.12: Load eventType emergencyAlert

CONNECT 231167 22/27

Page 23: Installation and User Guide - CNR

Figure 3.13: Create eventSet e2

CONNECT 231167 23/27

Page 24: Installation and User Guide - CNR

Figure 3.14: Load metricsTemplatelatency AVG

CONNECT 231167 24/27

Page 25: Installation and User Guide - CNR

Figure 3.15: Load eventSet e2

Figure 3.16: Create LatencyReachingGuard property

CONNECT 231167 25/27

Page 26: Installation and User Guide - CNR

Figure 3.17: Load LatencyReachingGuard metric

Figure 3.18: LatencyReachingGuard property model

CONNECT 231167 26/27

Page 27: Installation and User Guide - CNR

Bibliography[1] CONNECT Consortium. Deliverable 5.2 – Design of approaches for dependability and initial proto-

types, 2011.

[2] Eclipse Modeling Project. http://www.eclipse.org/modeling/.

CONNECT 231167 27/27