Yes, we know, microservices-serverless-edge computing are the thing and have been for a while…These ideas have been dominating the software engineering zeitgeist. They are the term du jour, the state-of-the-art, the bees’ knees. But is this enthusiasm justified?
Not every app has to play in that sandbox, we think.
The hype around these “decoupled” systems can make one believe that contemporary monolithic architectures and the ENIAC are basically one and the same. (To be fair, ENIAC was monolithic in more ways than one, but let’s not get bogged down in the details.)
So, while we at Digit have worked on microservice-based projects before and loved doing it, we’d like to stir the pot a bit with this humble blog post: let’s hear it for the forlorn, lonely monolith!
Before fully getting into polemics, let’s define terms, shall we?:
Monolithic application architectures go back a long way indeed. Usually comprised of a database, business logic, and user interface tightly coupled in your basement’s servers, they treat all processes as a single service running on a single codebase.
Pros:
- Easier to understand and therefore build, test, and deploy;
- require expertise usually circumscribed to a single stack and language so your organization can employ smaller, less “unicorny” developer teams;
- performance can be great because the whole thing is, well, a unit and works as such.
Cons:
- Changing anything can break everything and means deploying the entire codebase every time;
- on-premise infrastructure is needed;
- marriage to a single technology is usually required.
On the other hand, microservices application architectures involve breaking down a program into smaller, independent components that communicate with one another, usually via API and function calls, oftentimes through cloud providers…hence “serverless” because you don’t have to own the metal.
Pros:
- Changing or breaking one “thing” doesn’t affect everything else;
- no need to purchase and manage hardware;
- adding features to your application is relatively straight-forward and independent of the rest of the codebase.
Cons:
- Cloud providers’ on-demand pricing can get out of hand;
- complexity grows exponentially (it’s easier to manage one thing than 30);
- larger teams with a multiplicity of skills are needed;
OK, now that we are relatively clear as to what we are debating, you might say…maybe this is just Digit’s opinion…maybe every software app should be serverless, otherwise why all the brouhaha?
Well, David Heinemeier Hansson, the creator of Ruby on Rails and Basecamp (and many other things besides) appears to think that renting CPUs is not always good idea. So, him and his company stand to save $7 million over the next five years by dumping the cloud. He writes:
“Before we more broadly can set sail back towards lower-cost and decentralized shores, we need to turn rudder of our collective conversation away from the cloud-serving marketing nonsense about running your own powerplant. Up until very recently, everyone ran their own servers, and much of the progress in tooling that enabled the cloud is available for your own machines as well. Don’t let the entrenched cloud interests dazzle you into believing that running your own setup is too complicated. Everyone and their dog did it to get the internet off the ground, and it’s only gotten easier since. It’s time to part the clouds and let the internet shine through.”
Now, we are not sure 37-Signal/Hey/Basecamp are leaving microservices and going monolith ON TOP OF abandoning the cloud, but it wouldn’t surprise us because these things usually go together (along with Jamstack and agile, but we’ll leave those topics for other posts).
But wait, there’s more. Check out this diagram contrasting what everyone thinks the Stack Overflow architecture looks like with what it actually is. Wait for it: A solid monolith!
Sure, there are some apps that benefit from total decoupling, containers, and the integration of myriad APIs (commodity trading, perhaps?) but most software, frankly, would do well with a feature haircut and diminishing complexities as it is.
We thought we’d end up with the usual “there’s no black and white answer…” porridge that every AI-written article out there serves up (this article is partially AI-written, by the way, ooops!). And to be sure, there is a lot to be said for the flexibility and scalability of microservices…but Digit never believed in the milquetoast approach to anything, so we are doubling down! Bring back the monolith!
(For some people in some cases.)
No seriously, we are doubling down on the monolith.
(Maybe.)
As always if you need help with a website, app or need help navigating the changes that AI is bringing, get in touch with us.