Abstract
Service-oriented architectures and microservices have gained much attention in recent years; companies adopt these concepts and supporting technologies in order to increase agility, scalability, and maintainability of their systems. Decomposing an application into multiple independently deployable, appropriately sized services and then integrating them is challenging. Domain-driven Design (DDD) is a popular approach to identify (micro-)services by modeling so-called Bounded Contexts and Context Maps. In our previous work, we proposed a Domain-specific Language (DSL) that leverages the DDD patterns to support service modeling and decomposition. The DSL is implemented in Context Mapper, a tool that allows software architects and system integrators to create domain-driven designs that are both human- and machine-readable. However, we have not covered the tool architecture, the iterative and incremental refinement of such maps, and the transition from DDD pattern-based models to (micro-)service-oriented architectures yet. In this paper, we introduce the architectural concepts of Context Mapper and seven model refactorings supporting decomposition criteria that we distilled from the literature and own industry experience; they are grouped and serve as part of a service design elaboration method. We also introduce a novel service contract generation approach that leverages a new, technology-independent Microservice Domain-Specific Language (MDSL). These research contributions are implemented in Context Mapper and being validated using empirical methods.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
A contract is not a pair of precondition and postcondition here, but an API description that specifies and governs the message exchange between two services or subsystems.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
References
Avison, D.E., Lau, F., Myers, M.D., Nielsen, P.A.: Action research. Commun. ACM 42(1), 94–97 (1999). https://doi.org/10.1145/291469.291479
Boger, M., Sturm, T., Fragemann, P.: Refactoring browser for UML. In: Aksit, M., Mezini, M., Unland, R. (eds.) NODe 2002. LNCS, vol. 2591, pp. 366–377. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-36557-5_26
Brandner, M., Craes, M., Oellermann, F., Zimmermann, O.: Web services-oriented architecture in production in the finance industry. Informatik Spektrum 27(2), 136–145 (2004). https://doi.org/10.1007/s00287-004-0380-2
Brandolini, A.: Strategic domain driven design with context mapping (2009). https://www.infoq.com/articles/ddd-contextmapping
Brandolini, A.: Introducing EventStorming: An Act of Deliberate Collective Learning. Leanpub (2018)
Conway, M.: Conway’s law (1968)
Di Francesco, P., Lago, P., Malavolta, I.: Migrating towards microservice architectures: an industrial survey. In: 2018 IEEE International Conference on Software Architecture (ICSA), pp. 29–2909, April 2018. https://doi.org/10.1109/ICSA.2018.00012
Evans, E.: Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley, Boston (2003)
Fairbanks, G.: Just Enough Software Architecture: A Risk-driven Approach. Marshall & Brainerd (2010)
Gysel, M., Kölbener, L., Giersche, W., Zimmermann, O.: Service cutter: a systematic approach to service decomposition. In: Aiello, M., Johnsen, E.B., Dustdar, S., Georgievski, I. (eds.) ESOCC 2016. LNCS, vol. 9846, pp. 185–200. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-44482-6_12
Habegger, M., Schena, M.: Cloud-native refactoring in einem mHealth Szenario. Bachelor thesis, University of Applied Sciences of Eastern Switzerland (HSR FHO) (2019). https://eprints.hsr.ch/806/
Hippchen, B., Giessler, P., Steinegger, R., Schneider, M., Abeck, S.: Designing microservice-based applications by using a domain-driven design approach. Int. J. Adv. Softw. 1942–2628(10), 432–445 (2017)
Ivkovic, I., Kontogiannis, K.: A framework for software architecture refactoring using model transformations and semantic annotations. In: Conference on Software Maintenance and Reengineering (CSMR 2006), pp. 10–144, March 2006. https://doi.org/10.1109/CSMR.2006.3
Johnson, R., Gamma, E., Vlissides, J., Helm, R.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)
Kapferer, S.: Model transformations for DSL processing. Term project, University of Applied Sciences of Eastern Switzerland (HSR FHO) (2019). https://eprints.hsr.ch/819/
Kapferer, S.: Service decomposition as a series of architectural refactorings. Term project, University of Applied Sciences of Eastern Switzerland (HSR FHO) (2019). https://eprints.hsr.ch/784/
Kapferer, S., Jost, S.: Attributbasierte Autorisierung in einer Branchenlösung für das Versicherungswesen. Bachelor thesis, University of Applied Sciences of Eastern Switzerland (HSR FHO) (2017). https://eprints.hsr.ch/602/
Kapferer, S., Zimmermann, O.: Domain-specific language and tools for strategic domain-driven design, context mapping and bounded context modeling. In: Proceedings of the 8th International Conference on MODELSWARD, pp. 299–306. INSTICC, SciTePress (2020). https://doi.org/10.5220/0008910502990306
Landre, E., Wesenberg, H., Rønneberg, H.: Architectural improvement by use of strategic level domain-driven design. In: Companion to the 21st ACM SIGPLAN OOPSLA, pp. 809–814. ACM, New York (2006). https://doi.org/10.1145/1176617.1176728
Lübke, D., Zimmermann, O., Pautasso, C., Zdun, U., Stocker, M.: Interface evolution patterns: balancing compatibility and extensibility across service life cycles. In: Proceedings of the 24th European Conference on Pattern Languages of Programs. ACM, New York (2019). https://doi.org/10.1145/3361149.3361164
Mazlami, G., Cito, J., Leitner, P.: Extraction of microservices from monolithic software architectures. In: 2017 IEEE International Conference on Web Services (ICWS), pp. 524–531, June 2017. https://doi.org/10.1109/ICWS.2017.61
Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004). https://doi.org/10.1109/TSE.2004.1265817
Munezero, I.J., Mukasa, D., Kanagwa, B., Balikuddembe, J.: Partitioning microservices: a domain engineering approach. In: 2018 IEEE/ACM Symposium on Software Engineering in Africa (SEiA), pp. 43–49, May 2018
Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972). https://doi.org/10.1145/361598.361623
Pautasso, C., Zimmermann, O., Amundsen, M., Lewis, J., Josuttis, N.: Microservices in practice, part 1: reality check and service design. IEEE Softw. 34(1), 91–98 (2017). https://doi.org/10.1109/MS.2017.24
Plöd, M.: DDD context maps - an enhanced view (2018). https://speakerdeck.com/mploed/context-maps-an-enhanced-view
Plöd, M.: Hands-On Domain-Driven Design - By Example. Leanpub (2019)
Rademacher, F., Sorgalla, J., Sachweh, S.: Challenges of domain-driven microservice design: a model-driven perspective. IEEE Softw. 35(3), 36–43 (2018). https://doi.org/10.1109/MS.2018.2141028
Shaw, M.: Writing good software engineering research papers: minitutorial. In: Proceedings of the 25th International Conference on Software Engineering, ICSE 2003, pp. 726–736. IEEE Computer Society, Washington, DC (2003). http://dl.acm.org/citation.cfm?id=776816.776925
Steinberg, D., Budinsky, F., Merks, E., Paternostro, M.: EMF: Eclipse Modeling Framework. Eclipse Series. Pearson Education, London (2008)
Tigges, O.: How to break down a domain to bounded contexts? https://speakerdeck.com/otigges/how-to-break-down-a-domain-to-bounded-contexts. Accessed 14 Feb 2020
Tune, N., Millett, S.: Designing Autonomous Teams and Services: Deliver Continuous Business Value Through Organizational Alignment. O’Reilly Media, Newton (2017)
Vernon, V.: Implementing Domain-Driven Design. Addison-Wesley, Boston (2013)
Zimmermann, O.: Architectural refactoring for the cloud: decision-centric view on cloud migration. Computing 99(2), 129–145 (2017). https://doi.org/10.1007/s00607-016-0520-y, http://rdcu.be/lFW6
Acknowledgements
This work was supported by the Hasler Foundation (https://haslerstiftung.ch/) in the project “Domain-Driven Digital Service Engineering”.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Appendix: Introduction to MDSL
A Appendix: Introduction to MDSL
Microservice Domain-Specific Language (MDSL)Footnote 25 abstracts from technology-specific interface description languages such as OpenAPI/Swagger, WSDL, and Protocol Buffers. MDSL design principles are a) promote platform and protocol independence with a modular language structure separating abstract contracts from provider bindings, b) support agile modeling practices with partial specifications and c) promote readability over parsing efficiency.
The abstract syntax of MDSL is inspired and driven by the domain model and concepts of Microservice API Patterns (MAP), featuring endpoints, operations, and data representation elements [20]. The concrete syntax of service endpoint contracts is elaborate; the concrete syntax of data contracts is compact yet simple. It generalizes data exchange formats such as JSON and type systems in service-centric programming languages such as Ballerina and Jolie. Endpoint, operation, and one representation element can be decorated with patterns from MAP [20]; these decorator annotations are first-class language concepts that can be processed by tools later. For instance, API linters may validate them, and they could influence the output of cloud deployment scripts.
Most programming languages declare variables by name and type; MDSL uses a name-role-type triple (e.g., "customerName": ID<String>) to specify Atomic Parameters. The role can be any element stereotype from MAP (i.e., ID(entifier), Link, Data, or Metadata). A generic, unspecified placeholder P can replace role and type; the parameter name is optional if the role is defined. Implementing the Parameter Tree pattern from MAP, simple (yet powerful) nesting is supported in an object- and block-like curly brace syntax {{...}, {...}} known from data representation languages such as JSON. Cardinalities such as ?, *, + can be specified as well. Listing A.1 gives an example:
sayHello accepts a scalar string value D<string> as input. This operation returns a Data Transfer Object (DTO) called SampleDTO, which is modeled explicitly so that its specification can be used elsewhere too. SampleDTO is specified incompletely: it pairs two atomic parameters, in ID and (D)ata roles, whose names and types have not been specified. This partial yet expressive specification supports early use and continuous refinement. For instance, MDSL specifications can be drafted in workshops with non-technical stakeholders and then completed iteratively and incrementally (e.g, adding data type information).
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Kapferer, S., Zimmermann, O. (2020). Domain-Driven Service Design. In: Dustdar, S. (eds) Service-Oriented Computing. SummerSOC 2020. Communications in Computer and Information Science, vol 1310. Springer, Cham. https://doi.org/10.1007/978-3-030-64846-6_11
Download citation
DOI: https://doi.org/10.1007/978-3-030-64846-6_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-64845-9
Online ISBN: 978-3-030-64846-6
eBook Packages: Computer ScienceComputer Science (R0)