LEMMA2Jolie

A tool for generating microservice APIs from domain models.

repository

Description

This tool generates microservice APIs in Jolie, a service-oriented programming language, starting from domain models in LEMMA, an ecosystem for modelling microservice architectures. This tool enables a software development process whereby microservice architectures can first be designed with the method of Domain-Driven Design, and then corresponding data types and service APIs are automatically generated. Developers can extend and use these APIs as guides in order to produce compliant implementations.

Papers

Giallorenzo, S., Montesi, F., Peressotti, M. and Rademacher, F. 2023. Model-Driven Code Generation for Microservices: Service Models. Joint Post-proceedings of the Third and Fourth International Conference on Microservices (Microservices 2020/2022) (Dagstuhl, Germany, 2023), 6:1–6:17.

We formally define and implement a translation of domain and service models expressed in the LEMMA modelling ecosystem for microservice architectures to source code in the Jolie microservice programming language. Specifically, our work extends previous efforts on the generation of Jolie code to the inclusion of the LEMMA service modelling layer. We also contribute an implementation of our translation, given as an extension of the LEMMA2Jolie tool, which enables the practical application of our encoding. As a result, LEMMA2Jolie now supports a software development process whereby microservice architectures can first be designed by microservice developers in collaboration with domain experts in LEMMA, and then be automatically translated into Jolie APIs. Our tool can thus be used to enhance productivity and improve design adherence.

@inproceedings{GMPR23b,
  author = {Giallorenzo, Saverio and Montesi, Fabrizio and Peressotti, Marco and Rademacher, Florian},
  title = {{Model-Driven Code Generation for Microservices: Service Models}},
  booktitle = {Joint Post-proceedings of the Third and Fourth International Conference on Microservices (Microservices 2020/2022)},
  pages = {6:1--6:17},
  series = {Open Access Series in Informatics (OASIcs)},
  isbn = {978-3-95977-306-5},
  issn = {2190-6807},
  year = {2023},
  volume = {111},
  editor = {Dorai, Gokila and Gabbrielli, Maurizio and Manzonetto, Giulio and Osmani, Aomar and Prandini, Marco and Zavattaro, Gianluigi and Zimmermann, Olaf},
  publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address = {Dagstuhl, Germany},
  url = {https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.Microservices.2020-2022.6},
  urn = {urn:nbn:de:0030-drops-194688},
  doi = {10.4230/OASIcs.Microservices.2020-2022.6}
}
Giallorenzo, S., Montesi, F., Peressotti, M. and Rademacher, F. 2023. LEMMA2Jolie: A Tool to Generate Microservice APIs from Domain Models. Science of Computer Programming. 228, (2023), 102956. DOI:10.1016/j.scico.2023.102956.

We introduce LEMMA2Jolie, a tool for translating domain models of microservice architectures given in LEMMA into concrete APIs of microservices in the Jolie programming language. Our tool combines the state of the art for the design and implementation of microservices: developers can use Domain-Driven Design (DDD) for the construction of the domain models of a microservice architecture, and then automatically transition to a service-oriented programming language that provides native linguistic support for implementing the behaviour of each microservice.

@article{GMPR23a,
  author = {Giallorenzo, Saverio and Montesi, Fabrizio and Peressotti, Marco and Rademacher, Florian},
  title = {LEMMA2Jolie: A Tool to Generate Microservice APIs from Domain Models},
  journal = {Science of Computer Programming},
  volume = {228},
  pages = {102956},
  year = {2023},
  issn = {0167-6423},
  doi = {10.1016/j.scico.2023.102956},
  url = {https://www.sciencedirect.com/science/article/pii/S0167642323000382}
}
Giallorenzo, S., Montesi, F., Peressotti, M. and Rademacher, F. 2022. Model-Driven Generation of Microservice Interfaces: From LEMMA Domain Models to Jolie APIs. Coordination Models and Languages (2022), 223–240.

We formally define and implement a translation from domain models in the LEMMA modelling framework to microservice APIs in the Jolie programming language. Our tool enables a software development process whereby microservice architectures can first be designed with the leading method of Domain-Driven Design (DDD), and then corresponding data types and service interfaces (APIs) in Jolie are automatically generated. Developers can extend and use these APIs as guides in order to produce compliant implementations. Our tool thus contributes to enhancing productivity and improving the design adherence of microservices.

@inproceedings{GMPR22,
  author = {Giallorenzo, Saverio and Montesi, Fabrizio and Peressotti, Marco and Rademacher, Florian},
  editor = {ter Beek, Maurice H. and Sirjani, Marjan},
  title = {Model-Driven Generation of Microservice Interfaces: From LEMMA Domain Models to Jolie APIs},
  booktitle = {Coordination Models and Languages},
  year = {2022},
  series = {Lecture Notes in Computer Science},
  volume = {13271},
  pages = {223--240},
  publisher = {Springer},
  isbn = {978-3-031-08143-9},
  url = {https://doi.org/10.1007/978-3-031-08143-9\_13},
  doi = {10.1007/978-3-031-08143-9\_13}
}
Giallorenzo, S., Montesi, F., Peressotti, M., Rademacher, F. and Sachweh, S. 2021. Jolie and LEMMA: Model-Driven Engineering and Programming Languages Meet on Microservices. Coordination Models and Languages - 23rd IFIP WG 6.1 International Conference, COORDINATION 2021, Held as Part of the 16th International Federated Conference on Distributed Computing Techniques, DisCoTec 2021, Valletta, Malta, June 14-18, 2021, Proceedings (2021), 276–284.

In the field of microservices, Model-Driven Engineering has emerged as a powerful methodology for architectural design, and new programming languages have introduced language abstractions to deal with microservice development more effectively. In this article, we present the first preliminary investigation of how the two approaches can be married, taking the LEMMA framework and the Jolie programming language as respective representatives. By developing a conceptual metamodel for Jolie, we elicit a strong link between the two approaches, which shows that there is much to gain. We discuss a few low-hanging fruits that come from our finding and present some interesting future directions that arise from our new viewpoint.

@inproceedings{GMPRS21,
  author = {Giallorenzo, Saverio and Montesi, Fabrizio and Peressotti, Marco and Rademacher, Florian and Sachweh, Sabine},
  editor = {Damiani, Ferruccio and Dardha, Ornela},
  title = {Jolie and {LEMMA:} Model-Driven Engineering and Programming Languages Meet on Microservices},
  booktitle = {Coordination Models and Languages - 23rd {IFIP} {WG} 6.1 International Conference, {COORDINATION} 2021, Held as Part of the 16th International Federated Conference on Distributed Computing Techniques, DisCoTec 2021, Valletta, Malta, June 14-18, 2021, Proceedings},
  series = {Lecture Notes in Computer Science},
  volume = {12717},
  pages = {276--284},
  publisher = {Springer},
  year = {2021},
  url = {https://doi.org/10.1007/978-3-030-78142-2\_17},
  doi = {10.1007/978-3-030-78142-2\_17}
}