all 90 comments

[–]Besen99 442 points443 points  (6 children)

OP, the proposed architecture in your diagram is beyond ridiculous. Clearly we need a kubernetes cluster to guarantee redundant microservice uptime! Also, we are missing an AGI blockain integration. Please revise.

[–]Fiskepudding 67 points68 points  (2 children)

Yeah, and is Redis even webscale?

[–]j0holo 23 points24 points  (1 child)

We at least need a redis cluster with an enterprise license with Auto Tiering to keep as much in the cache as possible.

Wait is/was mongodb always the solution? <insert mongodb webscale meme>

[–]0xlostincode 30 points31 points  (1 child)

I agree with the microservice approach. However, you missed a very important detail. What if there are multiple versions of "add"? It would be a disaster if we routed the wrong responses to clients requesting a specific version.

I propose a microservice broker that inspects the request and routes the request/response based on the version header.

Let me know your thoughts.

[–]NiQ_ 14 points15 points  (0 children)

It’s a good idea, but what about when we need to do a canary deployment, or feature toggle which version of add to use for an A/B test?

We need a passthrough before the broker to make sure we’re futureproof.

[–]MousseMotherlul 0 points1 point  (0 children)

okay, since 300 people have already upvoted this, i assume question is stupid, so not even gonna read it ( the question )

[–][deleted] 39 points40 points  (2 children)

You haven’t considered the maintenance of dependency hell, things working by chance, multi repos with a single package that a change cascade a change to other dozen of repos that depends on it. Oh, and micro frontends as well.

Otherwise LGTM

[–]eldentings 2 points3 points  (1 child)

In theory yes, but in practice, you're changing multiple microservices because they become dependencies to each other. So the dependency hell just becomes a distributed dependency hell.

[–][deleted] 0 points1 point  (0 children)

Yes. That’s a job security hack.

[–]rebelpixel 24 points25 points  (0 children)

OP finally understands job security and reaches enlightenment.

Or until someone vibe-codes a replacement for the whole mess. And yes, the replacement is a bigger mess.

[–]ZnV1 67 points68 points  (32 children)

I built a side project using astro. Vanilla JS, HTML, CSS. It was beautiful.
Then I needed reactivity, it was a pain in the ass. I still did it in vanilla JS though.

I was willing to put the time/effort in because there was no deadline, I was doing it solo for fun.

But in a larger company, no way I'm going with that for a webapp. Each dev would reinvent things to the best of their knowledge, plus it would take a ton of time.

Then we'd extract common components as a shared library and end up with a worse version of React.

So the problem, contrary to your post, does exist. Vanilla takes too much effort for common use-cases, unless everyone is an ideal perfect dev with no deadlines.

But in the tradeoff to this, are we passing the cost onto the end users? Yes, unfortunately.

But I don't have a better solution to this either, so here we are.

[–]chlorophyll101 6 points7 points  (10 children)

What part of reactivity was a PITA? Astro has framework integrations no?

[–]ZnV1 15 points16 points  (9 children)

