r/ProgrammerHumor 3d ago

Meme distributedStress

Post image
13.7k Upvotes

335 comments sorted by

View all comments

Show parent comments

400

u/WriterPlastic9350 3d ago

Let's be real, if a micro service is down, youre down too.

If our store service goes down, that sucks for us, but our login service, queue service etc all still work. People can't buy shit but they can still play our games.

Not to mention, our store service needs far less traffic than our queue service, or our login service, or matchmaking service etc.

A monolith is sometimes a good solution - our games are monoliths - but service oriented architecture exists for many reasons, some technical and some political

Your job isn't to design a solution that scratches your particular brain itch, your job is to design a solution that works for the constraints you need. That might be a monolith but it also might not be!

356

u/cross_the_threshold 3d ago

Your job isn't to design a solution that scratches your particular brain itch, your job is to design a solution that works for the constraints you need. That might be a monolith but it also might not be!

Listen here you little shit there is one god-ordained way to build things and it's whatever is in vogue at this particular moment in time using whatever language is in vogue at this particular time, how dare you imply that there may be situations and needs that require different approaches.

69

u/mwax321 3d ago

The key to success is to have a monolith so large that it takes an hour to build and publish.

When visual studio finally went 64 bit, you thought the solution was bugged because it loaded so fast.

32

u/kurtymckurt 3d ago

The ci better take 24 hours to build and test or you’re not monolithing properly

7

u/Tupcek 3d ago

if it is too quick, it’s certainly bug

2

u/inemnitable 2d ago

No no no, if it compiles the first time it's bugged. If it builds fast you accidentally rm -rf -ed the repo.

1

u/NUTTA_BUSTAH 2d ago

You jest but this is how we catched many problems at one shop.

1

u/mwax321 2d ago

If I'm being brutally fair to some of the garbage build times I've had in the past:

A lot of times, these are caused by me having to use 3 different versions of some library because of legacy code. Or we license some library that requires a fuck ton of dependencies that only the library uses.

But to build it all ourself would also be a complete waste of time.

I remember a big offender back in the day were those Microsoft Office file editor libraries. To upgrade would cost the company some ridiculous $20k license and offer zero additional features that we need.

And so, yeah, we keep including the old newtonsoft json because it needs it!

1

u/FerusGrim 2d ago

When visual studio finally went 64 bit, you thought the solution was bugged because it loaded so fast.

Not strictly this scenario, but I worked a job for a few years where every compilation took minutes. It was common practice to finish up a bunch of work and queue a slew of compilations before your lunch break.

Then I got a new job and worked with a bunch of tinier, discrete applications which would compile in a few seconds. I'd become so use to quick compilations only ever being the result of an error killing the job that for at least a week afterwards my blood pressure would rise whenever a compilation would finish in <10s.

19

u/HadionPrints 3d ago edited 3d ago

Now listen, whatever’s in vogue at this time is nothing but bloat, dependency vulnerabilities, and syntax sugar. If your backend isn’t written in PHP or Pearl, you’re planning for failure.

If your app wouldn’t survive the 90s, it won’t survive prod.

4

u/cross_the_threshold 3d ago

FORTRAN II or bust!

5

u/mwax321 3d ago

Did you know a guy wrote an entire theme park game in assembly ?????

2

u/_DonRa_ 3d ago

No biggie anyone can write assembly it's easy (I wrote hello world in assembly)

3

u/djdanlib 3d ago

WASM doesn't count.

Or does it?

Who even knows these days.

2

u/ashgs872tbhjs 3d ago

If you hand-code it instead of transpiling it's a bit of an achievement. You're still abstracted from the hardware though, so it's definitely not nearly as hard.

1

u/AdImmediate5145 2d ago

You talking about roller coaster tycoon?

3

u/mattsl 2d ago

You mean it's whatever was in vogue when you started your first job and anything that's changed since then is ignorant children who can't grasp the complex nuance of your decisions. 

-6

u/TopLate7592 3d ago

The dark road to socialism.

2

u/WriterPlastic9350 3d ago

Well, I am a socialist. It’s pretty based 

1

u/TopLate7592 3d ago

I mean, same, it was just a joke.

25

u/mwax321 3d ago

See... To me what you're describing isn't very micro. That's just different systems.

Before that book came out, people had a login system, a matchmaking system, the online store...

I mean, I have no idea how your system is designed. I'm just an old grumpy "back in my day" fart nugget 😂

23

u/wrecklord0 3d ago

