Service-Oriented vs. Monolith: Organizational Perspective
p99th.substack.com
p99th.substack.com
Couple SOA with "two-pizza teams" (a team isn't any more larger than could be fed with two pizzas) and "single-threaded owners" (complete authority and autonomy to build or buy anything that meets business needs, even if it is duplicates efforts of another team), you've got yourself an org structure similar to that of Amazon's.
Refs: https://archive.is/lWPof | https://archive.is/tBpsj
Also: https://www.goodreads.com/en/book/show/53138083-working-back...
Diameter of 14" = 35.6cm = an area of 993 cm^2.
Diameter of 16" = 40.6cm = an area of 1.3k cm^2.
Diameter of 18" = 45.7cm = an area of 1.6k cm^2.
And down thread someone from Germany says large pizzas there are 26cm, which would be an area of 531 cm^2. That's less than a third the size of an 18" pizza!
So, I assume the pizzas in the US are pretty large.
Our "large" pizzas here in Germany have a diameter of 26cm. I usually eat one of those on my own.
IME, That’s about a typical US small pizza (10”; large is typically 14” though I've seen places that use 12”/14”/16” S/M/L.)
Given a radius of z:
Pi•z•z=a
Micro services and SOA are actually different things, despite sharing similarities.
> however microservices term does lead some to believe each service to be micro in size
Yeah, the name is actually a bad one.
Fair point. Looking back, I think I should've made it clearer, what I was trying to convey there was for the sake of this article I was using them as similar paradigms of design. However, as you've pointed out they are not the same thing.
The term "microservices" is not as much bad as misunderstood (which, in a way, means that it is bad): it is commonly believed that it implies each service to be "micro" in the size of the codebase. In fact the "micro" refers to the responsibilities/functionalities a service is supposed to provide. Of course, that is more difficult to measure, as the service boundaries are often not obvious.
Especially when no one defines these terms the same way, so it's not like I can go and find and compare definitions.
What would you say the differences are? In my mind, its mostly SOA with the idea that there's no lower bounds on service size. I do agree that people mistake that meaning microservices have an upper bound in size.
Team B had other priorities, didn’t want Team A touching their code, didn’t want to think about who would support the changes, didn’t want to perform the code review when a developer from Team A sent in the pull request. Team B also didn’t want to implement the features themselves.
Now imagine this occurs at scale, and you literally have entire organizations whose developers work in services owned by other teams, who cannot deliver on time because of these issues out of their control, and they’d just quit and work somewhere else.
As far as I know, that company still hasn’t found a way to solve this problem.
One solution may have been to rearchitect the services and use some kind of federated model to decouple each teams needs - so they can share what they need and have physical/logical separation in the areas where they diverge.
But directors and management are under the gun to deliver things. Investments in rearchitecting? GTFO.
Building new tech solutions is intellectually fun and gets people promoted. Migrations and support are hard and can be way more valuable in the long term, but are rarely recognized or rewarded at some big co's.
I've heard this phenomenon called promotion-oriented architecture.
It sounds like it's working really well to expose an organizational failure. As soon as you have "A owns service, B asks A to build feature, A won't" that has nothing to do with SOA and it's instead about how you prioritize work. Whoever owns the business priorities will have to make the call on what happens here.
I’m not saying SOA inherently makes it worse. I’m saying SOA still comes with its own costs.
> It sounds like it's working really well to expose an organizational failure.
Exactly. But there’s a belief that having individual services leads to efficiencies because everyone is decoupled and works across established contracts.
The reality of the game is far more complex. While it is an organizational problem, at scale the organizational issue is also hard to resolve because of competing goals and priorities.
But to analyze SOA, we have to consider this reality. Looking at SOA as a silver bullet in a vacuum is near sighted - that’s all I’m trying to say.
> Whoever owns the business priorities will have to make the call on what happens here.
In large, distributed organizations, there often isn’t a single person, or the common owner is much higher in the org tree that people don’t want to go to them. We can call that a management failure, but that’s not the point. In reality, this inefficiency burns out engineers and leads to a lot of churn. And this is a ground reality in at least two of the companies whose products you most likely use every day.
Yeah that's actually exactly my point.
> And this is a ground reality in at least two of the companies whose products you most likely use every day.
Yeah, those companies suck organizationally.
These companies are viewed as exemplars of operating at scale. If they're failing at this, there's a deeper problem that requires a second look. Saying these companies "suck organizationally" isn't productive or helpful.
My main point was SOA comes with its own set of issues when you implement it at large scale. You're talking around me instead of listening to what I'm trying to communicate. I'll stop engaging with you since it's not productive.
I mean we can just talk openly about the companies - like are we talking Google? Because I don't know anyone who thinks Google is organizationally functional.
Your post is basically a description of the aftermath of this situation. Which is accurate. But the solution isn't in the description of the aftermath.
We don't know what the service does, why team B doesn't want to address team A's needs, can team A use something else and so on.
Things need to be owned by specific teams, because otherwise the codebase turns into a mess of ad-hoc patches concocted with little to no domain insight on the service being edited.
Service B: We built a distributed storage system. You can append to files, and you can read at a given position from finalized files, and that's it.
Product A: We'd rather have an ACID database.
Service B: lol, fuck off.
Product A: reads some distributed systems papers, improves their design OK, we now realize that these primitive operations are sufficient.
My philosophy here is informed by regular attendance for years at the gmail SRE design review, where typically some guy from Search would come around and say something dumb like "send us every message for universal indexing" and gmail leadership would say "LOL no. fuck off." Then a few months later they'd come back with something better like "compute for us these privacy-protecting index fingerprints for universal search" at which point you can start to say yes. I don't see the value in immediately capitulating to what other service owners claim to need, especially when your first allegiance has to be to your own userbase.
I’m not arguing either way is right or wrong, but I disagree that microservices inherently makes things easier to test. Isolated tests actually implies you tested the lego bricks but not the overall assembly, which would potentially imply higher risk.
It’s also possible to write microservices that are architected in a way contrary to FP, such as having services that mutate their data stores, so I’m not sure id compare microservices to functional programming either.
You compare services to functions, which they are, only with the added complexity of dealing with distributed nature of it. I’m not obviating the benefits, but I disagree microservices are the automatic win you imply.
I would instead attribute the benefits you mention to having good abstraction, whether that’s functions or classes or services, abstractions allow you to isolate mock and reason in isolation.
For instance, the article mentions microservices are supposedly better so a change to your service doesn’t cause spooky action at a distance. I’m not buying this. In a poorly done microservices architecture emitting events can indeed cause spooky action at a distance, especially if you invested heavily into isolated testing only. It is easier for a monolithic architecture to shift boundaries, and in a microservices architecture it is possible (and in my experience common) that changes will need to be made across boundaries
So yes there is a caveat, if a service doesn't return the same output for the same input then some benefits of the approach are lost. I would like to add an additional benefit for teams of programmers, in that each team gets the ability to build out a service using whichever technology they find suitable i.e language, frameworks etc. Something I personally find difficult to do with a monolith.