Architectural Templates

Aus SDQ-Wiki
Palladio Addon (Liste)
Name Architectural Templates
Contacts Sebastian Lehrig (?), Markus Frank (http://www.iste.uni-stuttgart.de/rss/people/frank.html)
State Incubation
Is Stand-alone Analysis? No
Extends Analyses Palladio Experiment Automation
Extends Metamodels Annotations, New Notation Elements, New Views
Code Location https://github.com/PalladioSimulator/Palladio-Addon-ArchitecturalTemplates
Update Site https://sdqweb.ipd.kit.edu/eclipse/architecturaltemplates/releases/latest/

Short Summary

Architectural Templates allow software architects to apply reusable patterns to their Palladio models. For example, instead of manually modeling the load balancer software architects can also apply the Architectural Template for load balancers. As this application consists only of a few small steps, architects can save a lot of modeling effort.

Documentation

Getting Started

The current release of Palladio comes with all required Plug-Ins and dependences. So, if you follow the guide to install Palladio (PCM >= 4.0) you should be ready to use (A)rchitectural (T)emplates.

In case you want to use the graphical editor support, make sure you use the new Sirius Editors.

Requirements to use ATs

Learn How to Use ATs

There is a step by step guide available, which allows you to learn the fundamentals of Palladio's performance predictions and how to apply AT's to your model. The guide will teach you how to use ATs on the example of a load balancer.

Creating a new Architectural Template in Palladio

Prerequisites:

Creating a EMF-Profile for the new AT

1. Creating the profile


Then click on browse to specify where you want to save your emfprofile diagram. Normally it goes into the profiles folder of the AT catalog(..architecturaltemplates.catalog/profiles/). You may have to select the profiles folder and Right-Click->Refresh before the new emfprofile diagram appears.

2. Setting the right properties

Open the new emfprofile (by default with the EMF Profile Diagram Editor which should be installed as described in Prerequisites). Select the Property view and set properties:


  • Set Name as YOURNAME+"Profile" e.g. ParallelLoopProfile
  • Ns Prefix as "org.palladiosimulator.architecturaltemplates.catalog.profiles"
  • Ns URI as "org.palladiosimulator.architecturaltemplates.catalog.profiles.YOURNAME"
  • Click inside the diagram editor and save the changes!


3. Register the profile in plugin.xml

Now you have to register the profile in plugin.xml: * Open the Plugin XML-File with the Plug-in Manifest Editor and select the plugin.xml tab (alternatively open it with a Text Editor). Customize and append following lines to your plugin.xml file <extension point="org.modelversioning.emfprofile.profile"> <profile profile_resource="profiles/YourName.emfprofile_diagram"/> </extension>

Save the plugin.xml

To check if your profile was registered correctly you can open the Registered EMF Profiles View with Window-> Show View-> Other..-> Registered EMF Profiles(You may have to restart eclipse after registering in plugin.xml before the new EMF Profile is recognized and displayed in the Registered EMF Profiles View).

4. Editing the profile

First you need to import the meta-model you want to use. Right-click inside the emfprofile_diagram and select "Import Metamodel Element..", then search for PalladioComponentModel.

Then select the component you want to extend. After that you can model your profile as you like.

Hint: use the "Import Metamodel Element.." feature and it generates all ESuper Types for you. You may miss some ESuper Types by changing the ESuper Types in Properties by your own


Sometimes it's not possible to "Import Metamodel Element..." because you can't add your desired Element, because "Invalid referenced element is selected" shows up. This is currently a bug. A current workaround is just to generate a new empty emfProfile as shown in step 1. Then after the new empty emfprofile diagramm is loaded into the editor immediately move back to your old emfprofile diagramm and try to "Import Metamodel Element..." again. The newly created emfProfile_diagram can be deleted afterwards.


Creating the AT

Open Default.architecutraltemplates (by default with Architectrualtemplates Model Editor) and select the Selection Tab. Expand the tree and select Catalog Default AT Catalog and execute the following steps:

1. Right-click -> New Child-> AT

2. Select the newly added AT. Switch to properties tab and change the Entity Name as you like.

3. Right-click on the new AT -> New Child->Role

4. Drag and drop your previously created emfprofile diagram into the AT Editor.

5. Expand the emfprofile diagram inside the AT Editor and select "YourProfileName"

6. Right-Click->New Child->eAnnotation

7. Select the eAnnotation, then switch to the Properties View and edit Source Property to "org.palladiosimulator.architecturaltemplate"

8. Select the newly created eAnnotation. Right-click->new Child->Details Entry

9. Select Details Entry then switch to the Properties View and set the following properties: Key=AT; Value=platform:/plugin/org.palladiosimulator.architecturaltemplates.catalog/Default.architecturaltemplates#ID_OF_YOUR_AT (the ID can be found in the Properties View of the previously createed AT)

10. Now select the Role which you created in step 3 inside your AT. Switch to the Properties View and change Stereotype to your Stereotype which was defined in your emfprofile diagram. The Stereotype should now appear inside the selection. (Append new roles to the AT for each Stereotype from your emfprofile diagram and set the right Stereotype in the Properties View)

11. Add qvto for each role if needed by Right-click on the Role -> New Cild -> QVTO Completion. Switch to the Properties View of the new QVTO Completion and set Completion File URI to the name of your qvto file. Right-Click on your new QVTO Completion -> new Child -> PCM Blackboard Completion Parameter Rght-Click on your new PCM Blackboard Completion Parameter -> new Child -> PCM File Extension Switch to the Properties View of the new PCM File Extension. Now you can select which Model you want to pass to your qvto by assigning it to File Extension. Which Model you select is dependent on your emfprofile_diagramm and qvto.

12. Click Inside the Default.architecturetemplate editor and save it. Your AT should be successfully created.

Known bugs

  1. If your stereotype extends the Class System the name of the stereotype you define in the EMF-Profile MUST end with "...System". Otherwise Palladio won't recognize it.

Further Documentation

Examples: CloudScale Architectural Template Examples

Documentation & Development: Architectural Templates

Conceptual documentation: Dissertation of Sebastian Lehrig

Extensions

Architectural templates for microservice architecture patterns (such as the Circuit Breaker pattern) are available at https://github.com/PalladioSimulator/Palladio-Addon-ArchitecturalTemplates/tree/Microservices-AT (Master thesis by Matthias Rombach, supervised by Jörg Henß and Christian Stier).