Nothing Special   »   [go: up one dir, main page]

Skip to main content

Domain-Driven Service Design

Context Modeling, Model Refactoring and Contract Generation

  • Conference paper
  • First Online:
Service-Oriented Computing (SummerSOC 2020)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1310))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    http://sculptorgenerator.org/.

  2. 2.

    https://contextmapper.org/.

  3. 3.

    https://microservice-api-patterns.org/.

  4. 4.

    https://microservice-api-patterns.github.io/MDSL-Specification/.

  5. 5.

    https://github.com/Microservice-API-Patterns/LakesideMutual/.

  6. 6.

    https://contextmapper.org/docs/language-reference/.

  7. 7.

    https://contextmapper.org/.

  8. 8.

    https://www.eclipse.org/Xtext/.

  9. 9.

    https://plantuml.com/.

  10. 10.

    https://microservice-api-patterns.org/.

  11. 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. 12.

    https://microservice-api-patterns.github.io/MDSL-Specification/.

  13. 13.

    https://microservice-api-patterns.org/patterns/foundation/APIDescription.

  14. 14.

    https://contextmapper.org/docs/mdsl/.

  15. 15.

    https://marketplace.eclipse.org/content/context-mapper/.

  16. 16.

    https://travis-ci.com/github/ContextMapper/.

  17. 17.

    https://github.com/socadk/design-practice-repository/.

  18. 18.

    https://github.com/Microservice-API-Patterns/LakesideMutual/.

  19. 19.

    https://github.com/ContextMapper/context-mapper-examples/.

  20. 20.

    https://github.com/ServiceCutter/ServiceCutter/wiki/Coupling-Criteria/.

  21. 21.

    https://searchapparchitecture.techtarget.com/definition/business-capability/.

  22. 22.

    https://www.openapis.org/.

  23. 23.

    https://swagger.io/.

  24. 24.

    https://www.jhipster.tech/jdl/.

  25. 25.

    https://microservice-api-patterns.github.io/MDSL-Specification/index.

References

  1. 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

    Article  Google Scholar 

  2. 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

    Chapter  MATH  Google Scholar 

  3. 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

    Article  Google Scholar 

  4. Brandolini, A.: Strategic domain driven design with context mapping (2009). https://www.infoq.com/articles/ddd-contextmapping

  5. Brandolini, A.: Introducing EventStorming: An Act of Deliberate Collective Learning. Leanpub (2018)

    Google Scholar 

  6. Conway, M.: Conway’s law (1968)

    Google Scholar 

  7. 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

  8. Evans, E.: Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley, Boston (2003)

    Google Scholar 

  9. Fairbanks, G.: Just Enough Software Architecture: A Risk-driven Approach. Marshall & Brainerd (2010)

    Google Scholar 

  10. 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

    Chapter  Google Scholar 

  11. 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/

  12. 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)

    Google Scholar 

  13. 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

  14. Johnson, R., Gamma, E., Vlissides, J., Helm, R.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)

    Google Scholar 

  15. Kapferer, S.: Model transformations for DSL processing. Term project, University of Applied Sciences of Eastern Switzerland (HSR FHO) (2019). https://eprints.hsr.ch/819/

  16. 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/

  17. 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/

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

    Article  Google Scholar 

  23. 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

    Google Scholar 

  24. 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

    Article  Google Scholar 

  25. 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

    Article  Google Scholar 

  26. Plöd, M.: DDD context maps - an enhanced view (2018). https://speakerdeck.com/mploed/context-maps-an-enhanced-view

  27. Plöd, M.: Hands-On Domain-Driven Design - By Example. Leanpub (2019)

    Google Scholar 

  28. 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

    Article  Google Scholar 

  29. 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

  30. Steinberg, D., Budinsky, F., Merks, E., Paternostro, M.: EMF: Eclipse Modeling Framework. Eclipse Series. Pearson Education, London (2008)

    Google Scholar 

  31. 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

  32. Tune, N., Millett, S.: Designing Autonomous Teams and Services: Deliver Continuous Business Value Through Organizational Alignment. O’Reilly Media, Newton (2017)

    Google Scholar 

  33. Vernon, V.: Implementing Domain-Driven Design. Addison-Wesley, Boston (2013)

    Google Scholar 

  34. 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

Download references

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

Authors

Corresponding author

Correspondence to Stefan Kapferer .

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:

figure c

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

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics