News for hackers. Stuff that matters.
Re:McDonalds Event Driven Architecture by b20000 on Tuesday December 06, 2022 @07:23PM (#33889065)
why does everything have to be microservice oriented and what's wrong with a simple monlithic application that runs the whole thing?

also, when are those ice cream machines going to get fixed?

Re:McDonalds Event Driven Architecture by toomuchtodo on Tuesday December 06, 2022 @07:31PM (#33889137)
To your point, Shopify's monolith was handling 1.27M requests/sec on Black Friday: https://twitter.com/ShopifyEng/status/1597983918900510720

Thread: https://threadreaderapp.com/thread/1597983918900510720.html

Re:McDonalds Event Driven Architecture by aeyes on Tuesday December 06, 2022 @10:00PM (#33890158)
Is running a separate instance of the monolith with a separate database for every store really "a monolith" withstanding 1.27M rps?

It's a bit like saying Magento served 1M rps on Black Friday leaving out the small but important detail that each individual store has separate infrastructure and manageable load.

Divide and conquer works, congrats to the Shopify team that their design decisions worked out for their use case. And obviously some parts of the system are still shared but my guess is that they are not part of the monolith.

Re:McDonalds Event Driven Architecture by tiffanyh on Tuesday December 06, 2022 @08:23PM (#33889575)
> averaging 3 Terabytes per minute of egress traffic across our infrastructure. That’s 4.3 Petabytes per day!

I’d hate to get that AWS bandwidth bill.

Re:McDonalds Event Driven Architecture by ip26 on Wednesday December 07, 2022 @01:21AM (#33891254)
On the other hand, 4.3 Petabytes of VISA/MasterCard traffic is a bill you'd probably be happy to pay. (It's Shopify after all, not Flickr)
Re:McDonalds Event Driven Architecture by spoils19 on Tuesday December 06, 2022 @10:11PM (#33890210)
Exactly. I've written and maintained monoliths that handle close to ~20M requests per second, and it only went down once (when somebody tripped over the power cable!)
Re:McDonalds Event Driven Architecture by gscho on Tuesday December 06, 2022 @07:34PM (#33889166)
But ruby is too slow!
Re:McDonalds Event Driven Architecture by pxue on Tuesday December 06, 2022 @07:51PM (#33889302)
Lots of their code is in Go
Re:McDonalds Event Driven Architecture by ecshafer on Tuesday December 06, 2022 @08:23PM (#33889576)
Way way way more of our code in Ruby.

Go (and now Rust) is really only used for very low level services with a high SLA (Like Infrastructure). Almost all business logic is Ruby + Rails.

Re:McDonalds Event Driven Architecture by vips7L on Wednesday December 07, 2022 @06:16AM (#33893082)
True but you’re still putting significant investment into ruby to speed it up. Ruby is slow.

I don’t think any other company could do that.

Re:McDonalds Event Driven Architecture by ramenmeal on Tuesday December 06, 2022 @07:56PM (#33889339)
In your monolith if you offload a request to a queue and have a background process processing the queue messages, what do you call that module processing messages? Is it a component of your monolith? I think a lot of teams would call it a microservice, I could see some people considering it a component of a service.

Unless you're confounding microservices w/ async architectures and saying to drop asynchronous patterns like this all together.

Re:McDonalds Event Driven Architecture by b20000 on Tuesday December 06, 2022 @08:12PM (#33889481)
I don't need another process. I can use a thread.

If the teams you are talking about never heard of threads and only know about microservices, then there is something seriously wrong with their CS education. Maybe they all were hired via leetcode. That could explain it.

I'm not confounding anything. Distributed programming has its applications and uses, but if you don't have a good reason to use it, then don't, and use a thread in a single process for background processing.

Re:McDonalds Event Driven Architecture by oflor on Tuesday December 06, 2022 @08:29PM (#33889613)
And how does it recover incomplete tasks in case of sudden power outage? Microservices use persistent message brokers for that, which are not there in threads. Or are these monoliths all treated as pets with redundant power supply and network lines?
Re:McDonalds Event Driven Architecture by sebazzz on Tuesday December 06, 2022 @09:11PM (#33889906)
Thread does not imply no queue or no persistent storage. In fact, if you use something like Hangfire you already have that.
Re:McDonalds Event Driven Architecture by strokirk on Wednesday December 07, 2022 @02:33AM (#33891655)
My CS education (Stockholm, KTH) didn’t include anything about web service architecture, and information about threads was about how they are implemented in the OS at a low level, not how to use them effectively. I think this stuff is normally picked up after working in the industry.
Re:McDonalds Event Driven Architecture by esprehn on Tuesday December 06, 2022 @08:12PM (#33889484)
The background process is just threads in the monolith, that's not a microservice. That a different pod running the same code might pick up the async task doesn't make it less of a monolith either.
Re:McDonalds Event Driven Architecture by ecshafer on Tuesday December 06, 2022 @08:26PM (#33889599)
I have never seen what you are describing called a microservice. Microservice always means some kind of independent application in its own runtime.
Re:McDonalds Event Driven Architecture by marcosdumay on Tuesday December 06, 2022 @08:40PM (#33889712)
What are you talking about?

What makes it a service soup is the soup of services on the other side of the queue processor. If those components weren't services, the application would be a monolith.

Anyway, there many reasons to organize your code on services, and McDonalds is large enough for them to be perfectly valid. But if you take a closer look, those components on the article aren't the ones that do anything, they are just new queue processors that may or may not finally deliver your messages to the destination. That's an irksome architecture.

Re:McDonalds Event Driven Architecture by nijave on Tuesday December 06, 2022 @08:31PM (#33889631)
>with globally distributed teams of developers with diverse skill levels

The last place I worked with a monolith (~100 developers) put quite a bit of work into making sure everyone didn't step on everyone else's toes. This mostly propagated as optimizing CI and improving test quality (since a single flakey test could derail everyone's build)

As to why "microservices" versus a few "normal" sized services

I'm not sure why it's always "monolith" or "microservices"

Re:McDonalds Event Driven Architecture by thiht on Wednesday December 07, 2022 @10:27AM (#33895422)
At my previous job we used "microservices" for lack of a better term, but really they were "business services". We tried calling them "business services", "macroservices" or just "services", but it was confusing so in the end we just stuck with "microservices".
Re:McDonalds Event Driven Architecture by nijave on Saturday December 10, 2022 @11:21AM (#33933862)
I think we (as an industry) are basically just revisiting SOA https://en.m.wikipedia.org/wiki/Service-oriented_architectur... (but maybe with a little less Java this time)
Re:McDonalds Event Driven Architecture by kemiller2002 on Tuesday December 06, 2022 @07:32PM (#33889141)
Well, I mean really most of the micro service architectures are just monoliths with network calls between the components.
Re:McDonalds Event Driven Architecture by 411111111111111 on Tuesday December 06, 2022 @07:52PM (#33889306)
That's called distributed monolith. It's pretty much guaranteed to happen if the developers don't introduce a lot of redundancy while splitting up the services.
Re:McDonalds Event Driven Architecture by adam_arthur on Tuesday December 06, 2022 @07:56PM (#33889343)
If your services need to be chatty with eachother then the boundaries of the services are wrong.

Hopefully by redundancies, you dont mean sharing data access logic

Re:McDonalds Event Driven Architecture by b20000 on Tuesday December 06, 2022 @07:43PM (#33889245)
yeah, so what about locking? it must be a nightmare to make sure that the components all work together as intended...
Re:McDonalds Event Driven Architecture by xwolfi on Tuesday December 06, 2022 @07:59PM (#33889369)
So, normally, you do not need to lock. If all your services are single threaded, and you have a good transactional model, you only need to duplicate services to create parallel routes.

You need to lock when you write a shared area from multiple sources with no opinion on write ordering.

But say your pipeline is client-> decorator -> processor -> observer with client publication -> external partner, each input will go into a set of instances different from the previous and next one, and rejoin at the output who will queue and order them. You have parallel heavy work and sequential light result publication. Your simple output must be as fast as the sum of your parallel routes to minimize queueing.

Ofc it s more complex, and I prefer 0 network hop myself, but I work on a large investment bank micro service system and we do not lock, and the component are both simple and complex enough that when one disappear, everything else waits or rebalances, and when it reappears it can catch up automatically, and go on. It consumes large amount of memory to keep a duplicated state in each component and persistence is not guaranteed to be on time (in fact, our persistence layer was 30 minutes behind by mid day, for years, until we dug into the 30yo sql)

Re:McDonalds Event Driven Architecture by b20000 on Tuesday December 06, 2022 @08:15PM (#33889514)
so why do you need this to be distributed and why can you not use a monolithic server application, perhaps with background threads?
Re:McDonalds Event Driven Architecture by codebje on Tuesday December 06, 2022 @08:30PM (#33889620)
One reason come to mind: Conway's law. If you have a monolithic team a monolithic server is usually a pretty good solution to a problem. If you have multiple teams you're likely to wind up with an architecture that lets them work more independently, leading to separate release schedules.

... which perhaps just shifts the question to "why do you need multiple independent teams and not just use a monolithic development team?"

Re:McDonalds Event Driven Architecture by Kamq on Tuesday December 06, 2022 @07:55PM (#33889332)
> yeah, so what about locking?

POST /lock

This is only a slight exaggeration over some of the stuff I've seen people try to pull.

Re:McDonalds Event Driven Architecture by nathanaldensr on Tuesday December 06, 2022 @07:43PM (#33889247)
This is a very informative YouTube video on that very subject (ice cream machines): https://www.youtube.com/watch?v=SrDEtSlqJC4
Re:McDonalds Event Driven Architecture by dboreham on Tuesday December 06, 2022 @09:47PM (#33890093)
Because Conway.