Stark9837, (edited )
@Stark9837@techhub.social avatar

"Why We Left The Cloud"

Recently watched this video by #ThePrimeTime on #Youtube, and his hot-take 🔥 was that they were using #Ruby, and half of their pain was caused by this.

I have no experience with Ruby at all and most probably won't even recognize it if I were to read it.

If Ruby is such a bottleneck and inefficient, why did #Mastodon :mastodon: use Ruby for its implementation?

I know Ruby is often praised for servers and backends, especially APIs, but we have many solutions for this in #Python :python: , which I wouldn't recommend, but #Go :golang: and #Rust.

Does anyone have opinions or sources for this statement?

Video: https://youtube.com/watch?v=6h4oiPwtwDk&feature=share

Original article:https://world.hey.com/dhh/why-we-re-leaving-the-cloud-654b47e0

#programming #tech #infosec

postmodern,
@postmodern@ruby.social avatar

@Stark9837 this entire discussion was started by one company, BaseCamp. AFAIK, no other Ruby/Rails shops have "left the cloud". This is likely because BaseCamp has unique workloads and performance requirements which the pricing model of "the cloud" penalizes. The whole idea of "the cloud" is to cram as many tenants into one datacenter, which assumes all of those tenants have minimal usage requirements. If one tenant is a big company that requires lots of dedicated resources, that will cost $$$.

teotwaki,
@teotwaki@mastodon.online avatar

@Stark9837 I think there’s also another aspect to consider: development speed. RoR and Ruby more generally has always had a great focus on testing, and a solid Ruby dev can knock out a lot of /complete/ features in a very short amount of time.

If Mastodon hadn’t been as featureful at the exact moment it was, it may not have had the success/uptake that we’ve seen now.

The same is true for companies. Having the best, most optimised piece of code is useless if you run out of runway.

mo8it,
@mo8it@fosstodon.org avatar

@Stark9837 I don't blame Mastodon at all. In 2016, I think Ruby or Python were a good choice and Rust was for sure not an option for backends yet.

But I would blame new software, especially if they then complain about bad performance.

I think that Mastodon will be rewritten at some point, but the devs have to decide when it is the right time.

badrs,

@Stark9837 i have no doubt that rewriting his project in python with the goal of making it faster made it faster. Theres always a faster language, a more efficient framework, some new database that would be perfect for your needs. The question is whether refactoring your codebase is a better use of your time than adding new features and i dont think mastodon is there yet. I think the developers should stay wherever theyre happiest.

Stark9837,
@Stark9837@techhub.social avatar

@badrs

Refactoring your code is like selling old technology like an old laptop.

If you take too long, it becomes dated, and you can't get a good price for it. So you hold onto it until your children one day need to get rid of it.

Refactoring code is the same. You need to recognize your mistakes early on and have an active investigation and objective analysis.

Otherwise, it becomes too big, and it is no longer viable, and you are stuck with it forever.

mo8it,
@mo8it@fosstodon.org avatar

@badrs @Stark9837 Rewriting to Python means outsourcing performance to C. I would expect a performance improvement if you don't write hot loops yourself.

But it is still a very questionable decision. Why not rewrite it directly to a compiled language even without GC?

Just use Rust, it is awesome for backends :D

Stark9837,
@Stark9837@techhub.social avatar

@mo8it @badrs

I like and :golang: for backends. For simple personal prohects, :python: and are great. The development process is fast, I can push it out under hours. But I wouldn't use it for mission critical systems!

mo8it,
@mo8it@fosstodon.org avatar

@Stark9837 @badrs I had enough Flask experience to never write something in it again, not even for my own projects xD

Who does not love runtime errors in production, right? Especially those that can be easily detected by a type system.

Plus, a couple of Gunicorn workers eat hunders of RAM while still being very slow... An interesting design decision...

BTW, after being familiar with Axum, I am able to make an app running in a couple of hours too :P

tshirtman,
@tshirtman@mas.to avatar

@Stark9837 @mo8it @badrs have a look at FastAPI for python backends, it leverages Pydantic a lot, making types really useful in development and thus harder to avoid and build a broken system.

badrs,

@mo8it @Stark9837 im not sure if its intentional but this is exactly what im talking about. If they switch to a "better" language everyone will just start talking about some other language thats even more efficient or streamlined.

Stark9837,
@Stark9837@techhub.social avatar

@badrs @mo8it

That is the core skill you need to learn as a developer. No language is perfect, you have you advantages and disadvantages.

You'll always get your critics and there will always be "a better language".

Whether is "a better language" is never the question you should ask yourself. You should rather ask whether "there is a better solution"

You can't fix your language, only your solution.

jan,
@jan@toot.io avatar

@Stark9837 IMHO there is no right or wrong here. You can write efficient Ruby code to scale an app up to IPO in case of Shopify which is written in Rails. Or you can write shitty complied code and consume endless hardware resources.

Stark9837,
@Stark9837@techhub.social avatar

@jan

Wait! Wait! Wait!

Are you telling me proper engineering practices actually are important?

Now that is a 🔥 hot-take in modern development.

jan,
@jan@toot.io avatar

@Stark9837 Not ChatGPT driven development 😅

Disclaimer: I switched from Ruby to Go some years ago but still loving the Ruby syntax.

Stark9837,
@Stark9837@techhub.social avatar

@jan

That's why we only use 😂

jan,
@jan@toot.io avatar

@Stark9837 Nope.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Youtube
  • DreamBathrooms
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • JUstTest
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • megavids
  • lostlight
  • All magazines