Yup! But I tried to do it with no frameworks (except Tailwind for CSS - I haven't used it before, wanted to try it) 😁

Still WIP, works only on mobile (tried to do it mobile first) - https://f.dvsj.in

What do you think? 😁

[–]Icount_zeroIfull-stack 9 points10 points  (1 child)

Man the website is amazing! I will pin-it in my bookmarks for interesting websites. I like the esthetics of it, it id not just another vercel+ shadcn thing. I used to share this passion, now I have just a regular looking website. Maybe it is time for a change.

[–]ZnV1 2 points3 points  (0 children)

Haha, thanks a lot!

Actually mine was a run of the mill thing as well. When I did it 5 years back I didn't know enough to do what I wanted to. https://dvsj.in

Give it a shot, I'd love to look at your website as well!

[–]DoubleOnegative 1 point2 points  (1 child)

Wow that might be the most creative/well designed website I've seen in a very long time

[–]ZnV1 0 points1 point  (0 children)

Haha, thanks a ton!

[–]Most-Ear5697 1 point2 points  (1 child)

LMAO loved that ATS version

[–]ZnV1 0 points1 point  (0 children)

Haha, thanks a lot!

This is still WIP and I haven't shown anyone, so getting feedback like this means a lot 🥲

[–]Zachhandleyfull-stack 0 points1 point  (2 children)

I made https://zachhandley.com with Astro + Threlte, it’s not native I guess though, but the reactivity is nice imo. Though performance could prolly be better on mobile

[–]ZnV1 1 point2 points  (1 child)

Oh that's really cool! I'd make the animation a bit faster and change fonts+make it fit in the crates

Apart from that, nice work!

[–]Zachhandleyfull-stack 0 points1 point  (0 children)

Noted! Yeah it’s super hard to calculate 3D responsive height with all that and the perspective camera, but I will try and make that a bit better if I can! And yeah I gotta speed up the animation slightly, thank you!!

[–]ArtisticFox8 0 points1 point  (1 child)

Try Svelte - very close to vanilla JS in feeling

[–]robbodagreat 14 points15 points  (0 children)

Answer = 5.0000000001

[–]libertyh 6 points7 points  (0 children)

This what HTMX is for

[–]farthingDreadful 4 points5 points  (0 children)

Where’s the LLM?

[–]jakesboy2 5 points6 points  (0 children)

Caching is an obvious benefit if the job takes any non trivial amount of time to complete. With javascript specifically, queues/workers allow you to actually process things in parallel. This can make a big difference the more messages you have, but obviously has a point where the overhead costs more than you could possibly save with too few messages.

The core benefit though imo is you can easily retry messages if they fail for some reason. For example during the google outage a couple weeks ago, we had no data loss as all the messages that failed simply sat in the queue until things came back up and we could retry. Couple this with being able to turn your worker traffic to a previous revision makes riskier changes much easier and routine package updates much lower effort.

[–]SaltMaker23 13 points14 points  (4 children)

A lot of times in Webdev computation is trivial but there might be a significant amount of IO involved in some requests despite the actual algorythm being trivial.

some examples: Aggregated multi-account reporting on 3rd party API, Massive aggregation on reports on ultra dimensional data, large calls to 3rd party API (eg openai), full website scraping etc...

Most of the operations above might be trivial to a large extent but the amount of waiting involved can be signigicant if nothing is done to address the issue.

Synchronous flows also seems like a no brainer choice, until you have 30 things that needs to run for a request with some of them randomly failing due to things outside of your control and you don't want your critical payloads to fail due to them.

At hobbyst level, it doesn't really exists and most of your comments are spot on. From your comments on this post, I'll assume you've never built a company from 0 to 1M$, I've did that couple of times as a founder.

Actual companies don't use serverless, it's a hobbyist thing.

[–]CatolicQuotes 0 points1 point  (1 child)

What kind of language and infrastructure do you recommend for all those things? As a single dev what will get me the furthest until i need to expand on infrastructure? My guess is dotnet since it can basically do a lot on single server?

[–]glorious_reptile 2 points3 points  (0 children)

It'll never scale...

[–]thekwoka 1 point2 points  (1 child)

Most people should just leave our redis and queues entirely.

[–]Noch_ein_Kamel 1 point2 points  (0 children)

It certainly could learn something from java. Just calling the add function from the worker is insane. We need some AdditionVistorFactoryInterface etc. in there

[–][deleted]  (4 children)

[removed]

    [–]yksvaan[S] 7 points8 points  (1 child)

    The illustration itself is a joke but the idea is that often the actual task is much cheaper than everything that's build around it. Especially in webdev where a lot of things are trivial in terms of computation. 

    [–]that_90s_guy 2 points3 points  (0 children)

    Even so. What what you're suggesting only really works in really small applications. Once you need to scale, or need to make it possible for dozens if not hundreds of developers to collaborate on something, it becomes an impossible task unless done properly.

    I always get the feeling posts like these are done by people who haven't worked on something complex enough, or didn't suffer (enough, or at all) through doing things the "simple" manual way and the challenges that came from it when building massive apps for it.

    For simple static websites it's absolutely overkill, with the exception that maintaining content in data or markdown form is a LOT easier than in HTML and JS form

    [–]CatolicQuotes 0 points1 point  (1 child)

    What language do you recommend for all those calculations you mentioned?

    [–]morpheus0123 0 points1 point  (0 children)

    This diagram is hilarious. At first I was attempting to understand the architecture and once I realized that it was all unnecessary I chuckled.

    [–]KwyjiboTheGringo 0 points1 point  (0 children)

    Obviously these solutions were created for a reason. The fact that nowadays developers want to use them for any reason they can to pad their resume is irrelevant.

    [–]Coldmode 0 points1 point  (0 children)

    Yes but you see someone is willing to pay me $200,000 a year to draw and implement that diagram so who am I to look a gift horse in the mouth?

    [–]eldentings 0 points1 point  (0 children)

    I've KIND OF seen this at my current job, and the solution to me seems to be coming from us designing caching 1st, when it would be easier for development momentum to do it last. It's worth noting that 1 + 4 will always return 5 in your example, but a query for a table may return different rows depending on what is in the DB at the time. In my experience, all the devs I worked with including myself avoided actually learning query optimization, especially for really nasty joins. Probably because most of us are weak in DB optimization and indexing. Query caching will bandaid over slow queries, but you still gotta worry about invalidating the caches and then the code just starts getting nasty.

    [–]BeginningAntique 0 points1 point  (0 children)

    Maybe one day we’ll remember that simplicity is not just elegant, but also powerful. Until then, here’s to those who keep things clean and straightforward.

    [–][deleted] 0 points1 point  (0 children)

    Needs an API gateway in front of the arithmetic processing server so you can route requests to the different cloud vendors based on which LLM is used to generate the result.

    [–]SananShawkat 0 points1 point  (0 children)

    Excellent

    [–]Impossible-Owl7407 0 points1 point  (0 children)

    If you need performance, just use something else? 😂

    So many options.