The following commentator writes:

Microservices shift your organizational dysfunction from a compile time problem to a run time problem.

This commentator expands on the issue saying:

Feature not bug. Run time problem => prod issues => stronger, faster feedback about dysfunction to those responsible

Now I get that with microservices you:

  • potentially increase latency of your through-put – which is a production and run-time concern.
  • increase the number of “network interfaces” in your code where there could be potential run-time errors of parsing.
  • can potentially do blue-green deployments. Those could be held-up by interface mismatches (see network interfaces). But if blue-green deployments work then it is more of a run-time concern.

My question is: What does it mean that shifting to microservices creates a run-time problem?

share|improve this question
2  
If A talks to B in a monolyth at least the actual interface can be proven compatible (through static typing) which makes it more likely it is also correct. Usually microservices communicate over something without such compile time checks – Richard Tingle 21 hours ago
up vote 48 down vote accepted

I have a problem. Let's use Microservices! Now I have 13 distributed problems.

Dividing your system into encapsulated, cohesive, and decoupled components is a good idea. It allows you to tackle different problems separately. But you can do that perfectly well in a monolithic deployment. After all, this is what OOP has been teaching for many decades! If you decide to turn your components into microservices, you do not gain any architectural advantage. You gain some flexibility regarding technology choice and possibly (but not necessarily!) some scalability. But you are guaranteed some headache stemming from (a) the distributed nature of the system, and (b) the communication between components. Choosing microservices means that you have other problems that are so pressing that you are willing to use microservices despite these problems.

If you are unable to design a monolith that is cleanly divided into components, you will also be unable to design a microservice system. In a monolithic code base, the pain will be fairly obvious. Ideally, the code will simply not compile if it is horribly broken. But with microservices, each service may be developed separately, possibly even in different languages. Any problems in the interaction of components will not become apparent until you integrate your components, and at that point it's already too late to fix the overall architecture.

The No 1 source of bugs is interface mismatch. There may be glaring mistakes like a missing parameter, or more subtle examples like forgetting to check an error code, or forgetting to check a precondition before calling a method. Static typing detects such problems as early as possible: in your IDE and in the compiler, before the code ever runs. Dynamic systems don't have this luxury. It won't blow up until that faulty code is executed.

The implications for microservices are terrifying. Microservices are inherently dynamic. Unless you move to a formal service description language, you can't verify any kind of correctness of your interface usage. you have to test, test, test! But tests are expensive and usually not exhaustive, which leaves the possibility that problems might still exist in production. When will that problem become apparent? Only when that faulty path is taken, at run time, in production. The notion that prod issues would lead to faster feedback is hilariously dangerously wrong, unless you are amused by the possibility of data loss.

share|improve this answer
    
Is this your personal viewpoint, or are you confident this is what the commentator in question meant with the quip? – JacquesB 22 hours ago
4  
@JacquesB I am confident that the “organizational dysfunction” refers to the inability to develop a system. The majority of my answer is context to illustrate how one could arrive at such a conclusion, but is my professional opinion and not taken from the tweet. – amon 22 hours ago
4  
And not to speak of versioning of interfaces (interfaces changing over time). – Peter Mortensen 12 hours ago
1  
@PeterMortensen Amen! Although there are benefits to decoupling the components -- particularly if they naturally can (but don't have to) run on multiple machines -- keeping the various consumers up to date with any API changes is a First Class PITA. – Peter Rowell 12 hours ago
1  
@mobileink Monolith isn't an ideal term here since it suggests “no architecture”. But what I'm trying to convey is a system that is developed and deployed as a single system, in contrast to a service-oriented architecture where parts of the system may be deployed independently. Please edit the post if you know a better term … – amon 11 hours ago

The first tweet was mine, so I'll expand on it:

Suppose you have 100 developers, working on a monolithic application. That's too many people to communicate effectively between each other, so the company has to work hard to divide them into smaller teams and create good communication patterns between them. When the organisation is "dysfunctional", teams probably aren't talking to each other, they aren't aligned to a larger goal, they disagree on priorities etc - as a result, it takes them forever to ship something. It's a "compile time problem" in the sense that the dysfunction is obvious before the software is produced. The project is probably a death march or never going to ship ("compile").

I think many people are attracted to micro services, and are moving to them, not because of inherit technical/architectural benefits, but because it allows them to ignore the organisational dysfunction. Instead of trying to align 100 developers, they hope that they can have tiny teams working in silos, each focussed on their own little micro service. If you are in such a dysfunctional organisation, this is so attractive: it gives you much greater permission to avoid people you don't like, to not communicate.

Unfortunately it becomes a "run time problem" because once the software is running in production, good communication becomes just as important. The problems with the organisation - the teams and how they are aligned and communicate - manifest at "run time".

The point of my tweet was: if what you have is a people problem, a new architecture isn't going to help. It will just delay the effects of the problem. I think the attractiveness of micro services to many people is the hope that it will magically solve these people issues.

share|improve this answer
6  
+1. This is much better as a Stack Exchange answer than as a tweet. :-) – ruakh 12 hours ago
    
