Home

D9.7 Integrated Environment for maintaining

image

Contents

1. Acceleo JMX Java source Figure 25 Federated Identity optimization pattern process In particular the core operations have method bodies templates and comments that guide the correct interaction with the openid4java library petstoreEEorig_AE_openid4java uml 23 a EI lt Package gt org a EI lt Package gt agoncal a lt Package gt application a lt Package gt petstore ES lt Package gt constraint EI lt Package gt domain EI lt Package gt exception FI lt Package gt rest EI lt Package gt security EI lt Package gt service E Package util a E lt Package gt web H lt Class gt Exceptioninterceptor E lt Class gt LocaleBean E lt Class gt CatalogController H lt lt Credentials gt gt lt Class gt Credentials a E lt lt AuthenticationEnforcer gt gt lt Class gt AccountController Z lt Generalization gt Controller El lt Property gt customerService CustomerService EZ lt Property gt credentials Credentials EZ lt Property gt conversation Conversation El lt Property gt loggedinCustomer Customer EZ lt Property gt loginContext LoginContext Ez lt Property gt ap OpenIDAuthenticationProvider Figure 26 Petstore PSM with OpenID UML For example using stereotypes from the AuthenthicationEnforcer profile it has been possible to identify and initialize methods for the AuthenticationProvider class where variables referring to the Subject class have been matched to the correct s
2. ARTIST Contract No FP7 317859 www artist project eu Page 16 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 2 2 3 Model Understanding Toolbox The tools in Model Understanding Toolbox are Component Model Generator PIM Abstractor Annotation Based Slicing and CMM Computation of Model Metrics All of these tools contribute to the Eclipse s menu extension by defining menu actions under the Model Understanding Toolbox context menu for UML files PIM abstractor and Component Model Generator also assist the user with a dialog on which the user can make a selection among the pre defined abstractor types and UML profiles to be used in the model abstraction and generation processes This dialogs are basically implemented as Java classes extending the TitleAreaDialog of Eclipse s JFace API The user manuals and figures further explaining the tools can be found in the tool s respective deliverables WP8 series of deliverables 2 2 4 Code Generation Toolbox This toolbox feature is formed of Java Code Generator and Maintainability Metric Calculator MMC tools both of which define extensions to Eclipse menus by action additions to context menus of UML files These actions are grouped under the Code Generation Toolbox menu item MMC also has a custom dialog which helps the user in selecting a source code location of the selected UML model The dialogs and menu entrie
3. 3 Kepler is recommended Installation Procedure of Required Plugins ATL plugins are required to be installed ATL plugins may be installed by following the installation procedure below 1 Onthe Help menu of Eclipse click Install New Software 2 From the Work with dropdown list select Kepler or Juno depending on your Eclipse version If you do not have these entries in the list continue on from step 2a otherwise continue from step 3 a Click Add button at the right side of the Work with dropdown list b Write a name of your choice for the Kepler Juno repo c Write http download eclipse org releases kepler or http download eclipse org releases juno to the Location field and click Ok 3 Select ATL SDK click next and follow the instructions on screen 4 Restart Eclipse Project Title ARTIST Contract No FP7 317859 www artist project eu Page 18 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Installation of ARTIST Integrated Environment The ARTIST IDE update site will be published at the ARTIST website www artist project eu available for installation using Eclipse s Install New Software feature Currently and anytime the user can download the update site zip file from https github com artist project ARTIST tree master binary ARTIST IDE and follow the instructions below for installation 1 Download the update site zi
4. Eclipse environment and targeted at software engineers and modellers to carry out cloud oriented migration scenarios The ARTIST integrated environment provides user interfaces including tool bars wizards and views for ARTIST tools that support such scenarios by a model based approach As migration scenarios often require carrying out several different transformations to ultimately gain the expected software artefacts we have developed a dedicated language that allows multiple transformations to be composed into a transformation chain thereby enabling their automatic execution if the chain becomes executed Transformations are loosely coupled by a more coarse grained transformation which fosters reuse while at the same time ensures that the software engineers and modellers still have the control over the execution of the single transformations Transformations developed in the context of the forward engineering phase of a migration scenario mainly refine and optimize models and application code towards a selected cloud environment We have developed several transformations and profiles to support the refinement step with the main purpose to exploit novel cloud optimization opportunities In fact we have selected a set of optimization patterns contributed by WP9 and realized concrete transformations and profiles to support them by considering both the model level as well as the code level To measure the quality of the generated application co
5. Eg alsoload String stereotype stereotype stereotype E ld g IgnoreSave E Mapify stereotype E IgnoreLoad value value z e metaclass Class value D lt value W I Figure 6 UML Profile for Objectify a platform resource eu artist migration modernization uml2java test model petstore domain objectified dao uml a Es lt Model gt petstore app Package Import gt UML Primitive Types 57 Package Import gt Java Primitive Types 4 EI lt Package gt org 4 EI lt Package gt agoncal 4 lt Package gt application 4 ET lt Package gt petstore 4 EI lt Package gt domain gt H lt lt Embed gt gt lt Class gt CreditCard a EI lt lt Entity gt gt lt Class gt Order me gt EZ lt lt Id gt gt lt Property gt id Long gt El lt Property gt quantity Int 0 1 gt El lt Property gt item Item 0 1 gt H lt lt Entity gt gt lt Class gt Order Figure 7 Model with the corresponding annotations for the Key Value Storage pattern Embed Entity public class CreditCard public class OrderLine pe Description of the property id er Id private Long id Figure 8 Annotations automatically generated for the Key Value Storage pattern in GAE Project Title ARTIST Contract No FP7 317859 www artist project eu Page 26 of 47 D9 7 Integrated Environment for maintaining developing forward engineeri
6. Memory Operating System Threads Runtime When moving to cloud in particular to PaaS providers it is possible that this information is no longer available incorrect or not supported The transformation described in this section is aimed at replacing the existing technology to gather the information about platform resources Project Title ARTIST Contract No FP7 317859 www artist project eu Page 32 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 with one that is supported by the cloud provider with a minimal impact for the rest of the system Although for some types of resources resource management is taken care of by the cloud provider the monitoring of resource consumption can be useful to systems when they want to enact closed loop management mechanisms or even to try to contain costs related to resources consumption Taking as an example Google App Engine GAE while this cloud provider does not support JMX including JMXBeans access it offers billing schemas based on resource usage quotas Resource monitoring can be useful to check that the system does not exceed the thresholds over which resources are to be paid for Even if JMX is not supported as such GAE offers several other services to manage and monitor the consumption of resources The idea of the transformation is to create a profile that allows identifying platform resources so to be
7. Networks e Acceleo Base technology to realize the code generation facility e Java Base technology to realize the code generation facility e UML Modeling language to represent the models and profiles injected to the code generation facility Project Title ARTIST Contract No FP7 317859 www artist project eu Page 25 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 4 1 3 User Manual The steps to obtain the domain model with the Objectify profile and the corresponding stereotypes applied are explained in Section 3 3 1 3 of D9 3 Considering the generation of the code it is explained in Section 3 2 4 of D9 5 stereotype metaclass stereotype stereotype stereotype E OnLoad Operation OnSave E Cache 8 Entity Ea expirationSeconds int Eg name String stereotype Serialize Eg zip boolean E3 compressionLevel int stereotype E Translate Eg early boolean stereotype El AlsoLoad stereotype Embed metaclass metaclass Parameter Eg value String H Property stereotype Index stereotype jes Load stereotype CH Unindex stereotype BW EntitySubclass stereotype stereotype Eg name String ES gt El Parent E Ignore ES index boolean
8. able to replace the technology to access them with the ones compatible with the cloud provider In Figure 19 the whole transformation chain is visualized together with the artifacts involved in the process All artifacts and transformations are described in more detail in the following paragraphs The initial input to the transformation process is the UML Model of the system to be migrated The model is annotated with the ResourceMonitoring Profile created to identify resources ant its properties This annotated model still platform independent is then mapped with the Resource Monitoring GAE library model This library is specific to Google app engine and uses cloud provider specific APIs to gather information on the resources RM GAE Lib UML Model PDM RM2GAEMapper Annotated UML Model Annotate4RM ResourceMonitoring Profile UML Reverse MX JMX CD2RM Profile Class e e Java Engineering Tool Diagram source The result of this mapping is a Platform specific model with resource management support for the target cloud provider in this case Google App Engine Figure 19 Transformation Chain 4 6 1 1 Platform Independent Profile for Resource Monitoring The Resource Monitoring profile res model profile has been derived automatically from the JMX specifications It describes resources and their main properties relevant at the level of the Java platform The profile has been generated using an ATL
9. developed in the context of the ARTIST project for supporting cloud oriented software migration Moreover transformations developed in the context of WP9 mainly realize model to model transformations with the purpose of refining and optimizing them towards a selected cloud environment and producing the pertinent application code from such models by relying on model to code transformations In this deliverable we report on a selected set of patterns for which we have developed concrete transformations and profiles aiming to optimize certain software artefacts for a selected cloud environment In this respect the quality of reverse engineered models plays a crucial role as they are considered as starting point for applying such transformations in the forward engineering phase cf D8 3 Only if they their quality is appropriate the quality of the models and generated application code as a result of possibly chained transformations will be sufficient and useful for software engineers and modellers The ARTIST migration process provides techniques to investigate on the feasibility of a migration to the cloud mainly by providing metrics including source code maintainability In this deliverable we report on the calculation of the maintainability metric of application code generated as a result of an ARTIST migration scenario with purpose to reason about possible improvements Project Title ARTIST Contract No FP7 317859 www artist project eu Page
10. for exploring the UML models and the source code e eu artist migration mmc strucctures Contains the classes of the structures used by the metric explorer component e eu artist migration mmc test Contains the test cases classes for executing the metric explorer component Project Title ARTIST Contract No FP7 317859 www artist project eu Page 42 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process 5 3 User Manual Version 1 0 Final Date 31 03 2015 In this version of the prototype this plug in requires manual installation The user has to import de components to the Eclipse workspace manually All the components are developed in JavaSE 1 6 So this is the minimum java version for executing the API Import the project into the Eclipse workspace gt eu artist migration mme al sic EN eu artist migration mmc metricexplorer 8 euartist migration mme structures amp 8 euartistmigration mme test a S JRE System Library JawaSE 1 6 m Referenced Libraries zs 5 lib Figure 31 Maintainability metric calculator project Open the eu artist migration mmc test package 4 8 eu artist migration mmc test AU AfferentTest java 45 ClassNumberTest java 3 CyclomaticComplexityTest java AU EfferentTest java 3 MetricCalculatorListTest java 5 MetricCalculatorTest java 3 NestedBlockDepthTest java Figure 32 Testing package Right click in a te
11. generator developed by Obeo Networks For this specific pattern we add support for extending the specific operations of service classes that are annotated with lt lt CircuitBreaker gt gt Specifically the extension at code level refers to the inclusion of the template in said operations 4 5 3 User Manual In order to execute this pattern for having the code included in the operations the user needs to execute the extended code generator after the lt lt CircuitBreaker gt gt stereotype has been applied to the corresponding operations 4 6 Cloudification of Resource Monitoring Concerns 4 6 1 Functional Description Platform resource monitoring in Java is possible through several means the most widely used being JMX Java Management eXtension JMX provides means to add flexible and powerful management interfaces to an application Through JMX technology a set of platform resources to be controlled can be seen as simple well defined objects whose properties map to the lower level characteristics of the given resource With JMX Java instruments the Virtual Machine itself to provide visibility into the state of memory management class loading active threads logging and platform configuration This functionality is provided through MXBeans which are in effect management beans encapsulating specific parts of the Java Platform s internals The management interface exposes several classes to control a wide set of resources including
12. order to run the transformations launch file 1_RM_annotate launch first to create the spcoop res_PIM_RM uml intermediate model then launch 2_PIM2PSM launch to generate the target PSM model To launch the file run right click on the file in the workspace resource tree and select Run as choosing the launch configuration matching the file name 4 7 Federated Identity Pattern 4 7 1 Functional Description Elaborating the work described in deliverable D9 3 on the cloudification of security concerns we have extended the transformation to include the model to code step Figure 25 recalls the transformation chain already covered in D9 3 in grey and highlights the extension the implementation on top of an Acceleo based code generator for the Federated Identity pattern 4 7 2 Technical Description This generator extends the standard UML2Java Acceleo code generator to create stubs of core methods so to implement correctly the authentication process using the openID4Java library based on the stereotypes in the Authentication Enforcer pattern Project Title ARTIST Contract No FP7 317859 www artist project eu Page 37 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 OpenID4Java Model SE AE Annotate Annotated Authentication gt UML EnforcerOpenID PIM Model Mapper AuthenticationEnforcer Profile openID4java code generator
13. phase and project where the feasibility for a migration to cloud is being evaluated the maintainability metric as defined by IEEE 5 for analysing the software complexity is calculated In the context of the modernization phase the maintainability metric of the generated metric is calculated too The main purpose for this re calculation of the maintainability index is to analyze if within the application modernization process through model to model and model to code transformations this metric has improved Maintainability is defined by IEEE standard glossary of Software Engineering 2 as the ease with which a software system or component can be modified to correct faults improve performance or other attributes or adapt to a changed environment As explained in D5 1 1 in the context of ARTIST we use the compound MEMOOD method 6 to calculate the Maintenance based on the following model Maintenance 2 399 0 493 x Modifiability 0 474 x Understability 0 524 x Scalability 0 507 LOC Where Modifiability 0 629 0 471 x NC 0 173 x NGen 0 616 x NAggH 0 696 x NGenH 0 396 x MaxDIT Understability 1 66 0 256 x NC 0 394 x NGenH Scalability 0 182 x 0 99 x AC 0 100 x EC 0 097 x ND 0 036 x PC 0 068 x DMS LOC 0 269 0 008 x Coupling 0 181 x cohesion 0 119 x CC 0 084 x ILCC Being NC Number of classes NGen Number of Generalizations NGenH Number Of Generalizations Hierarch
14. send a parameter to the command handler class which is then interpreted and the appropriate menu action is invoked be it the external tool or the ARTIST migration project wizard 2 2 2 Model Discovery Toolbox Model Discovery Toolbox feature consists of several plugins which together forms the tools in this toolbox Currently this toolbox reported in WP8 Deliverables consists of the tools Java2Model Java2UMLCIass Java2UMLActivity XMLAggregator SQL Model Discoverer and JUMP All these tools except JUMP contribute to the ARTIST Integrated Environment by adding menu actions to Modisco s Discovery context menu item This is managed by adding an extension for org eclipse ui menus extension point in the plugin xml using the menu category ID defined by Modisco JUMP tool on the other hand defines a Run Configuration which can be accessed by opening the Eclipse s default Run Configuration View This contribution is extended by adding a context menu option to projects which have Java nature The menu option allows the user to create and open a JUMP run configuration with the properties of the selected Java Project This is also managed by adding an extension for org eclipse ui menus extension point in the plugin xml that is linked to a command invoking the run configuration of the JUMP tool The user manuals and figures further explaining the tools can be found in the tool s respective deliverables WP8 series of deliverables Project Title
15. transformation JMX CD2RM Profile that maps the JMX concepts to stereotypes along with their properties The diagram in Figure 20 depicts some of the resources modelled in the profile Even if not all providers support the access to all the properties listed in the res model profile the profile is as complete as possible to be platform independent Project Title ARTIST Contract No FP7 317859 www artist project eu Page 33 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 7 res model profile di 3 Stereotype Runtime base Interface Interface 1 base Class Class 1 Name Name 1 VmName VmName 1 VmVendor VmVendor 1 VmVersion VmVersion 1 SpecName SpecName 1 SpecVendor SpecVendor 1 SpecVersion SpecVersion 1 ManagementSpecVersion ManagementSpecVersion 1 ClassPath ClassPath 1 LibraryPath LibraryPath 1 BootClassPath BootClassPath 1 InputArguments InputArguments 1 Uptime Uptime 1 StartTime StartTime 1 SystemProperties SystemProperties 1 Thread base Class Class 1 base Interface Interface 1 ThreadCount ThreadCount 1 PeakThreadCount PeakThreadCount 1 TotalStartedThreadCount TotalStartedThreadCount 1 DaemonThreadCount DaemonThreadCount 1 AllThreadlds AllThreadlds 1 CurrentThreadCpuTime CurrentThreadCpuTime 1 CurrentThreadUserT
16. 9 www artist project eu Page 41 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 There is no persistency implemented neither planned for this API Thus every time the new metrics are needed they have to be calculated Persistency is delegated to API consumers 5 2 4 Package information The following image depicts the package structure of the main component the Artist metrics generator plug in 4 452 eu artist migration mmc a VI src 4 8 eu artist migration mmc metricexplorer J AbstractionExplorer java LU ClassExplorer java 2 ComponentExplorer java 45 CouplingExplorer java 45 CSExplorer java 3 CyclomaticExplorer java AU JavaExplorer java AU MetricCalculator java LU NestedBlockDepthExplorer java LU PolymorphismExplorer java JJ Searcher java 45 UMLExplorer java 4 Di eu artist migration mmc structures LU Component java J Method java LU Project java LU SearchResult java J SourceFile java J UmlElement java 4 8 eu artist migration mmc test AU AfferentTest java 45 ClassNumberTest java 3 CyclomaticComplexityTest java 45 EfferentTest java LD MetricCalculatorListTest java J MetricCalculatorTest java J NestedBlockDepthTest java m JRE System Library JawaSE 1 6 E Referenced Libraries Figure 30 Package structure of the Maintainability metric calculator e eu artist migration mmc metricexplorer Contains the classes
17. 9 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 1 Introduction 1 1 Aboutthis deliverable The integration of the ARTIST tools developed in different WPs into a common environment aims at improving their application in real world cloud migration scenarios including the ARTIST use cases In this deliverable we report on the ARTIST integrated environment that provides a common interface to all integrated ARTIST tools on top of the Eclipse environment It mainly targets software engineers and modellers carrying out migration scenarios to the cloud As in ARTIST we work towards a model based engineering approach to support such a software migration model transformations play a key role in the transition of software to the cloud In fact a migration scenario often requires carrying out several different transformations to ultimately gain the required software artefacts These transformations need to be properly chained and maintained because typically a diverse set of transformations realized by different transformation languages and technologies need to be executed in an appropriate order For this reason we have developed a dedicated language that allows multiple transformations to be composed into a transformation chain thereby enabling their automatic execution if the chain becomes executed In this deliverable we give an overview of the key concepts constitu
18. ARTIST PREFERENCE PAGES 16 FIGURE 4 PACKAGE STRUCTURE OF ARTIST Sum 17 FIGURE 5 CONCEPTUAL OVERVIEW OF TRANSFORMATION COMPOSTTION 20 FIGURE 6 UML PROFILE FOR OBJECTIFY sssscccceseececcescececassceceeneececeaaeecesseseccsaaeecessaceeeeseuseessaneeeees 26 FIGURE 7 MODEL WITH THE CORRESPONDING ANNOTATIONS FOR THE KEY VALUE STORAGE PATTERN 26 FIGURE 8 ANNOTATIONS AUTOMATICALLY GENERATED FOR THE KEY VALUE STORAGE PATTERN IN GAE 26 FIGURE 9 CLASS ANNOTATED WITH THE CACHE STEREOTYPE cccccscsssseseecececeaneeseececeeeseeuaeseeeeeeeeauaganeeeess 27 FIGURE 10 ANNOTATION AUTOMATICALLY GENERATED FOR THE CACHE PATTERN IN GAE oosssinsoosssssssenssessee 27 FIGURE 11 STEOREOTYPE FOR MULTITENANCY aurrannnnnnnnnnnnnnnnnrnnvnnnnnnnnnnsnnnnnnnensnnnnnennnnnsnnnnnnnernrnnnnennnnnssen 28 FIGURE 12 CUSTOMER CLASS ANNOTATED WITH THE MULTITENANCY STEREOTYPE cccccesssescecececeeneeeseecees 29 FIGURE 13 SOME CODE GENERATED FOR THE MULTITENANCY PATTERN IN THE CUSTOMERSERVICE CLASS 29 FIGURE 14 STEREOTYPE FOR MATERIALIZEDVIEW PATTERN cssscccceseeccceeseeceaeesecceaeesceceaceeeeseeseeesaneeeees 30 FIGURE 15 OPERATION ANNOTATED WITH THE MATERIALIZEDVIEW STEREOTYPE s sssnssesssesssrsessrreresereene 30 FIGURE 16 CODE AUTOMATICALLY GENERATED FOR THE MATERIALIZED VIEW DATTERN 31 FIGURE 17 STEREOTYPE FOR THE CIRCUITBREAKER PATTERN 31 FIGURE 18 OPERATION ANNOTATED WITH THE CIRCUITBREAKER STEREOTEE 32 FIGURE 19 TRANSFORMAT
19. D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 ARTIST FP7 317859 artist Advanced software based seRvice provisioning and migraTlon of legacy Software D9 7 Integrated Environment for maintaining developing forward engineering process Editor s Alexander Bergmayr Manuel Wimmer Javier Troya Responsible Partner TUWIEN Status Version Final V1 0 Date 31 03 2015 Distribution level CO PU PU Project Title ARTIST Contract No FP7 317859 www artist project eu Page 1 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Project Number FP7 317859 Project Title ARTIST Integrated Environment for maintaining Title of Deliverable developing forward engineering process Due Date of Delivery to the EC 31 03 2015 Workpackage responsible for the Deliverable WP9 Editor s Alexander Bergmayr TUWien Manuel Wimmer TUWien Javier Troya TUWien Contributor s ATOS Tecnalia Sparx INRIA Engineering Reviewer s Leire Orue Echevarria TECNALIA Approved by All Partners Recommended mandatory readers WP 6 WP 7 WP 8 WP 11 Abstract This deliverable comprises automatically executable transformations needed for dep
20. Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 maintainability metric can be calculated for application code generated as a result of an ARTIST migration scenario before we conclude in Section 6 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 12 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 2 ARTIST Integrated Environment 2 1 Functional Description ARTIST Suite consists of a bundle of different tools supporting the ARTIST Cloud migration methodology As these tools support different phases and tasks within the methodology and target different roles and therefore providing different interfaces for those users they can initially be not sufficiently integrated from different perspectives usability interoperability seamlessly integration along the ARTIST methodology and so on The fact that the different ARTIST tools have been developed according to different functional constraints technical paradigms or different architecture platforms because of technical considerations or constraints imposes some challenges into their mutual integration To improve the user perception of the ARTIST Suite as a single seamlessly integrated tool different technical initiatives have been conducted by ARTIST in different work packages e The ARTIST methodology provides the c
21. IN javamodel xmi JavaSource output UML OUT umlmodel Table transformation UML2SlicedUML asm Groow http groovy lang org Gradle https gradle org Project Title ARTIST Contract No FP7 317859 www artist project eu Page 21 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 def uml2java trafo name uml2java of Acceleo project UML UML ecore main Java IN javamodel xmi JavaSource target UML OUT umlmodel Table model UML2SlicedUML asm java2uml dependson java2javamodel uml2sliceduml dependson java2uml uml2refineduml dependson uml2sliceduml uml2java dependson uml2refineduml If a transformation is scheduled for execution it runs through four phases i setup ii pre work iii work and iv post work The first phase is dedicated to initialize a transformation by providing all the required parameters In the above Listing the parameters required to setup the transformation are enclosed by the curly brackets The other three phases are part of the execution of a defined transformation in the chain Developers can interfere in these phases by passing method calls to them which is useful for instance to save intermediate results add assertions that need to be fulfilled provide debug information and pass the behaviour of a transformati
22. ION CHAIN 33 FIGURE 20 PLATFORM INDEPENDENT PROFILE FOR RESOURCE MONITORING on ssssssssssssssssssreresessnserrerrsessns 34 FIGURE 21 GAE RESOURCE MONITORS PDM snsnnssesssssssnsrenrssssrnseressssssenrerrssssnnreresessssrnreresessnsenreersessns 35 FIGURE 22 ANNOTATEARM TRANSEORMATION 36 FIGURE 23 PIM MODEL ANNOTATED WITH RESOURCE MONITOR PROFILE sssseecececeseesseeseeceeecesuaneseeeees 36 FIGURE 24 SPCOOP MONITORING SERVICE PSM GAE COMPLIANT ssscccsssceessecesseecesseecsaececaecesseeenaees 37 FIGURE 25 FEDERATED IDENTITY OPTIMIZATION PATTERN PROCESS ssssssessssssssrrressreernrennsrnrensrrerssernenn 38 FIGURE 26 PETSTORE PSM WITH OPENID UML ossnsnsosssnnnnnnnssssssnnennssssnssrrerrssssnnenrennssssrnrnresnssssnneenesessnn 38 FIGURE 27 STEREOTYPED EXAMPLE MODEL s sssssesssesssrsrssrnressrrrrssrrrrsrressnnrrnsrrressrenrnsenssnnressnnerssennenn 39 FIGURE 28 GENERATED CODE FROM STEREOTYPED EXAMPLE MODEL s sssssssssssssrserresessssrereresrssssrrreresessns 39 FIGURE 29 MMC HIGH LEVEL ARCHITECTURE n sssssssnssssssseerenessssrrrerrssssusenrerrosssnstnrerrssssrnreresessnsnnreresessnn 41 FIGURE 30 PACKAGE STRUCTURE OF THE MAINTAINABILITY METRIC CALCULATOR cccccscessseseeeeeeceaeenseeeees 42 FIGURE 31 MAINTAINABILITY METRIC CALCULATOR PROIECT 43 FIGURE 32 TESTING PACKAGE ruumnnnnrannnnnnnernrnnnnnnnnnnsnnennnnnnnnnnenennnnnnnnnnnsnennnnnnrnnnnnnsnennnnnnnnnnnenssnennnnnnnnsner 43 FIGURE 33 MAINTAINABILITY METRIC CALCULATOR TE
23. Next figure abstractly outlines the ARTIST IDE s architecture Feature Feature Plug in Plug in Plug in Feature ARTIST Integrated Environment Eclipse IDE Figure 1 ARTIST Integrated Environment 2 2 1 ARTIST Suite ARTIST Perspective contributing to Eclipse s perspectives extension by defining a new perspective within Eclipse specialized for ARTIST This perspective layout contains the Repository View Problems View and the Package Explorer as default ARTIST Perspective is created by adding an extension for org eclipse ui perspectives extension point in the plugin xml and also defining a class implementing the PerspectiveFactory interface of Eclipse Ul package to create the initial layout Project Title ARTIST Contract No FP7 317859 www artist project eu Page 14 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 amp ARTIST Eclipse Platform ED ue ERA File Edit Navigate Search Project ARTIST Run Window Help me MAT MITTE DE ED rer berg eae a Quick Access E amp Java Resource H TFT A ARTIST E Project Explorer 23 o BS 4 ley eu artist usecases DEWS Af ley eu artist usecases LoB ART 0 items selected fat Problems 3 ET Repository Browser 53 0 items ms Glo olg Description Project Package m D Di D Di D Fig
24. PDM The resulting Platform Specific diagram is depicted in Figure 25 7 spcoop res GAE di 23 runtime euartist eng modernization monitors ga RuntimeM eng spcoop monitors jvm JVMResMonitor Eg tun RuntimeM 1 E mem MemoryM 1 head E mthread ThreadM 1 eu artist eng modernization monitors ga ThreadM E stop void restart void start void memory eu artist eng modernization monitors gae H MemoryM Figure 24 SPCoop monitoring service PSM GAE compliant 4 6 3 User Manual The concrete implementations of M2MT modules supporting the cloudification of resource monitoring in Google App Engine are part of the ARTIST Cloudification Toolbox and located in ARTIST Tooling Github Repository under the folder migration modernization in the project eu artist migration modernization eng monitor The project contains the following folders e transform containing all ATL transformations e models collects input and output models The input PIM is spcoop res JMX uml while the PSM model produced by the transformation is named spcoop res GAE uml e PDM contains the resource monitor GAE uml model e profiles contains the res model profile e launch The folder contains the launch files allowing to run the transformations Files are numbered for convenience of the user In
25. STING annnanunnnnnnnnnnnsnnnnnnnnrnnnnnnsnernnnnnnnnnnenssnennnvnnnnener 44 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 7 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Terms and abbreviations EC European Commission MDFE Model Driven Forward Engineering API Application Programming Interface GML Graphical Modelling Language SOTA State Of The Art MT Model Transformation M2M Model to Model ATL Atlas Transformation Language M2T Model to Text PIM Platform Independent Model MUT Model Understanding Toolbox PDM Platform Dependent Model DSL Domain Specific Language OCL Object Constraint Language MDE Model Driven Engineering Project Title ARTIST Contract No FP7 317859 www artist project eu Page 8 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Executive Summary The ARTIST project aims at providing concepts techniques and tools for the modernization of software by a migration to the cloud Many tools have been developed in the context of different WP s of the ARTIST project Allowing software engineers and modellers to apply these tools for real world migrations scenarios they need to be integrated into a common environment In this deliverable we report on
26. and also stored in the Cache If it is it is retrieved from the Cache Stereotype metaclass MaterializedView Figure 14 Stereotype for MaterializedView pattern For automatically generating code for this pattern in order for an operation to acquire the logic to implement the materialized view pattern it needs to have the lt lt MaterializedView gt gt stereotype applied as shown for the updateProduct operation in Figure 15 Then the corresponding code template in code level is automatically generated Then when executing the code generator the necessary imports as well as the code are automatically generated as shown in Figure 16 a EI lt Package gt org 4 FI lt Package gt agoncal 4 EI lt Package gt application a lt Package gt petstore EI lt Package gt domain a lt Package gt service H lt Class gt OrderLineService H lt Class gt OrderService H lt Class gt ItemService H lt Class gt CategoryService a H lt Class gt ProductService E lt Property gt itemService ItemService lt Operation gt createProduct entityToCreate Product Product lt Operation gt findProduct entityld Long Product 0 1 lt Operation gt findAllProduct Product 0 lt lt MaterializedView gt gt lt Operation gt updateProduct entityToUpdate Product Product lt Operation gt removeProduct entityToRemove Product H lt Class gt CustomerService 57 lt Profile Application gt objectif
27. ated model based tool support for software engineers and modellers to carry out such a process As transformations play a crucial role in such a migration scenario the transformation composition language allows software engineers and modellers to chain them into a coarse grained transformation This language supports transformation technologies mainly applied in the context reverse engineering application code into models cf WP8 and forward engineering application code hosted by a cloud environment from models cf WP9 Considering the latter transformations developed in the context of WP9 mainly realize model to model transformations with the purpose of refining and optimizing them towards a selected cloud environment and producing the pertinent application code from such models Clearly the quality of reverse engineered models plays a crucial role as they are considered as starting point for forward engineering activities Only if they their quality is appropriate the quality of the models and generated application code as a result of such a transformation chain will be sufficient and useful for software engineers and modellers Measuring the quality of generated application code is provided by calculating dedicated metrics including maintainability Project Title ARTIST Contract No FP7 317859 www artist project eu Page 10 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Dat
28. ation discoveryInformation ServletRequest req String returnTourl Customer ret null Nerify the Information returned from the OP This is required according to the spec ParameterList response new ParameterList req getParameterMap try VerificationResult verificationResult getConsumerManager verify returnToUrl response discoveryInformation Identifier verifiedIdentifier verificationResult getVerifiedId if verifiedIdentifier null AuthSuccess authSuccess AuthSuccess verificationResult getAuthResponse if authSuccess hasExtension SRegMessage OPENID NS SREG MessageExtension extension authSuccess getExtension SRegMessage OPENID NS SREG if extension instanceof SRegResponse ret sc verifiedIdentifier getIdentifier ret sc getSubjectbyId verifiedIdentifier getIdentifier ret setOpenId verifiedIdentifier getIdentifier H catch Exception e String message Exception occurred while verifying response throw new RuntimeException message e return ret Figure 28 Generated code from stereotyped example model Project Title ARTIST Contract No FP7 317859 www artist project eu Page 39 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 5 Advances in Measuring the Quality of Generated Code 5 1 Functional Description In the first stages of the ARTIST methodology pre migration
29. ations are supported They refer to the respective Eclipse based technologies Acceleo ATL ATL EMFTVM and MoDisco Project Title ARTIST Contract No FP7 317859 www artist project eu Page 24 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 4 Advances in Cloud Optimization Patterns In the ARTIST project transformation techniques are applied in combination with annotation based modeling 8 for realizing optimization patterns as contributed by WP9 In following we report on a selected set of patterns for which we have developed concrete transformations and profiles aiming to turn on premise software into cloud based software and optimize certain software artefacts for a selected cloud environment 4 1 Key Value Storage Pattern 4 1 1 Functional Description This pattern aims to change the architecture of the database by converting a relational schema into a key value storage In order to successfully apply this pattern first the domain model of the application has to be extracted as it is described in D9 3 For the Google App Engine we use the Objectify profile shown in Figure 6 The transformations explained in D9 3 automatically annotate the corresponding entity classes and properties with the corresponding annotations Entity Embed Old as shown in Figure 7 for an example model of the Petstore Finally when the code generator is launc
30. c calculator prototype component comprises three components e Metric Explorer This is the main component of the Maintainability Metric calculator current prototype It provides the calculation of all the required metrics that are used to generate the maintainability metric Besides it also provides exporting features to convenient formats like XML or JSON e Structures This component contains the structures of the inputs and outputs models that the Metric Explorer uses It also provides the functionality for generating the output file formats XML JSON e Test Cases This component is provided for implementing the testing of the Metric Explorer component It generates several use cases that test the functionality of the Maintainability Metric calculator The test case generates console logs and XML files with several examples DEWS and JavaPetStore 5 2 3 Technical specifications All the components are developed in JavaSE 1 6 So this is the minimum java version for executing the API There are no any other requirements User Interface There is no user interface implemented as the result obtained from Maintainability Metric calculator will be consumed by other ARTIST tools or used for validation For executing the Metrics Explorer API the user has to execute the test cases included in the API Several input parameters can be changed for obtaining new metrics of different projects Back end Project Title ARTIST Contract No FP7 31785
31. de we developed tool support for calculating pertinent metrics including maintainability with the main purpose to reason about possible improvements achieved by a cloud oriented software migration Project Title ARTIST Contract No FP7 317859 www artist project eu Page 46 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 8 References 1 Kusel A Sch nb ck J Wimmer M Kappel G Retschitzegger W Schwinger W Reuse in Model to M Languages Are We There Yet Software amp Systems Modeling pp 1 36 2013 2 Bergmayr A Troya J Wimmer M From out place transformation evolution to in place model patching I Automated Software Engineering ASE pp 647 652 2014 3 Petri C A Kommunikation mit Automaten Ph D thesis Institut f r Instrumentelle Mathematik Bonn 1962 4 Bergmayr A Grossniklaus M Wimmer M Kappel G UML Profile Generation for Annotation based M Conf on Softwae Engineering and Software Management SE2015 2015 5 IEEE IEEE Standard Glossary of Software Engineering Terminology 1990 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 47 of 47
32. e 31 03 2015 1 3 Main Innovations In this deliverable we set the focus primarily on i the integration of ARTIST tools to support model based software migration to the cloud ii the development of a composition language to chain transformations as part of the concrete cloud oriented migration scenario iii advances in the development of transformations and profiles to realize cloud optimization patterns for a selected environment and iv advances in the calculation of automatically generated source code metrics e ARTIST integrated environment Provides a common interface to ARTIST tools to support software engineers and modellers to carry out software migrations to the cloud e Transformation composition language Allows multiple transformations to be composed into a transformation chain thereby enabling their automatic execution if the chain becomes executed and the reuse of them in the sense that they are loosely coupled by a more coarse grained transformation e Transformations and profiles for cloud based optimization Supports the improvement of software artefacts with novel cloud optimization opportunities e Quality measurements for generated application code Makes the generated code of ARTIST tools measureable 1 4 Delivered Components All realized components are packaged either as Eclipse plugins or Eclipse projects The selected license is the Eclipse Public License EPL which is a known as a commercial friendly
33. e Homogeneous usability and access mechanism through the user interface to the Eclipse based ARTIST tools through contextual menus that offer context sensitive options based on selected artefacts in the local workspace This common access mechanism complements other tool specific ones already provided by the tools themselves such as the Eclipse runtime configurations e Grouping of the ARTIST tools within common toolsets Model Discovery Toolset Model Understanding Toolset Model Cloudification and Optimization Toolset or Code Generation toolset These user interface features are aiming to improve the interoperability and usability of the ARSTIST tools within the Eclipse environment and supporting the access to external ARTIST Web based tools as well were agreed by the consortium both technical and use case providers in an integration workshop held during an ARTIST general assembly 2 2 Technical Description ARTIST Integrated Environment ARTIST IDE is implemented using Eclipse PDE Plug in Development Environment collecting most of the ARTIST tools as plugins and features within its body allowing for a single installation for ARTIST tools and also an update site ARTIST IDE also owns a parent plugin as the main feature which is depending on by several tools defining an Eclipse perspective for ARTIST a preference page tree entry housing preferences for some of the tools and an ARTIST top menu and a toolbar for launching external tools
34. e transformation composition language can be used in practice A dedicated menu entry is offered to execute defined transformation chain right click on moola script and select Run Moola 3 3 1 Defining transformation chains Transformation chains are composed of transformations defined in a moola script The following example composes three transformations that are executed one after each other def a trafo name a setup configuration for name def b trafo name b setup configuration for name def c trafo name c I setup configuration for name define the dependencies between the transformations b dependsOn a c dependsOn b Dependencies between transformations can also be defined within the signature of a transformation def a trafo name a setup configuration for name def b trafo name b dependson a I setup configuration for name def c trafo name c dependsOn b I setup configuration for name Moreover a short cut can be used to define the order in which the transformations shall be executed Finally it is possible to explicitly define the entry point of the transformation chain run inOrder a b c start with b 3 3 2 Conditional Branching Dependencies can also be annotated with conditions A condition needs to forward control to exactly one succeeding t
35. eAll MXBean toLower gt debug tmp name 34 pkg UML2 Package UML2 Package allInstancesFrom RM gt any var temp name var name gt debug pkg 85 op name String s name gt debug op 86 87 to 88 t UML2 Operation 89 do 98 if not pkg oclIsUndefined CH if not pkg sub_stereotype op_name oclIsUndefined Figure 22 Annotate4RM transformation A sample of the resulting PIM model with RM stereotypes is shown in Figure 23 memory runtime thread Interface Interface Interface El MemoryMXBeai E RuntimeMXBeai El ThreadMXBea gt eng spcoop monitors jvm E JVMResMonitor ZS JVMResMonitor stop void restart void start void Figure 23 PIM model annotated with Resource Monitor profile The following step consists on merging the annotated PIM model with a Platform Dependent Model that links concepts of the PIM profile to the classes needed to resource properties values in Google App Engine as already shown in Figure 2124 The transformation is performed by applying the respective transformation RM2GAEMapper atl that relates classes attributes and operations of the PIM profile with Project Title ARTIST Contract No FP7 317859 www artist project eu Page 36 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 correspondent ones of the
36. el as well as the necessary import is automatically generated by the code generator cf Figure 10 import com googlecode objectify annotation Cache Entity ac ache public class Item Figure 10 Annotation automatically generated for the Cache pattern in GAE 4 2 2 Technical Description As explained in D9 5 1 we have extended the Acceleo based code generator developed by Obeo Networks For this specific pattern we add support for including the Cache annotation and the corresponding imports 4 2 3 User Manual In order to execute this pattern for having the annotations included in the code the user needs to execute the extended code generator after the lt lt Cache gt gt stereotype has been applied to the corresponding classes Project Title ARTIST Contract No FP7 317859 www artist project eu Page 27 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 4 3 Multitenancy Pattern 4 3 1 Functional Description As we explained in D9 3 the Google App Engine offers a PaaS service to its developers and we do not have to worry about splitting the data in the database among tenants since GAE manages it automatically and transparently to the developer GAE offers the Namespaces service to implement multitenancy By using this service namespaces can be set obtained and validated using namespace manager Although in D9 3 we presented the p
37. ending the specific operations of service classes that are annotated with lt lt MaterializedView gt gt Specifically the extension in code level refers to the inclusion of the template in said operations 4 4 3 User Manual In order to execute this pattern for having the code included in the operations the user needs to execute the extended code generator after the lt lt MaterializedView gt gt stereotype has been applied to the corresponding operations 4 5 Circuit Breaker Pattern 4 5 1 Functional Description A circuit breaker acts as a proxy for operations that may fail The proxy should monitor the number of recent failures that have occurred and then use this information to decide whether to allow the operation to proceed or simply return an exception immediately or wait for a specific timeout for retrying the operation We have implemented this pattern in a model level as a stereotype extending an operation since it is within methods where the calls to a specific service may fail As we need the information about the number of failures before the circuit breaker acts we have set an attribute threshold in the stereotype We also need to know the time we want the application to wait before retrying the operation something that is stored in the timeout attribute The stereotype we have defined is shown in Figure 17 Stereotype CircuitBreaker threshold Integer 1 metaclass timeout Integer 1 Operation Fi
38. escribing the corresponding component 6 4 Licensing Information The selected license is the Eclipse Public License EPL which is a known as a commercial friendly open source license This should facilitate the future potential reuse and integration of the toolbox or at least of some of its components by external partners 6 5 Download Instructions The sources of the different components developed in the context of this deliverable have been pushed to the public ARTIST repository https github com artist project ARTIST tree master source Tooling migration integrated environment gt Eclipse Public License Online Available http www eclipse org legal epl v10 html Project Title ARTIST Contract No FP7 317859 www artist project eu Page 45 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 7 Conclusions In this deliverable we have reported on i the integration of ARTIST tools to support model based software migration to the cloud ii the development of a composition language to chain transformations as part of the concrete cloud oriented migration scenario iii advances in the development of transformations and profiles to realize cloud optimization patterns for a selected environment and iv advances in the calculation of source code metrics Considering the ARTIST integrated environment it is developed on top of the
39. f the original PSM This is the output of the model discovery understanding phase of the ARTIST methodology and input to the transformation described in this section Taking into consideration the migration goal described above the first step of the migration is to map resources in JMX and map them to the vocabulary of the Resource monitor PIM profile For this purpose an in place ATL transformation Annotate4RM atl has been created A snippet of the transformation regarding the mapping of Interfaces is shown below Project Title ARTIST Contract No FP7 317859 www artist project eu Page 35 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Annotate4RM atl 53 54 55 Annotate the MXBeans 569 rule AnnInterface 57 from 58 s UML2 Interface in IN 59 s name endsWith MXBean 60 61 using 62 temp name String s name replaceAll MXBean 63 st UML2 Stereotype thisModule rm stereotypes gt any var temp name var name 64 65 to 66 t UML2 Interface 67 do 68 We apply the stereotype 69 if not st oclIsUndefined 70 s applyStereotype st 71 72 annotate all operations in this bean with their stereotypes 73 for op in s getOperations 74 thisModule AnnOperation op 75 76 77 79 gt lazy rule AnnOperation 30 from 81 s UML2 Operation 82 using 83 temp name String s interface name replac
40. gt gt lt Class gt Item E lt lt Entity gt gt lt Class gt Category E lt lt Entity gt gt lt Class gt Product E lt lt Multitenancy Entity gt gt lt Class gt Customer E lt lt Embed gt gt lt Class gt Address Figure 12 Customer class annotated with the Multitenancy stereotype import com google appengine api NamespaceManager public class CustomerService public Customer createCustomer Customer entityToCreate if entityToCreate null TODO Provide business logic if required finally the entity is stored synchronous approach The Namespace is set for the logged Customer NamespaceManager set Long toString entityToCreate getId ofyO save entitylentitylocreate now else TODO Exception handling if the entity is null return entityToCreate public Customer findCustomer long entityId Customer c ofy load type Customer class filter id entityld first now The Namespace is set for the logged Customer NamespaceManager set Long toString c getId return c Figure 13 Some code generated for the Multitenancy pattern in the CustomerService class 4 3 2 Technical Description As explained in D9 5 1 we have extended the Acceleo based code generator developed by Obeo Networks For this specific pattern we add support for extending specific service classes and for adding the necessary imports 4 3 3 User Manual In order to execute this patte
41. gure 17 Stereotype for the CircuitBreaker pattern In order for an operation to acquire the logic to implement the circuit breaker pattern it needs to have the lt lt CircuitBreaker gt gt stereotype applied cf Figure 18 Then the corresponding Project Title ARTIST Contract No FP7 317859 www artist project eu Page 31 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 code template in code level is automatically generated together with the CircuitBreaker java and ServiceCircuit java classes 4 lt Model gt petstore app 57 Package Import gt UML Primitive Types 57 Package Import gt Java Primitive Types a EI lt Package gt org 4 lt Package gt agoncal 4 lt Package gt application 4 lt Package gt petstore EI lt Package gt domain a EJ lt Package gt service H lt Class gt OrderLineService H lt Class gt OrderService a H lt Class gt ItemService ez lt Operation gt createltem entityToCreate Item Item lt Operation gt findltem entityld Long Item 0 1 lt lt CircuitBreaker gt gt lt Operation gt findAllltem Item 0 lt Operation gt updateltem entityToUpdate Item Item lt Operation gt removeltem entityToRemove Item Figure 18 Operation annotated with the CircuitBreaker stereotype 4 5 2 Technical Description As explained in D9 5 1 we have extended the Acceleo based code
42. hed the corresponding annotations are automatically created for the generated classes and properties cf Figure 8 4 1 2 Technical Description As explained in D9 3 the objectification component for generating Objectify based PSMs from PIMs that capture the domain model of an application is realized based on two model to model transformations e DomainModelObjectification Generic transformation rules to apply Objectify based stereotypes to domain model elements e DataAccessObjectsObjectification Generic transformation rules to generate service classes for entities of a domain model The main technologies used to realize the objectification component are as follows e UML metamodel for representing the discovered UML models which is included in the UML2 plugin e ATL EMFTVM for implementing purposes e Java for implementation purposes Furthermore and as explained in D9 5 we have extended the Acceleo based code generator developed by Obeo Networks which includes the following aspects e Generic Code Generator We have added support for UML profiles to the Acceleo based code generator developed by Obeo Networks In this respect we have also restructured the code templates as we produce Java annotations for corresponding UML stereotypes e Code Generator Extension for Objectify We have implemented an Acceleo based code generator extension for the Objectify framework e Code Generator UI Code generator UI developed by Obeo
43. ies AC Afferent Coupling EC Efferent Coupling ND Nesting Depth DMS Distance from main sequence PC coverage CC Cyclomatic complexity ILCC IL Cyclometic complexity This prototype calculates the final Maintainability metric through the combination of the atomic metrics The final objective is to calculate both metrics the one obtained from the source code and the one calculated from the generated code and analyse possible variations 5 2 Technical description 5 2 1 Prototype architecture The current Maintainability metric calculator prototype architecture is a java API that explores source files to generate several Metrics of a specific project The following image depicts the overall architecture Project Title ARTIST Contract No FP7 317859 www artist project eu Page 40 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Conponent model Y 3 Cosole Log 2 Xml result files Figure 29 MMC High level architecture While the main objective of the Maintainability Metric Calculator is to expose an API that any other plug in or RCP could use to obtain the metrics generated in the ARTIST project it also provides Test Cases to access the same functionality as if used programmatically The generated metrics is available in XML files and console log 5 2 2 Components description The current Maintainability Metri
44. ignature In the following an example of a model and one of its generated methods Project Title ARTIST Contract No FP7 317859 www artist project eu Page 38 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 a lt Package gt eu a EI lt Package gt artist a lt Package gt modernization a lt Package gt eng a E lt Package gt openid EI lt Package gt subject a E lt lt AuthenticationProvider gt gt lt Class gt OpenIDAuthenticationProvider gt Eq lt Property gt sc CustomerService 0 1 gt Ez lt Property gt RETURN URL String 0 1 gt EG lt Property gt consumerManager ConsumerManager 0 1 gt lt Operation gt performDiscoveryOnUserSuppliedidentifier userSuppliedidentifier String 0 1 Discoverylnformation 0 1 gt E lt Operation gt createOpenIdAuthRequest discoverylnformation Discoverylnformation 0 1 returnToUrl String 0 1 AuthRequest 0 1 gt E lt Operation gt processReturn discoverylnformation DiscoveryInformation 0 1 req ServletRequest 0 1 returnToUrl String 0 1 Cus b 3 lt Operation gt getConsumerManager D ConsumerManager 0 1 gt E lt Operation gt getReturnToUrl String 0 1 Figure 27 Stereotyped example model par Processes the returned information from an authentication request be Je the OP public Customer processReturn DiscoveryInform
45. ime CurrentThreadUserTime 1 ThreadCpuTime ThreadCpuTime 1 ThreadUserTime ThreadUserTime 1 ThreadInfo ThreadInfo 1 porono nn nng a nnn p Stereotype OperatingSystem base Interface Interface 1 Name Name 1 El ObjectPendingFinalizationCount ObjectPendingFinalizationCount 1 Arch Arch 1 E HeapMemoryUsage HeapMemoryUsage 1 Version Version 1 E NonHeapMemoryUsage NonHeapMemoryUsage 1 AvailableProcessors AvailableProcessors 1 base Interface Interface 1 SystemLoadAverage SystemLoadAverage 1 base Class Class 1 base Class Class 1 Figure 20 Platform Independent Profile for Resource Monitoring 4 6 1 2 Platform Specific model for Resource Monitoring To exploit the information made available from Google App Engine a library for resource monitoring has been developed in the context of ARTIST Project This library uses platform specific services GAE QuotasService Module APIs GAE SystemProperty class plus other standard Java calls to gather information about resources A model for this library has been generated and annotated with the Resource profile and used as the PDM for this transformation Project Title ARTIST Contract No FP7 317859 www artist project eu Page 34 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 ST GAE res monit
46. loying the modernized applications in specific Cloud infrastructures Keyword List Transformation Composition Transformation Configuration Transformation Parameterization Repository Licensing information Project Title ARTIST Generally EPL open source indicated otherwise The document itself is delivered as a description for the European Commission about the released software so it is not public Contract No FP7 317859 www artist project eu Page 2 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Document Description Document Revision History Modifications Introduced Version Date Modification Reason Modified by v0 1 25 02 2015 Table of Contents TUWIEN v0 5 13 03 2015 Content for all Sections ATOS ENGINEERING i TECNALIA TUWIEN v0 9 17 03 2015 Compilation for internal review TUWIEN v1 0 27 03 2015 Final version ATOS ENGINEERING TECNALIA TUWIEN Project Title ARTIST Page 3 of 47 Contract No FP7 317859 www artist project eu D9 7 Integrated Environment for maintaining developing Table of Contents T ble of Contents cuina a 4 Tablero BI SUGGS sa 7 Table Of Tables sn ananasen ie asset iError Marcador no definido Terms and abbrewviations nicesi iseei ko cakes 8 EXECUIVO SUMMAKV cc cg code A Aer ed eien 9 1 Introduction u
47. ncnnannnns 37 4 7 2 Technical Descriptio Nii ensia i a Ad 37 5 Advances in Measuring the Quality of Generated Code 40 5 1 Functional Description siriene meni aa ea ea aaa aeea airea aiea 40 5 2 RK le ee ele Le EE A0 5 2 1 Prototype architecture sssssssseseseessssssrrerrrssssssrrerrtssssssrrernessssssrrernessssesreernes 40 5 2 2 A 41 5 2 3 Technical specitications s vitse A A eda ee es 41 5 2 4 Package informations ann na ainia See 42 5 3 User Manda dro 43 6 Delivery and Usage 45 6 1 Package INTOFMALION viii di a A a 45 6 2 Installation Instructlons iei aan a i 45 6 3 User Manual crestei artis 45 6 4 Licensing Informationen a e a a ea dad 45 6 5 Download Instructions enrrnannranonvrnnenvnnvnrrrennranennnnnervnnrnrrnennrasennnnsersnerrasennrsssnvensnrseee 45 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 5 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 7 gt gene Oe Te EE 46 CN e 47 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 6 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 Table of Figures FIGURE 1 ARTIST INTEGRATED ENVIRONMENT s ennnnnnnnennnnnnnnnnenernnnnnnnnnnsnennrnnnnnnnnnnsnernnnnnnnnnnenssnennnnnnnnnner 14 FIGUR 2 ARTIST PERSPECTIVE anse 15 FIGURE 3
48. ng process Version 1 0 Final Date 31 03 2015 4 2 Caching Pattern 4 2 1 Functional Description The application of this pattern aims at reducing the time for performing reads to the database facilitating database scalability In the Google App Engine we simply need the lt lt Cache gt gt stereotype of the Objectify profile shown in Figure 6 on the entities that we want to be cached Thus we only need to know which classes out of those representing the domain model we want to be cached and stereotype them as shown in for the Item class in Figure 9 a 8 platform resource eu artist migration modernization uml2java test model petstore domain objectified dao um 4 lt Model gt petstore app Ex Package Import gt UML Primitive Types as lt Package Import gt Java Primitive Types a EI lt Package gt org a EI lt Package gt agoncal 4 lt Package gt application 4 lt Package gt petstore 4 lt Package gt domain H lt lt Embed gt gt lt Class gt CreditCard lt lt Entity gt gt lt Class gt OrderLine lt lt Entity gt gt lt Class gt Order lt lt Entity Cache gt gt lt Class gt Item lt lt Entity gt gt lt Class gt Category lt lt Entity gt gt lt Class gt Product lt lt Entity gt gt lt Class gt Customer lt lt Embed gt gt lt Class gt Address 0 00 00 010 10 10 1 Figure 9 Class annotated with the Cache stereotype Then the corresponding Cache annotation at code lev
49. nnagjort i 10 1 1 About this deliverabl oir lada 10 1 2 Fitting into the overall ARTIST solution 10 1 3 Mait INNOVA TON E 11 1 4 D liver d Components dees get de eeaeee a 11 1 5 Document structure iii 11 2 ARTIST Integrated Environment 13 2 1 Functional Description rrrrrnnnnrorvrnnonannnnnnvnnnrnrsnnnnnnnnrvnnsrnsnnnnnnnnrrnnssnsnrnnnnnnnsenssrsnannnes 13 2 2 Technical Descrip rita ter 14 2 2 1 ARTIST Ult oras 14 2 2 2 Model Discovery Toolbon 16 2 2 3 Model Understanding Toolbon 17 2 2 4 Code Generation Toolbox un 17 2 2 5 Package information metida diras 17 2 3 User Mangal cnica aiii 18 3 Transformation Composition Language 20 3 1 Functional Description 2s 2cceccccscavecdaescceddenssnant de tedecgceaseaisdes ced ccs coe eaeoe aeii eaea aie 20 3 2 Technical Specification nssssesssenrnsnsssserrtsrssssrrerrnsnssssrnernnsnssesrnennnssssesrnennnssssesnnenn 22 3 3 User Manuales tario 23 3 3 1 Defining transformation chalns 23 3 3 2 Conditional Branching seereis edeneda aaia i aea ede EEEa an 23 3 3 3 leid ue 24 3 3 4 Supported Technologles 24 4 Advances in Cloud Optimization battermns 25 4 1 Kev V lue Storage PM ektet 25 4 1 1 Functional DEsCrPtON EE 25 4 1 2 Technical Desen ptn ievcccseees cece li ienie eee ea ae eiaeaeno aaia 25 4 1 3 User Manual une desk iia 26 4 2 Caching Patt rn uaanseseste este a 27 4 2 1 Functional DEscriptlon pude 27 Project Title ARTIST Contract No FP7 317859 www artist projec
50. oblems Javadoc i Decla No consoles to display at this time Properties D Mein Ip MetricCalculatorT est jay IL NestedBlockDepthT est java E E JRE System Library JavaSE 1 6 E EI Di CH E E E E Alt Enter Figure 33 Maintainability metric calculator testing Note The user has to change the hardcoded input parameters of the test cases manually Project Title ARTIST Page 44 of 47 Contract No FP7 317859 www artist project eu D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 6 Delivery and Usage 6 1 Package Information All realized components are packaged either as Eclipse plugins or Eclipse projects 6 2 Installation Instructions Components that have been realized in terms of Eclipse plugins need to be located in the respective Eclipse plugins folder These components provide a dedicated Ul to execute them How they can be used is described in the respective user manuals Components that are not yet realized in terms of Eclipse plugins are provided as Eclipse projects They need to be located in the respective Eclipse workspace to execute them We have prepared a dedicated configuration to launch them in Eclipse Again how they can be launched is described in the respective user manuals 6 3 User Manual User manuals are provided by the sections d
51. on directly via the chain The following Listing shows how the three phases can be accessed java2javamodel lt lt before the transformation is executed java2javamodel work the transformation itself java2javamodel gt gt after the transformation has been executed 3 2 Technical Specification The transformation composition language uses the following components and technologies eu artist migration transformation composition ui provides an user interface to execute a transformation chain eu artist migration transformation composition core implements the transformation composition language based on Groovy provides a translation of defined transformation chains into a Petri net representation and enables the execution of transformation chains eu artist migration transformation composition delegates delegates to the supported technologies such as Acceleo ATL ATL EMFTVM Modisco Groovy it is used as a host language for implementing the transformation compositin language Java JVM it is used to implement the delegators to the supported technologies Groovy is dynamically compiled to JVM bytecode Project Title ARTIST Contract No FP7 317859 www artist project eu Page 22 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 3 3 User Manual In this Section we give an overview of how th
52. onceptual and behavioural integrated process that drives the operation of the entire ARTIST Suite and its constituting tools e The Methodology Process Tool MPT provides another mechanism to improve the behavioural and functional integration of the ARTIST Suite tools which are orchestrated within the MPT in the different walk through guides provided e g the Eclipse Cheat Sheets following the personalised ARTIST methodology e The ARTIST Integrated Environment described in this section provides a seamlessly integrated common user interface for all those ARTIST Suite tools that run within the Eclipse environment The ARTIST Integrated Environment is an Integrated Development Environment IDE hosted in the Eclipse IDE which offers the Model Driven Engineering tools developed by ARTIST which are compatible with Eclipse These ARTIST tools mostly targeting software engineers and modellers cover a significant percentage of all the ARTIST tools Nonetheless few ARTIST tools cannot be directly integrated simply because they are not compatible with the ARTIST framework Nonetheless for these cases other loose coupling integration approaches have been addressed as well cf D6 4 1 After this conceptual introduction of the scope and motivation of the ARTIST Integrated Environment we continue describing the main functionality it offers to the end user e A single delivery and installation procedure whereby the entire ARTIST Integrated Envir
53. onment can be installed either from a distributable bundle or from the ARTIST update site Users can install the complete ARTIST Suite or individual components e g Eclipse features e An integrated configuration for all ARTIST Suite tools within a single tree structure in the ARTIST preference pages Additionally endpoints to access external i e Web based ARTIST tools can be configured in these pages e Top tool bars and menu bars to access external Web based ARTIST Tools such as the Maturity Assessment Tool the Methodology Process Tool the Certification Tool etc as well as wizard based tools of the ARTIST Suite such as the Enterprise Architect Bridge the Reusability Trace Tool etc These external Web based tools can be accessed through the internal Eclipse Web browser or through an external one depending on the configuration e A Wizard to create an ARTIST Cloud migration project based on Java which defines a Cloud migration project folder structure according to the ARTIST MDE methodology Project Title ARTIST Contract No FP7 317859 www artist project eu Page 13 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 e A layout organization of ARTIST tool views in Eclipse perspectives The main ARTIST perspective includes by default the Repository view from where the user can browse and access reusable artefacts available in the repository
54. open source license This should facilitate the future potential reuse and integration of the toolbox or at least of some of its components by external partners The source of the integrated environment and the transformation composition language is located in the public ARTIST repository https github com artist project ARTIST tree master source Tooling migration integrated environment Regarding advances in cloud optimization pattern modifications have been carried out to the model cloudification framework MCF as introduced in D9 3 and D9 5 https github com artist project ARTIST tree master source Tooling migration modernization MCF Regarding advances in measusring the qualitiy of generated source code the respective components are located at https github com artist project ARTIST tree master source Tooling pre migration technical feasibility tool SCC 1 5 Document structure The document is structured as follows In Section 2 we introduce the ARTIST integrated environment on top of the Eclipse environment We introduce the transformation composition language in Section 3 In Section 4 we report on the realization of a set of optimization patterns for a selected cloud environment while in Section 5 we report on how the 1 Eclipse Public License Online Available http www eclipse org legal epl v10 html Project Title ARTIST Contract No FP7 317859 www artist project eu Page 11 of 47 D9 7 Integrated
55. ors uml 3 4 platform resource eu artist migration modernization eng monitoring PDM GAE res monitors uml a Es lt Model gt root model a Es lt Model gt GAE res monitors a EI lt Package gt eu 4 ET lt Package gt artist a EI lt Package gt eng 4 EI lt Package gt modernization 4 EI lt Package gt monitors a EI lt Package gt gae H lt Class gt ObjectName H lt Class gt MemoryUsage a E lt lt OperatingSystem gt gt lt Class gt OSM E lt Property gt runtime Runtime 0 1 lt Operation gt getName String 0 1 lt lt Arch gt gt lt Operation gt getArch String 0 1 lt lt Version gt gt lt Operation gt getVersion String 0 1 lt lt AvailableProcessors gt gt lt Operation gt getAvailableProcessors int 0 1 lt lt SystemLoadAverage gt gt lt Operation gt getSystemLoadAverage D double 0 1 H lt lt Thread gt gt lt Class gt ThreadM E lt lt Runtime gt gt lt Class gt RuntimeM H lt lt Memory gt gt lt Class gt MemoryM H lt Class gt ManagementFactory lt Class gt GAE_res_monitorsServlet Figure 21 GAE resource monitors PDM 4 6 2 Technical Specifications This section describes an example of migration of a SPCoop service responsible for monitoring and managing resources using JMX platform beans to the corresponding GAE compliant service The input Platform Independent class diagram represents the system once sliced to extract the relevant view o
56. ossibility to stereotype both operations and classes with the Multitenancy profile we only consider the stereotype of classes in order to automatically generate code that supports multitenancy The profile that we propose is shown in Figure 11 When a Class is stereotyped with Multitenancy this means that all the entities of this specific type consider multitenancy Consequently all the reads and writes on these entities will be done by applying the ID of the specific tenant or group of tenants At this level it can also be specified the type and level of multitenancy that the system must provide although for GAE these parameters are not needed Enumeration Stereotype kr MultitenancyType MultitenancyLeve pa TABLE PER TENANT HARDWARE Ve vD OP_SYSTEM SEPARATED_SCHEMA MIDDLEWARE SHARED_SCHEMA DATA type MultitenancyType 1 level MultitenancyLevel 1 Figure 11 Steoreotype for Multitenancy In order to automatically generate code that supports multitenancy we have extended the Acceleo code generator to include some code related to multitenancy in some service classes of those entities stereotyped with lt lt Multitenancy gt gt The user should be aware that the entities that should be stereotyped with lt lt Multitenancy gt gt are those that must have their data split in the database In GAE the Namespace is set to be the ID of the user who is logged in the application For instance in the model of the Pet
57. ows multiple transformations to be composed into a transformation chain thereby enabling their automatic execution if the chain becomes executed Chaining transformations fosters reuse in the sense that existing transformations are loosely coupled by a more coarse grained transformation 1 Such a loose coupling ensures that the developers still have the control over the execution of the single transformations The latter is important not only to pause and resume a transformation chain in case of developers need to intervene e g manual changes need to be carried out on produced models but also to partially re execute the transformation chain as a result of updates to one or more transformations Such an incremental transformation execution can significantly reduce the runtime overhead particularly when computation intensive transformations are marginally revised 2 Moreover it can ensure that manual changes to existing models prior the re execution of a transformation in the chain are retained because they are only updated instead of entirely re created Definition of Transformation Chain Input Models ES Output Models Execution of Transformation Chain Figure 5 Conceptual overview of transformation composition From a conceptual perspective a transformation chain is considered as a single transformation where its input is determined by the entry point of the transformation chain i e transformations that do not require input f
58. p file from https github com artist project ARTIST tree master binary ARTIST IDE 2 Extract the Zip contents to a desired location 3 Onthe Help menu of Eclipse click Install New Software 4 Click the Add button at the right side of the Work with dropdown list a Click the Local button and select the update site folder extracted from the zip file on step 2 Click Ok button b Click Ok button 5 Select the ARTIST features you want to install and follow the instructions on screen 6 Restart Eclipse Project Title ARTIST Contract No FP7 317859 www artist project eu Page 19 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 3 Transformation Composition Language A modernization scenario often requires carrying out several different transformations to ultimately gain the modernized software artefacts These transformations need to be properly chained and maintained because typically a diverse set of transformations realized by different transformation languages need to be executed in an appropriate order in particular if there are dependencies between these transformations For instance a transformation may require models as input that is produced by another transformation as output In such a case the order in which they are executed is vital for the produced result 3 1 Functional Description We have developed a dedicated language that all
59. radle The following Listing shows the definition of a transformation chain consisting of five transformations that depend on each other The first transformation produces a Java model from a Java code base In fact MoDisco is used to perform this first transformation which is realized as a model discoverer in the context of WP8 In a second step a UML model is produced from the previously obtained Java model where this UML model is considered as input for a slicing transformation in the third step Then in the fourth step the sliced UML model is refined towards the Google App Engine before in a final step code is generated from it All the transformations in this scenario have been developed in the context of WP8 and WP9 def java2javamodel trafo name java2javamodel of MoDisco project JavaProject def java2uml trafo name java2uml of ATL I metaModel Java Java ecore metaModel UML UML ecore input Java IN javamodel xmi JavaSource output UML OUT umlmodel Table transformation Java2UML asm def uml2sliceduml trafo name uml2sliceduml of ATL EMFTVM metaModel UML UML ecore input Java IN javamodel xmi JavaSource output UML OUT umlmodel Table transformation UML2SlicedUML asm def uml2refineduml trafo name uml2refineduml of ATL EMFTVM metaModel UML UML ecore input Java
60. ransformation For instance if the condition of the dependency of c to b doesn t match a default route has to be defined An exception will be thrown if no condition matches and no default branch is defined Project Title ARTIST Contract No FP7 317859 www artist project eu Page 23 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 def assertion some value def a trafo name a setup configuration for name def a trafo name b setup configuration for name assertion some other value def a trafo name c I setup configuration for name def a trafo name d setup configuration for name define the dependencies between the transformations b dependson a c dependsOn b asseration some other value d dependson b 3 3 3 Concurrency Transformations in a chain are executed once all the transformations they depend on have been executed As a result transformations are if possible executed in parallel def a trafo name a setup configuration for name def b trafo name b I setup configuration for name def c trafo name c I setup configuration for name J b dependsOn a c dependsOn a 3 3 4 Supported Technologies Currently four different types of transform
61. rn for adding the necessary code the user needs to execute the extended code generator after the lt lt Multitenancy gt gt stereotype has been applied to the corresponding domain classes Project Title ARTIST Contract No FP7 317859 www artist project eu Page 29 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 4 4 Materialized View Pattern 4 4 1 Functional Description When a query requires only a subset of the data from some entities such as a summary of orders for several customers without all of the order details it must extract all of the data for the relevant entities in order to extract the required information In addition to joining tables or combining data entities queries may also include the current values of calculated columns or data items Realizing the same query once and again influences negatively the performance of the system This pattern proposes to store the results of these frequently realized queries in the Cache improving the performance of the application We consider that these queries are realized inside specific methods of the classes in the migrated application Consequently we stereotype with lt lt MaterializedView gt gt those methods that contain queries of this type cf Figure 14 The idea is to first look if the value we are interested in is in the Cache If it is not the query is realized and the value returned
62. rom other transformations and the end point of the transformation chain determines its output The latter is produced by transformations on which no other transformations depend As a result a transformation chain is a directed graph where the arcs in the graph represent a dependency of one transformation to another Project Title ARTIST Contract No FP7 317859 www artist project eu Page 20 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 of the chain We exploit a place transition Petri net 3 as the formal representation to encode transformation chains and its well defined operational semantics to execute them In doing so the analysis techniques supported by this formalism can directly be used to e g check the reachability of a certain transformation from another one in the chain Moreover the fact that Petri nets permit concurrent state transitions enables transformations to be executed in parallel Finally because the placement of the tokens captures the state of the chain s execution it allows developers to intervene the chain thereby both a black box as well as a white box view on a transformation chain is provided Figure 5 gives a conceptual overview of defining and executing a transformation chain The definition of a transformation chain is enabled by a Groovy based domain specific language which is inspired by current build tools such as G
63. s for this feature are implemented the same way as the Model Understanding Toolbox s menu extensions and dialogs The user manuals and figures further explaining the tools can be found in the tool s respective deliverables WP8 series of deliverables 2 2 5 Package information Since all ARTIST tools individual package information are within their respective deliverables this section will only describe the delivery package of the main feature ARTIST Suite which consists of the folder structure shown below 4 gt src a fi gt eu artist suite a EH gt commands gt LaunchBrowserWithURLHandler java 4 Ei gt perspective gt ARTISTPerspectiveFactory java a EH gt preferences 4 Ej gt pages Jj gt ARTIST java Jj gt CT java gt MAT java LD gt MPT java Jj gt TFT java Jj gt PreferenceConstants java Jj gt Preferencelnitializer java a SR project AD ARTISTProjectSupport java a SR utils 453 WorkspaceHelper java a HH wizards ED NewARTISTProjectWizard java Jj gt ARTISTSuite java Figure 4 Package structure of ARTIST Suite Project Title ARTIST Contract No FP7 317859 www artist project eu Page 17 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 eu artist suite commands Contains the LaunchBrowserWithURLHandLer java which handles the browser launch actions of external tools eu artist suite perspecti
64. st case and select the Run as Java Application option Project Title ARTIST Contract No FP7 317859 www artist project eu Page 43 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process New Open Open With Open Type Hierarchy Show In HE Package Explorer 52 JJ UMLTes BA JRE System Libr F3 F4 Alt Shift W MetricCalci 2014 MetricCalcul E t Copyright ci package eu artist mign BA Referenced Libr H lib Copy E3 Copy Qualified Name X Delete SH eu artist mot Ctrl C Ctrl y Delete import eu artist migrs public class MetricCa D ClassE x D Compon DH Couplinc D CSExple Remove From Context Build Path Source Refactor Ctrl Alt Shift Down Alt Shift 5 Alt Shift T public static void int type 1 MetricCalculat D Cycloma JD JavaE xp s Import p MetricC p Export mc getMetrics q LC NestedE LI Searche JD UMLE xp References Declarations String folder eu artist mot D Compon D Method Refresh Assign Working Sets D Projecti D sure Debug As Run As Team Compare With Replace With Ip Source D UmiEle eu artist migi AU Afferent J ClassNu IO Cycloma EW Discovery Restore from Local History int type 2 MetricCalculat mc getMetrics i gt Ki Alt Shift x J D gt Run Configurations Pr
65. store shown in Figure 12 we can see how the Customer class is extended with the Multitenancy stereotype since the user wants each customer of the application to read write his her own data This means that when we execute the code generator some code specific for the NamespaceManager is added in the service class of the Customer In fact we consider that a new customer logs in whenever it is created or it is searched for For this reason these two operations of the CustomerService class get extended The necessary imports to support this service are also included automatically cf Figure 13 https developers google com appengine docs python multitenancy multitenancy Project Title ARTIST Contract No FP7 317859 www artist project eu Page 28 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 4 amp platform resource eu artist migration modernization uml2java test model petstore domain objectified dao uml 4 Es lt Model gt petstore app al lt Package Import gt UML Primitive Types 57 Package Import gt Java Primitive Types 4 EI lt Package gt org 4 lt Package gt agoncal 4 EJ lt Package gt application a ET lt Package gt petstore a EI lt Package gt domain H lt lt Embed gt gt lt Class gt CreditCard H lt lt Entity gt gt lt Class gt OrderLine H lt lt Entity gt gt lt Class gt Order H lt lt Entity Cache
66. t eu Page 4 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 4 2 2 Technical D ser plot unitat a a Edda ENEE 27 4 2 3 User Mandala ts 27 4 3 Multiten ncy Pata a dd Ain Set eee 28 4 3 1 Functional DescriPtiON iia da a a eg deg 28 4 3 2 Technical Description ssunsaurkru id ici iii eds 29 4 3 3 User Manli A AA E td 29 4 4 Materialized View Pattern rsrnnonnrnnonrnnnnrrnnnnranennnnnerrnnsnrrnennranenvnnssvrnssnrssennrnssnvnnsnnsen 30 4 4 1 Functional DESCriptio N E 30 4 4 2 Technical Description ii i A A A aa aa 31 4 4 3 WSer Mani Wall ie co aa aaa aa Seas ed 31 4 5 Circuit BreakerP tternksaruaassaan A redan 31 4 5 1 Functional Description arerrrnrrnannnnnnrvrvrnsrnsnnnnnnrnnvrnssnnnnnnnnrsnsenssnnnnnnnnrnnssnssnsnnnnnes 31 4 5 2 Technical Descriptio iia da ie 32 4 5 3 User Man al ispiciai ltda 32 4 6 Cloudification of Resource Monitoring COnCcerns ccccccccconononnnnnonononnnonnnnnnnonocananonannos 32 4 6 1 Functional Description senn eenei aeaa i a a a E a a a a 32 4 6 1 1 Platform Independent Profile for Resource Monitoring 33 4 6 1 2 Platform Specific model for Resource Monitoring ssssssesssressssssrserresssssse 34 4 6 2 Technical Specific ti iia startet 35 4 6 3 USer Manual si a 37 4 7 Federated Identity Patten 37 4 7 1 Functional Description oooooooccnnccnonononannnnnononanonononnnnnnnnnnnonononnnnnnnnnnnnnrnnonnn
67. the ARTIST integrated environment that provides a common interface to the ARTIST tools In this sense the integrated environment complements the methodology process tool cf WP6 with dedicated tool support for software engineers and modellers to carry out a migration process As in ARTIST we work towards a model based engineering approach to support cloud oriented software migration model transformations play a key role in the transition of software to the cloud In fact such a migration often requires carrying out several different transformations to ultimately gain the required software artefacts These transformations need to be properly chained and maintained because typically a diverse set of transformations realized by different transformation languages and technologies need to be executed in an appropriate order For this reason we have developed a dedicated language that allows software engineers and modellers to compose multiple transformations into a chain thereby enabling the automatic execution of such transformations if the chain becomes executed The language supports transformation technologies mainly applied in the context of reverse engineering application code into models cf WP8 and forward engineering application code hosted by a cloud environment from models cf WP9 In this deliverable we give an overview of the key concepts constituting this language and show how it can be applied for chaining transformations that have been
68. ting this language and show how it can be applied for chaining transformations that have been developed in the context of the ARTIST project for supporting cloud oriented software migration Moreover in the ARTIST project transformation techniques have been applied in combination with annotation based modeling 4 for realizing optimization patterns as reported by WP9 Deliverables In this deliverable we report on a selected set of patterns for which we have developed concrete transformations and profiles aiming to optimize certain software artefacts for a selected cloud environment In this respect not only model to model transformations are applied but also model to code transformations that generate cloud specific application code As the ARTIST migration methodology provides among others techniques to investigate on the feasibility of a migration to cloud mainly by providing metrics including source code maintainability 2 In this deliverable we report on the calculation of the maintainability metric of application code generated as a result of an ARTIST migration scenario with purpose to reason about possible improvements 1 2 Fitting into the overall ARTIST solution The ARTIST integrated environment supports the ARTIST migration methodology from a technical perspective by providing a tool suite to carry out real world migration scenarios including the ARTIST use cases In this sense it complements the methodology process tool with a dedic
69. tion with regards to coding Project Title ARTIST Contract No FP7 317859 www artist project eu Page 15 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 S Preferences oj ZS 0 type filter text Methodology Process Tool er L a reg Set MPT runtime preferences 4 ARTIST options Certification Tool Generic user Maturity Assessment Tool F O Application developer Methodology Process Tool Business user Repository Connections E At URLs for M Technical Feasibility Tool ARTISTCommon URL for MPT Web App ATL http 147 102 19 204 8082 eu artist methodology mpt webapp CD Customization reports Drools Path to MAT report Browse Ecore Tools Diagram EMF Facet EMF IncQuery ESL GEL Restore Defaults A a Apply o as Figure 3 ARTIST preference pages ARTIST Top Menu and Toolbar Menu and the toolbar actions allows the user to create an ARTIST migration project and launch external tools defined in the context of ARTIST Certification Tool Maturity Assessment Tool and Methodology Process Tool Both the ARTIST top menu and toolbar is created by adding an extension for org eclipse ui menus extension point in the plugin xml by adding a menu contribution The menu actions invoke an Eclipse command defined in the plugin xml by extending the org eclipse ui commands extension point These actions
70. ure 2 ARTIST Perspective ARTIST Preference Pages contributing to Eclipse s Preferences and PreferencePages extensions by defining dedicated preference pages ARTIST page contains a single checkbox which offers the user the option to launch the external tools whether in Eclipse s internal web browser or the system browser Technical Feasibility Tool page too contains a single checkbox to let the user set a default path for the TFT Report generation path Methodology Process Tool page consists of a radio button group by which the user can select a user role for MPT a text field for storing the default URL for MPT Web App and again a text field to store the path value for the MAT report to be consumed by MPT cheat sheets Repository Connections page contains an SWT table to collect and store connection information name and URL for the ARTIST Repository Maturity Assessment Tool page allows the user to set the default MAT URL on the text field provided and also user credentials for MAT Certification Tool page contains a text field to store the default value for the Certification Tool s URL All defined pages created by adding an extension for org eclipse ui preferencePages extension point in the plugin xml and also defining a class implementing the WorkbenchPreferencePage interface of the Eclipse s Ul package The preference page classes in ARTIST Suite also extend the FieldEditorPreferencePage class of Eclipse Ul for the ease of layout crea
71. ve Contains the ARTISTPerspectiveFactory java This class is responsible for the creation of the main layout of the ARTIST perspective eu artist suite preferences Contains the PreferenceConstants java which holds constant and default values that are being used by the preference pages and PreferenceInitializer java which initializes the preference values whenever a preference page is opened eu artist suite preferences pages This package contains the implementations of all the preference pages defined within the context of ARTIST Each class in this package defines a unique page in the Eclipse preferences tree view eu artist suite project Contains the ARTISTProjectSupport java This class offers a method for creation of an ARTIST Migration Project eu artist suite utils The package contains a single class called WorkspaceHeLper java This class offers methods for creating a base project adding nature to a project creation of folders and setting classpath for library files eu artist suite wizards Contains the NewARTISTProjectWizard java which is an extension of the Eclipse wizard enabling creation of an ARTIST project using the Eclipse wizards 2 3 User Manual ARTIST Integrated Environment and all its features plugin will be available for installation using Eclipse s Install New Software feature via ARTIST s update site Now it can be downloaded and installed manually Eclipse 4 2 Juno is required for installation but Eclipse 4
72. y So Profile Application gt multitenancyPIM 57 Profile Application gt materializedView Figure 15 Operation annotated with the MaterializedView stereotype Project Title ARTIST Contract No FP7 317859 www artist project eu Page 30 of 47 D9 7 Integrated Environment for maintaining developing forward engineering process Version 1 0 Final Date 31 03 2015 import com google appengine api memcache MemcacheService import com google appengine api memcache MemcacheServiceFactory import com google appengine api memcache ErrorHandlers public Product updateProduct Product entityToUpdate peer The code for the Materialized View Pattern begins here String key MV1 This key needs to be unique MemcacheService syncCache MemcacheServiceFactory getMemcacheService syncCache setErrorHandler ErrorHandlers getConsistentLogAndContinue Level INFO String value String syncCache get key if value null TODO Provide the operation whose result is then materialized in a view in the cache syncCache put key value jelse The value was already in the cache we have therefore retrieved it now something can be done with it DEE Figure 16 Code automatically generated for the MaterializedView pattern 4 4 2 Technical Description As explained in D9 5 1 we have extended the Acceleo based code generator developed by Obeo Networks For this specific pattern we add support for ext

Download Pdf Manuals

image

Related Search

Related Contents

  Creative Labs T15    Manual de Usuario - Comunidad de Madrid  Deutsch Für Ihre Sicherheit: Zur angemessener  Scanner de mesa digital HP Scanjet 3770  SPX Cooling Technologies Fluid Cooler-Evap Condenser Recold M User's Manual    SPRT SPRM Micro Thermal Printer A, C, DN, DII, DIII,T Series  Manual de usuario de los cargadores de baterías de tres  

Copyright © All rights reserved.
Failed to retrieve file