This. Different things should be kept different. I have a feeling that some people use "microservice" as this magical word that removes all inter-dependencies. If you have function A that relies on function B, it doesn't matter if its in a monolith or a micro-service, A is not going to work if B doesn't.

16

u/mwax321 3d ago

Hahaha but it's happened so much. I'm over 20 years in and I swear we've come full circle 3 times now. Especially on web.

The switch from all JavaScript bad css good. Handle it all with the backend using MVC. Then to front end frameworks like angular and react. Then suddenly, this new concept called "server side rendering" rofl.

5

u/ashgs872tbhjs 3d ago

You can SSR with React, FWIW, like via NextJS

3

u/HerrPotatis 2d ago edited 2d ago

I don't know why you got downvoted. SSR of today is fundamentally different from the good ol' days of LAMP.

u/mwax321 seems to have a lack of understanding of where we came from, why we did things the way we did them, and why we do them differently now.

This notion that, hurr durr, modern webdev is stoopid, just because we shelf concepts or upcycle old ones is not a good take. I'm sure that 10-20 years from now, everything will have changed again, but we will still use concepts and features from today.

2

u/WriterPlastic9350 2d ago

People liked React and Angular because it made frontends easier, then people realized that React could be used for non-javascript environments, and then realized you can restore progressive enhancement by rendering React on the render and piping a large javascript bundle to the frontend.

Today's SSR builds on this by basically designing an application and having the language (or framework, rather) express which parts require user interactivity and which don't, and this makes it easier to deploy applications to multiple platforms while not compromising the user experience.

We definitely go in cycles for sure, but viewing the path from MVC to frontend only libraries to SSR as being motivated out of where to put the javascript is kind of missing the forest for the trees

1

u/mwax321 2d ago

Im talking more the cycle from front end to backend and back.

3

u/FlakyTest8191 2d ago

I think microservices became a thing in big companies because you can have 2 teams own their own services and be relatively independent in regards to updates/deployment, and you can scale different, maybe you want to temporarily spin up more checkout services on a busy day, but the rest of the system is holding up fine.

2

u/WriterPlastic9350 2d ago

There's some kind of razor out there that essentially states that your software design eventually reflects the political structure within your company, so yeah, I think you've hit the nail on the head. (micro)services are as much about political and human decisions around deploying, or on-call, etc, as they are about technical aspects like scaling

2

u/U_L_Uus 2d ago

Honestly, that is what I hate the most about Java. The language is shite too, I even prefer Windows' imitation of it, but the main attitude of the average Java developer brings me to my boiling point. "Hey, I have a small business..." -> Spring. "Hey, I have a business chain" -> Spring. "Hey, I want to have a PowerBI besides the web app" -> Spring. It is said that when you are shaped like a hammer everything in the world looks like nails, but hell those people are shaped like bloody Spring salespeople, not as developers

2

u/tbhaxor 3d ago

What if your auth service is down. Only public enpoints will work. Even though cart service works but since you cant authenticate and authorize its useless

6

u/anto2554 3d ago

Hopefully your automatic system or on call engineer fixes it so fast that few customers realize

7

u/WriterPlastic9350 3d ago

A service oriented architecture doesn’t eliminate high risk dependencies, but it does make it easier to isolate them or provide support. 

3

u/taigahalla 3d ago

even if your auth system is down, your backend systems like automated billing, webhooks, alerts would at least still work. So for example, your airline system could keep scheduling flights and send out the appropriate itineraries even though users can't login

and your devops could easily see a specific contained set of instances that need recovery or rollback

0

u/protayne 2d ago

That's assuming you have one running app, if you had multiple instances, what's the chance they all go down? If you had a inventory service that's broken due to DB connection or whatever, youd still handle that in the monolith so you handle any exception.

I'm struggling to understand how a mictoservice architecture solves this where a monolith couldn't...

3

u/WriterPlastic9350 2d ago

Am I understanding correctly that you'd propose having all of your systems in a monolith and simply have horizontal scaling of that monolith? That sounds like a nightmare.

You still have to handle dealing with shared state and communication between different components on different instances, except now deploying your auth system also requires deploying your queue system.

1

u/protayne 2d ago

Not proposing anything, just arguing that a microservice architecture doesn't result in "one thing goes down, it all goes down" protection put the box and not something you can easily achieve in a monolith.

I'm pro microservices, for reasons like you just mentioned, just not a good take imo.

-3

u/Financial-Aspect-826 3d ago

Um.. No? Lmao. For "many reasons" lmao

5

u/WriterPlastic9350 3d ago

If you’re not going to elaborate I’m not sure what you think you’re adding to the conversation here.