The same is true for any dynamic systems, really. Dynamic typing is very useful, but only if you have the right people. "Freeform databases" are very useful, but only if you have the right people. If you don't have the right people, you're just delegating the problems, not solving them. – Luaan 1 hour ago

My question is: What does it mean that shifting to microservices creates a run-time problem?

That is not what those tweets are saying! They don't say anything about shifting to microservices, nor do they say anything about creating problems. They only say something about shifting problems.

And they put a contextual restriction on their assertions, namely that your organization is dysfunctional.

So, what the first tweet is basically saying is two things:

  • "if your organization is incapable of engineering complex systems now without microservices, it won't magically be able to engineer complex systems with microservices" and
  • "the problems caused by that inability which now show up during compile-time, i.e. during development will then show up during run-time, i.e. in production" (technically, they could also show up during testing, but remember, the quote restricts itself to dysfunctional organizations, which likely have a sub-standard testing regime)

The second tweet says that the fact that the problems only manifest themselves in production, i.e. where customers see them, is a feature, not a bug, because when customers complain, that tends to be heard in different places than when a build breaks, namely in places which are able to do something about the organizational dysfunction (e.g. high-level management). Since organizational dysfunction usually is a failure of high-level management this means that unsatisfied customers reflect badly upon those who are ultimately responsible for that unsatisfaction, whereas low code quality caused by higher-level management failures usually only reflects badly upon the developers, who are, however, not at fault and unable to do something about it.

So, the first tweet says that microservices move problems caused by bad management from compile time, where only developers see them, to run-time, where customers see them. The second tweet says that's a good thing, because then, the problems hurt those who are responsible for them.

share|improve this answer
    
I don't follow how low code quality is caused by higher level management - they aren't writing the code, the developers are. – Michael 18 hours ago
    
@Michael If you can't see how they impact code quality, perhaps consider what impact -- if any -- management has on any part of the quality of products their business creates. – wjl 18 hours ago
9  
@Michael: Everything is ultimately caused by higher-level management. Is low code quality caused by impossible deadlines? Who sets those deadlines? Who tells those who set those deadlines to set those deadlines? Is low code quality caused by incompetent developers? Who hired those incompetent developers? Who hired those who hired those incompetent developers? Is it caused by inadequate tooling? Who buys those tools? Who approves the budget to buy those tools? It is caused by stupid architecture? Who hired the architect? Who put him in charge? Those tweets were specifically in the context … – Jörg W Mittag 18 hours ago
1  
… organizational dysfunction. Well, making the organization function is pretty much THE job of higher-level management. That's what management is. – Jörg W Mittag 18 hours ago
    
@wjl Ah ok. I was thinking of it in the context of the length of the feedback loop.. making it go through management seems to decrease quality because instead of getting immediate feedback (e.g. compiler error) it gets deployed and the developer doesn't find out until later when they have probably task switched. This does not need to have anything to do with incompetence and everything to do with correcting minor mistakes that inevitably happen - the closer these are fixed to when they are made, the better. – Michael 15 hours ago

It creates a run-time problem as opposed to a compile-time problem.

A monolithic app is hard and expensive to compile. But once it compiles you can be reasonably sure that no extremely stupid incompatibilities between components exist, because the type system can catch them. The same error in a system of microservives might not show up until two specific components actually interact in a specific way.

share|improve this answer
4  
This seem to assume "monolithic" applications are always statically typed. What about dynamically typed languages? And what about statically typed service interfaces? – JacquesB 23 hours ago
1  
@JacquesB OTOH, I can think of exactly zero dynamically typed compiled languages. – immibis 22 hours ago
1  
@JacquesB JavaScript and Python aren't compiled. Unless you count internal interpreter structures as a compilation target in which case every language is compiled. – immibis 22 hours ago
1  
@immibis: every single currently existing ECMAScript implementation has at least one compiler. V8, for example, has two compilers and exactly zero interpreters, it never interprets, it always compile to binary native machine code. SpiderMonkey has four compilers, I believe, and one interpreter, but that interpreter doesn't interpret ECMAScript. SpiderMonkey never interprets ECMAScript, it always compiles it to SpiderMonkey bytecode first, which it then may further compile to binary native machine code. All currently existing Python, Ruby, and PHP implementations have compilers. – Jörg W Mittag 18 hours ago
2  
@LieRyan You are seriously confused if you think type inference is the same as dynamically typed and/or that Haskell is dynamically typed. – Derek Elkins 15 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.