DEV Community

Discussion on: Architecture for Everyone

Collapse
 
david_whitney profile image
David Whitney

Microservices are part of an architectural style ( en.wikipedia.org/wiki/List_of_soft... ) derived from Service Oriented Architecture. So no, it's not misleading :)

"Layers" also implies a specific architectural style (n-tier, literally, the cake analogy).

There are plenty of valid critiques of microservice architectures, but "it's not an architecture!" isn't one of them. 🖤

Collapse
 
siy profile image
Sergiy Yevtushenko

Sorry, but I disagree. It's definitely not an architecture and not an architectural style either. And it's easy to prove - it's enough to make another packaging option and put all services into one application. With more or less decent design, which allows abstracting out communication method, it should not be a problem to replace communication via HTTP/REST with direct calls. And now you have monolith, but there are no changes in the architecture. Another direction: most modern recommend microservices best practice is to start as monolith and later split system as necessary into microservices. If architecture of the system remains the same, monolith or microservices have nothing to do with architecture. They are just packaging options.

Thread Thread
 
phlash profile image
Phil Ashby • Edited

Sounds like you've experienced some of the hype and pain of a microservices initiative in an organisation? As David notes in the article:

Microservices that don’t exhibit those qualities are likely just secret distributed monoliths.
That’s ok, loads of people operate distributed monoliths at scale, but you’ll feel the pain at
some point.

If you haven't already seen it, I would recommend this comprehensive description from James Lewis & Martin Fowler, it goes into more background and reasoning on what drives the approach and why you would or would not use it: martinfowler.com/articles/microser...

hope this helps..

Thread Thread
 
siy profile image
Sergiy Yevtushenko • Edited

Sounds like you decided that I'm against microservices. This is not so. They have their place and sometimes they are really necessary.

As of "these qualities". They are not specific to microservices, but just regular properties of traditional SOA. Lets look at them one by one:

  • Be role/operation based, not data centric. This is traditional approach to SOA, nothing specific to microservices.
  • Always own your data store. Usually service operates on it's own subset of data. Access to data is performed via repositories and not the part of the service business logic. Again, this is just a proper SOA design.
  • Communicate on external interfaces or messages. This is just what is SOA about - interaction via interfaces. The transport used for interaction is replaceable implementation detail and not the part of the service business logic.
  • What changes together, and is co-dependent, is actually the same thing. This is not even a requirement, rather a test for correct split up of the system into services. Yet another part of correct SOA design.
  • All services are fault tolerant and survive the outages of their dependencies. Handling outages is not the responsibility of the services' business logic. All is necessary is to properly propagate error if dependency returns error. Handling of the outages/retries/etc. is done by particular implementation of the transport. Which, in turn, just an implementation detail.

I see how often people, who discover distributed systems to themselves via microservices, focus on (new for them) low level implementation details like circuit breakers and transport protocols. They get an impression that those minor things are something new, specific to microservices and making microservices special. They are not. Distributed systems existed long before term "microservices" was coined up.

Let's sum up: properly designed SOA system is indistinguishable from properly designed microservices. And properly designed SOA can be reconfigured to be deployed as monolith or as set of microservices without any changes in architecture. This leads to the conclusion I've already mentioned - microservices have no relation to architecture, it's just a packaging option. Just like monolith.

Thread Thread
 
david_whitney profile image
David Whitney

From the original post:

"Microservice architectures are just the “third wave” of Service Oriented Design."

Though where we differ in opinion is that those "minor things" the actual cloud architecture patterns, are things that provide the resilient capabilities of decent Microservice architectures.

You don't have to take my word for it though - docs.microsoft.com/en-us/azure/arc... Microsoft P&P has a great rundown of why they're so important.

"properly designed SOA system is indistinguishable from properly designed microservices" - I totally disagree with this statement though - 1st Gen "Traditional" SOA was all about n-tier architecture - Microservices archtectures tend towards consteallations of co-operating bounded contexts. It's a different topology, and the interactions between the services are different.

Ian Cooper does a great overview of the history and contrast between the two here - youtube.com/watch?v=Z9NtB7JMquY

I think if the whole world describes microservices, and SOA, as an architectural style, pedantically sitting at the "it's not an architecture!" end of the spectrum isn't going to convince anyone.

Thanks for engaging 🖤

Thread Thread
 
siy profile image
Sergiy Yevtushenko • Edited

I really impressed with a number of sources you're providing to prove your point of view. Unfortunately none of them explain how it is possible to have same application built as monolith and as microservices without any changes in architecture.

As for "cloud architecture patterns": they unavoidable once you switch to distributed system and let services communicate directly via unreliable channels. These patterns are not specific to microservices and often used without them. Moreover, resilience and other cloud-specific properties are achieved by means external to application and application architecture (various deployment/orchestration platforms, cloud services, etc.)

While talking/reading about microservices I often have feeling that a lot of things from different levels/layers are mixed into one big ball of mud and then declared as "advantages of the microservices architecture".

Thread Thread
 
david_whitney profile image
David Whitney

I feel like you're conflating software architecture and systems architecture here to be honest.

Thread Thread
 
siy profile image
Sergiy Yevtushenko • Edited

Well, it's not me, but proponents of "microservices architecture".

Sorry, don't want to look rude. Just too tired with microservices histeria which often causes so much harm although creates a lot of jobs for devops.

Thread Thread
 
phlash profile image
Phil Ashby • Edited

Well argued Sir :) FWIW I hadn't assumed you were against microservices, but that you may have been victim of over enthusiastic architects (and hoping that isn't me!)

I suspect we are all violently agreeing that certain ways of doing things (whatever we call them) are sometimes appropriate (eg: if you are Amazon, Netflix or Monzo), and sometimes not (eg: if you are Stack Overflow: nickcraver.com/blog/2016/02/17/sta...).

Terminology, as in 'what is architecture' and what isn't, has probably come between us, as I also believe that well designed SOA is indistinguishable from microservices. What makes the difference for me is the human impact of these design decisions, where we might place higher important on team autonomy (eg: AWS 12-pizza teams), and thus focus on packaging and deployment, team responsibility and ownership, as these are often areas where large teams collide. In other organisations or groups this may not be the concern, and thus working with more efficient, coupled designs works just fine.

Thanks for keeping thing civil!