Seven Microservices Tenets

A consolidated definition for an overloaded term

Doc SoC (aka ZIO)
ZIO’s Blog
5 min readJul 8, 2020

--

Photo by Enrique Ortega Miranda on Unsplash

This post defines microservices via seven tenets, reverse-engineered from books, articles and blogs. It also recapitulates which Service-Oriented Architecture (SOA) principles and patterns I collected to introduce SOA between 2003 and 2009. Such consolidated definitions are required to analyze the SOA style and microservice-based SOA realizations objectively.

What Is in a Microservice?

My paper “Microservices Tenets: Agile Approach to Service Development and deployment” , published in a scientific journal but also openly available, compares several early definitions and distills seven tenets from them:

Here is a slightly updated version of these tenets (I prefer the term “tenets” over “characteristics” or “principles” here to indicate that I do not intend to provide a formal, strict definition but report common industry practices):

  1. Fine-grained, message-based remote APIs expose independently deployable, scalable and changeable services each having a single responsibility.
  2. Business-driven development is applied (for instance, domain-driven design) so that each service represents and models a business capability.
  3. Services encapsulate their own state, IDEALly in a loosely coupled fashion (which is a cloud application architecture design principle).
  4. Programming and persistence are polyglot, and communication technologies are also chosen in a best-fit “polyglot protocols” manner (for instance, HTTP resources, asynchronous message queues, gRPC).
  5. Services are deployed into lightweight containers.
  6. Decentralized Continuous Integration and Delivery (CI/CD) is practiced.
  7. More DevOps practices are applied, end-to-end service monitoring for business agility and domain observability in particular.

The seven tenets are also featured in this presentation and this one.

Recap: The SOA Style

My 2009 definition of SOA, this time by way of principles (loose coupling, first and foremost) and patterns (service contract and others) can be found here. This is an excerpt from it (legend: U stands for user and channel diversity, P for process and resource integrity, I for integration needs and interoperability, S for semantics of business information):

IMHO the ESB pattern should not be confused with products or open source assets realizing it (or claiming to do so), and installations of such products. For instance, the pattern does not impose a “single, central physical instance” constraint, but merely emphasizes the need for protocol adaptation, routing and message transformation. Much of the negative bias that can be found online can be attributed to product (mis)-use rather than flaws in the pattern. In this article, we report this smell (and six more, for instance “shared persistence”) in more detail and suggest a “rightsize ESB refactoring”.

Evolution or Revolution?

Let’s look at the novelty of the seven microservices tenets now:

  • Tenets 1 and 3 are partially new at best. The independent deployability was there in SOA 1.0, but not utilized much due to technology constraints at the time. The better SOA books from the 2000s gave similar advice about state and statelessness; for instance, try “SOA in Practice” by Nicolai Josuttis or “Enterprise SOA” by Dirk Krafzig and his co-authors.
  • Tenets 2 and 4 are not new at all, but defining elements of the SOA style.
  • Tenet 5, 6 and 7 actually contain novel aspects, but deal with service realization (implementation, deployment, governance) rather than style-defining patterns and principles.

The “Tenets” paper referenced above has a deeper analysis. For instance, a table in it compares the microservices characteristics proposed by James Lewis and Martin Fowler with my SOA principles and patterns:

As the conclusion from my analysis, I agree with the Sam Newman’s view in the first edition of “Building Microservices” to “think of microservices as a specific approach for SOA in the same way that XP or Scrum are specific approaches for Agile software development” (again supporting Position 3).

Presentations, Papers, Projects

The updated version of the 7-tenet definition of microservices can also be found in a presentation of Context Mapper, our DDD modeling tool and service contract generator (slide 6 in this deck), and in this 2020 presentation that also features the end-to-end service design steps and supporting tools.

Here are some research papers on microservices and related topics that I contributed to:

  • Neri D., Soldani, J., Zimmermann, O., Brogi, A: Design Principles, Architectural Smells and Refactorings for Microservices. A Multivocal Review, 2019 (PDF)
  • Pardon, G., Pautasso, C., Zimmermann, O.: Consistent Disaster Recovery for Microservices: the Backup, Availability, Consistency (BAC) Theorem. IEEE Cloud Computing, 2018 (PDF). This article is featured in two Medium posts (by other bloggers) here and here.
  • Pahl, C.; Jamshidi, P.; Zimmermann, O.: Architectural Principles for Cloud Software. ACM Transactions on Internet Technology, 2018 (PDF)
  • Furda, A.; Fidge, C.; Zimmermann, O.; Kelly, W.; Barros, A.: Migrating Enterprise Legacy Source Code to Microservices: On Multitenancy, Statefulness, and Data Consistency. IEEE Software, 2018 (PDF)
  • Pautasso, C.; Zimmermann, O.: The Web as a Software Connector. Integration Resting on Linked Resources. IEEE Software, 2018 (PDF)

You can find more on the papers and presentations page of my personal website. Three publication, research and development projects that I currently lead are Microservice API Patterns (MAP, looking into the request and response message that service consumers and providers exchange), Microservices Domain-Specific Language (MDSL) (a contract language that maps to OpenAPI, Protocol Buffers, GraphQL schema language, Jolie) and Software/Service/API Design Practice Repository (DPR) (a best-of-breed collection of templates, checklists and other design method elements).

I hope you found this post useful. An extended version of it (that also positions microservices as an implementation approach to SOA) can also be found on my blog. Whether you agree or disagree with my analysis, I’ll be very interested in your arguments, please let me know them!

© Olaf Zimmermann, 2020. All rights reserved.

--

--

Doc SoC (aka ZIO)
ZIO’s Blog

Architectural Decision Maker, Domain-Driven Designer, Serviceorienteer. Co-author of "Patterns for API Design", "Design Practice Reference", Y-Statements, MADR