r/ProgrammerHumor 3d ago

Meme distributedStress

Post image
13.8k Upvotes

335 comments sorted by

View all comments

152

u/Odd_Soil_8998 3d ago

truth. a well architected monolith is almost always going to be a better choice.

26

u/Stagnu_Demorte 3d ago

Until you need to scale different parts of the service. But yeah, until then it can really cut down on complexity.

18

u/remy_porter 3d ago

But then you just take a module and locate it outside of the monolith. If it’s a well architected monolith this should be easy.

38

u/DigiornoDLC 3d ago

Sounds like you’re describing microservices? 

1

u/andrewsmd87 3d ago

We're an enterprise saas product and while there is a whole hell of a lot of it I would love to to redo from the ground up, the mono repo route with some other large supporting services take is not one of them.

Micro services means oh we have 30 sperate code bases that all did their own thing. We have the one main mono that handles 75% of everything and 4 other things that do things that just made sense to be in a supporting role.

I would not call any of them micro services though, they're big in their own right

7

u/ashgs872tbhjs 3d ago

Lol, distributed monoliths (aka macroservices) are the worst of both worlds. You lose the benefits of both and gain the downsides of both.

Also, no, you can do the same things across 30 microservices just as easily as you can do them in that same code within the monolith. Either you have standards and checks and enforcement mechanisms, or you don't.

2

u/TwentyFirstRevenant 2d ago

Distributed monoliths. Stealing that

-1

u/remy_porter 3d ago

These don’t have to be different things. A good architecture doesn’t care where the components live. You should be able to take any unit in your application and run it alone with minimal setup. That’s the premise of unit testing in the first place! Now, glue that to and IPC layer and you can run it as its own process. Glue it to a network layer and you can run it as a service. Glue it to a message bus. Glue it to the CLI. You should be able to do all of these things without a huge pile of rewriting.

8

u/DigiornoDLC 3d ago

But back in the real world, people aren't going to write a monolith to be broken out into microservices later. Corners are always going to be cut, things will be rushed to meet deadlines, and you'll paint yourself into a corner that you can't escape without significant refactoring.

0

u/remy_porter 3d ago

But you are building your monolith so that you can unit testing it, I hope. And you’re likely going to want to run some automations on a subset of your system. Like sure, software can turn to shit. But also, if you can’t grab a useful module and slap a CLI in front of it and make yourself a tool to help you do your job, you’re already in the shit.