Skip to content

Repository for artifacts related to the implementation and validation of our approach submitted to the CNADO track @ SEAA2020

Notifications You must be signed in to change notification settings

SeelabFhdo/seaa2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Validation Package for our SEAA 2020 Paper on Deriving Microservice Code from Underspecified Domain Models Using DevOps-Enabled Modeling Languages and Model Transformations

Source Code of the Plugins for Phases 1 to 3 and the Code Generator


The source code of the plugins for Phases 1 to 3 are part of this repository. They can be found here:

Reproducing the Validation Steps


To reproduce the validation steps as described in Subsection IV-B of the paper, an Eclipse instance needs to be prepared first:

  1. Download the current release 2020-03 (4.15.0) of the Eclipse IDE for Java and DSL Developers.
  2. Unpack the downloaded Eclipse release, run it, and install the current Papyrus package from this update site: http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/2020-03.
  3. Install the current ATL package from this update site: https://download.eclipse.org/mmt/atl/updates/releases.
  4. Download the dropins.zip file from the Releases section of our GitHub Validation Package: https://github.com/SeelabFhdo/seaa2020/releases/download/v1/dropins.zip. The ZIP file contains the JAR archives of the LEMMA Eclipse plugins, as well as the JAR archives of the de.fhdo.lemma.ddmm2lemma and the de.fhdo.lemma.projections plugins (see above).
  5. Restart the Eclipse instance.

For the actual reproduction, please follow these steps:

  1. Clone this repository to your harddrive.
  2. Import the Cargo and Lakeside Mutual Eclipse projects contained in the cloned Validation/Case Study Models and Code folder into a workspace of the prepared Eclipse instance.
  3. To review the DDD domain models of Phase 1 imported by the previous step, switch to the Cargo/Phase 1 or Lakeside Mutual/Phase 1 folder in the Eclipse Package Explorer. Double click on the cargo.di or LakesideMutual.di file. In the opening Welcome window of Papyrus, click on the CargoDiagram (Cargo) or Class Diagram (Lakeside Mutual) link in the Notation Views section. The Cargo or Lakeside Mutual input DDD domain model used for validating our methodology is shown in Eclipse Papyrus.
  4. To review the derived LEMMA models of Phase 2, switch to the Cargo/Phase 2 or Lakeside Mutual/Phase 2 folder in the Eclipse Package Explorer. The extracted models sub-folders contain the derived DevOps-related LEMMA models in their concrete (files with extensions .data and .services) and abstract (files with extension .xmi) syntax representations. Files with the extracted_-prefix are overwritten each time when a new derivation on the DDD domain models is executed.
    LEMMA models directly contained in the extracted models folder, e.g., domain.data and service.services, comprise all derived Bounded Contexts and enclosed domain concepts, and all derived microservices, respectively. LEMMA models contained in a sub-folder of extracted models only contain derived elements related to the Bounded Context with the same name as the nested folder, e.g., Customer for the Cargo case study's "Customer" and city for Lakeside Mutual "city" Bounded Context.
    The DevOps-related LEMMA models may also be interactively derived leveraging our plugins within the prepared Eclipse instance. To this end, right click on either the cargo.uml or LakesideMutual.uml file in the Cargo/Phase 1 or Lakeside Mutual/Phase 1 folder in the Eclipse Package Explorer and hit the entry Extract Editable LEMMA Models in the opening context menu. The Eclipse Handler DdmmToLemmaTransformationHandler from the de.fhdo.lemma.ddmm2lemma plugin will be invoked to execute the M2M transformations of Phase 2 on the selected DDD domain model in the .uml file. Next, the plugin leverages the Projections class of the de.fhdo.lemma.projections plugin to extract the in-memory LEMMA models to their concrete syntax representations. After the extraction is finished, a message box will be displayed, which informs the modeler that the LEMMA models were successfully extracted. You can then find the extracted models in the Cargo/extracted models or Lakeside Mutual/extracted models folders in the Eclipse Package Explorer. The contents of the folders are identical to the contents of the Cargo/Phase 2/extracted models and Lakeside Mutual/Phase 2/extracted models sub-folders.
    The plugins may also receive certain configuration options. These can be found in the running Eclipse instance within the menu at Window > Preferences > DDMM2LEMMA Configuration. The first option allows for exchanging the refining M2M transformation on LEMMA domain models based on the selected DevOps model derivation approach. By default, the configuration value points to this transformation. The second option allows for exchanging the DevOps derivation transformation for LEMMA service models. By default, the configuration value points to this transformation. The third option allows for changing the output path of the M2T extraction to something else than extracted models.
  5. To review the adapted LEMMA models of Phase 3, navigate to the Cargo/Phase 3 or Lakeside Mutual/Phase 3 folders in the Eclipse Package Explorer. The contents of the folders were copied from the extracted models folders derived in Phase 2. However, the files with the extracted_-prefix were removed to improve clarity. Comments in the model files identify the places were adaptation actions took place (similarly to Listing 3 from the paper).
  6. The mapping models for Phase 4 may be found in the Cargo/Phase 4 or Lakeside Mutual/Phase 4 folders in the Eclipse Package Explorer. The generated Java and Spring source code is contained in the generated code sub-folders.
    If you are interested in generating the Java and Spring code yourself, execute the generate_code.sh Bash script in the Cargo or Lakeside Mutual folders cloned from the repository. They will execute the generator's standalone fat JAR from the cloned Validation/libs folder. For the generator to run, you need at least Java 12. To temporarily set your Java version to at least 12, you can adapt the export_java_home.sh Bash script in the Cargo or Lakeside Mutual folders. Please note that the generate_code.sh Bash scripts also start the generated microservices at ports starting from 8080. If you only want to generate the code without the microservices to start, pass the "compile_only" option to the scripts.

Retrieving the Numbers Mentioned in the Validation Subsection


In order to retrieve the numbers mentioned in the Validation subsection of the paper, review or execute the scripts from the cloned Validation/Analysis folder corresponding to the different phases of our methodology. For the majority of the scripts to run, you need Python 3 and the cloc utility for automated LOC counting.

About

Repository for artifacts related to the implementation and validation of our approach submitted to the CNADO track @ SEAA2020

Resources

Stars

Watchers

Forks

Packages

No packages published