logo
logo
Sign in

Microservices Design Principles You Should Know

avatar
Blaze
Microservices Design Principles You Should Know

Software developers are increasingly adoptingmicroservices. The microservice architecture must be based on a set of design principles so developers can implement it accurately.

We now have IDEALS to help developers build microservice-based applications in the same way SOLID provided a reference list of design principles for Object-Oriented programming.

IDEALS incorporates some of the principles of SOLID as well. In addition to microservices-based architecture principles, IDEALS encompasses other design concepts.

The five object-oriented design principles stated below were compiled by Robert C. Martin in 2000. A shorthand acronym combining these principles was later developed by Michael Feathers. The OO design SOLID principles were described in books and are now well established in the industry.

  • Single responsibility principle
  • Open/closed principle
  • Liskov substitution principle
  • Interface segregation principle
  • Dependency inversion principle

My answer to a student's question, "Can SOLID principles be applied to microservices?" was "In part," when I was teaching microservice design a couple of years ago.

I eventually discovered that microservices (and a catchy acronym to go with them) were fundamental design principles. But why would such a question be important?

Over six years ago, we began designing and implementing microservices. Since then, a growing number of microservices-enabled tools, frameworks, platforms, and support products have appeared on the market.

In just one microservice project, the novice microservice developer faces a myriad of design decisions and technological choices.

Developing microservice-based solutions can be made easier by following a set of core principles.

Microservices may have some SOLID principles in common with distributed systems, but object orientation is a paradigm that deals with elements (classes, interfaces, hierarchies, etc.) that are fundamentally different from elements in distributed systems in general, and microservices specifically.

Thus, we propose the following set of core principles for microservice design:

  • Interface segregation
  • Deployability (is on you)
  • Event-driven
  • Availability over consistency
  • Loose coupling
  • Single responsibility

Microservices-based solutions are not covered by these principles, but they do touch on the key concerns and success factors needed to create modern service-oriented systems. We'll go over how these principles translate into microservices -- the "IDEALS" that are sorely needed.

collect
0
avatar
Blaze
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more