I know that Lemmy is open source and it can only get better from here on out, but I do wonder if any experts can weigh in whether the foundation is well written? Or are we building on top of 4 years worth of tech debt?
Well it’s written in Rust. Doesn’t that make it automatically awesome and fast?
“It’s webscale”
What does this mean?
It’s from this old meme video
There are no good code bases, only less bad ones.
The only valid measurement of code quality: WTFs/minute
Is Lemmy less bad or more bad than a typical open source project?
From some comments I’ve read, it’s at least in better shape than kbin? A few people expressed interest in helping with that project and then went running for the hills after reading through the code.
It’s probably not the only reason, but Rust is a much more attractive language/platform for devs to work with than PHP. (Source: https://survey.stackoverflow.co/2023/#section-admired-and-desired-programming-scripting-and-markup-languages)
It’s also more scalable, because it’s a compiled multi-threaded technology, while PHP is interpreted and mono-threaded.
Mother. Of. God. Did they really write Kbin in PHP?
I may be talking shit because I’m not a PHP coder, but the times I’ve seen it, it was a nightmare.
The best code base is the repo I just created and haven’t committed anything to.
Just clone this one. Guaranteed the best repo ever! https://github.com/kelseyhightower/nocode
If you think four years of technical debt is a lot, wait until you hear about Microsoft Windows.
Someone mentioned they had started out using websockets instead of http. I guess they’ve since migrated, but that design choice makes me wonder about the qualifications of the devs to make that kind of choice.
We need to rewrite it in Rust.
oah!!1
It’s decent, but it isn’t scalable, at least not yet.
Right now the entire Lemmy backend is one big “monolith”. One app does everything from logins and signups to posting and commenting. This makes it a little harder to scale, and I wouldn’t be surprised to see it split out into multiple micro services sooner rather than later so some of the bigger instances can scale better.
I’d love to know where the higher level dev stuff is being discussed and if they’ve made a decision on why or why not microservices.
There’s no reason that a monolith can’t scale. In fact you scale a monolith the same way you scale micro services.
The real reason to use micro services is because you can have individual teams own a small set of services. Lemmy isn’t built by a huge corporation though so that doesn’t really make sense.
You definitely can’t scale a monolith the same way you can scale a micro service
You can easily scale a monolith. You typically horizontally replicate any web server (monolith or not) to handle whatever traffic you’re getting. It shouldn’t really matter what type of traffic it is. Plenty of the world’s biggest websites run monoliths in production. You know how people used to say “rails doesn’t scale”? Well they were wrong because Rails monoliths are behind some huge companies like GitHub and Shopify.
The lemmy backend is also quite lightweight and parallel so it’s cheap and effective to replicate.
In my professional experience microservices are usually a dumpster fire from both the dev perspective and an ops perspective (I’m a Site Reliability Engineer).
I can’t say I disagree… Poorly implemented microservice architecture is the bane of my existence. Well implemented, though, and it makes my job so much easier.
Granted, my SRE team has all public facing production infrastructure built using an IAC process, if something causes too much trouble, it’s easier to quarantine and rebuild the offending node(s), and can be complete in under 10 minutes.
The biggest problem is far too many developers ignore the best practices and just shift existing code into smaller services. That will never give you either performance or stability benefits. Honestly, it will probably make any issues worse. Microservice architecture is a huge shift in thinking. The services need to be fairly independent of each other to really make any gains. To get to that point will always take a whole lot of work. That being said, there is nothing inherently wrong with some monoliths, but the benefits of splitting out as much of the higher traffic and resource intensive work should never be overlooked.
the same way
I think it will improve as more people get involved. The fundamentals seem to work fine. Haven’t looked at the repository yet but I am planning to do so and see whether I can make a (small) contribution somewhere. Probably in the form of cleaning up some technical debt.