18 ms·
Why We’re Sticking with Ruby on Rails at Gitlab
- culi 4y agoAs a newer developer, what exactly is the bigger picture of available frameworks? - Python/Django - Ruby/Rails - Elixir/Phoenix - Node/Express - PHP/Laravel - Java/Spring? - C#/ASP.NET - Go/Gin - Rust/Rocket Am I missing anything big?
- psychoslave 4y agoSo the mandatory question is, what can fill the empty box of the messy hard to use language/framework? Maybe Brainfuck on Rails[1]? [1] https://github.com/cookjj/Brainfuck-on-Rails https://github.com/cookjj/Brainfuck-on-Rails
- vlunkr 4y agoThey don't really bother to say what their "modular monolith" looks like, besides being "well-structured, well-architected", and tautologically, "highly modular."
- hbien 4y agoThe author linked to this article to explain it: https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4 https://medium.com/@dan_manges/the-modular-monolith-rails-ar... ---- From the article: We don’t have an app/ directory in our Rails project. All of our code is either in gems/ or engines/. Gems contain Ruby code that does not depend on Rails. We use ActiveSupport, but we do not use ActiveRecord or ActionPack. The gems are all stateless. Engines contain Ruby code that does depend on Rails. Persistence happens at this layer through ActiveRecord. API and Web interfaces are exposed at this layer through ActionPack.
- andrew_ 4y agoTrading one form of complexity for another.
- rgbrgb 4y agoIs it a good trade? To me it seems like maintaining a gem/library is less complex than maintaining a service that exposes the functionality of said gem. No networking, deployment configuration, request handling, parsing, host monitoring, logging, access control, etc to deal with. Which do you think is more complex?
- vlunkr 4y agoRight, but then they say "Although structuring GitLab as a monolith has been extremely beneficial for us, we are not dogmatic about that structure." And looking at their source code, they aren't following that very strictly.
- brink 4y agoAnyone find it suspicious how many companies put so much effort into justifying how Rails is still a good tech for a mature company? I think the truth is really something like - we prototyped the app in Rails, because that's what Rails is good at, now we've evolved into a huge and slow application with no type validation, but porting the application and switching the team to something better and faster would be a nightmare, so we're just going to write an article about feeling good about where we're at.
- develop7 4y agoI mean, you have to justify being stuck somehow. While GitLab is certainly not an average Rails project technical debt-wise (I'm a tiny-time contributor to GitLab and my experience was quite amazing), but it's still Rails & Ruby all the way down there which could get you going only so much. You still have to write shitloads of tests, most of which are doing a sum-types-able programming language compiler's job over and over again. One day you realize this and that's the day Ruby is dead for you because there's no chance in hell you can persuade your peers to use measly dry-rb (dry-rb maintainers — no offense, I'm admiring your stellar work), not to mention moving to F#/Ocaml/Haskell/Rust.
- malfist 4y agoAlso problematic is that gitlab really really cares what programming languages you've worked in before. I've applied and they've turned me down because I didn't have enough Ruby experience, nevermind that I have plenty of years of experience in development and learning another language isn't that big of a deal. Ruby has had it's heyday. It's 15 minutes of fame was a decade ago. If they persist in using Ruby and only hiring people with extensive Ruby experience, they're going to run out of talent AND have to pay over market rate to get people in their specialization. Like all the banks and governments forking over loads of cash for COBOL and Coldfusion consultants because the refused to modernize.
- capableweb 4y ago> Also problematic is that gitlab really really cares what programming languages you've worked in before. I've applied and they've turned me down because I didn't have enough Ruby experience, nevermind that I have plenty of years of experience in development and learning another language isn't that big of a deal. Yeah, I've come across this in loads of companies too. In the end, I think those sort of companies don't understand that once you grok 2-3 languages, the rest of them mostly look/work the same (except the really different ones), and they are just looking for "code-monkeys" to program with them for a year or two.
- andrew_ 4y ago> You need a fairly sophisticated DevOps organization to successfully run microservices Yawn. Stopped reading when I reached this. One can make the case for their choices without parroting the same old tired arguments against alternative choices. Shallow comparisons between Java to PHP to Ruby is lazy, and very 2010. If I were in the CEO's circle, I wouldn't have recommended this be published. Bad look for Gitlab.
- dgb23 4y agoFrom the quoted Wikipedia article (https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing https://en.wikipedia.org/wiki/Fallacies_of_distributed_compu...): Fallacies of distributed computing: - The network is reliable; - Latency is zero; - Bandwidth is infinite; - The network is secure; - Topology doesn't change; - There is one administrator; - Transport cost is zero; - The network is homogeneous.
- andrew_ 4y agoThese have been footguns of web development since the 90s.
- ajsharp 4y ago> Organizing your local software systems using separate processes, microservices that are combined using a REST architectural style, does help enforce module boundaries via the operating system but at significant costs. It is a very heavy-handed approach for achieving modularity. One of the most effective and succinct criticisms I've seen of microservices: an architecture hack for modularity. The irony is, it's rarely an effective hack. If you don't get your service boundaries right, modularity goes out the window, and you're stuck with a bunch of network calls that should be function calls.
- andrew_ 4y agoAgreed. The kicker is knowing what those boundaries are and avoiding them. I really enjoy working with microservices for async tasks, and I think they're really well-suited to them. I really dislike inter-service dependencies. And of course, there's nothing wrong with a few, small monolith services. It's all about the right tool for the right job for me, and being too prescriptive to a particular architecture comes at a high cost.
- ravenstine 4y agoA better first approach would be to try and remove roadblock and bureaucracy that are encouraging developers to actually consider microservices. Those are of course not the only the only arguments for microservices, but I do think they're a big one that more often goes unsaid than the modularity. You can have modularity in a monolithic app, but for some reason many teams don't actually take modularity seriously; they ask that everything be object-oriented and call it a day, as if writing a `module` in Ruby means you've made things modular. Microservices become appealing when the process to have monolithic code reviewed and deployed is long and painful, since they are by definition small, decoupled, and simple to deploy. Of course it often doesn't quite work out that way, in which case a monolith would have worked anyway. But it's unlikely things will change in coding culture so long as there's the perverse incentive for businesses to encourage their engineers to use hacks out of expediency. Hacks inevitably make things really hard down the road, create mysterious problems that are hard to solve, and the solution is often to add bureaucracy or switch to microservice architecture.
- zzzeek 4y agoWell since the only choices that exist are Java, PHP or Ruby, you made the right choice!
- FpUser 4y ago>"Well since the only choices that exist are Java, PHP or Ruby" Nope
- Arubis 4y agoParent comment is phrased this way because TFA only presented and evaluated those options.
- ElectricalUnion 4y ago> Java, PHP or Ruby Funny, since for a long while, the "correct" way to run Ruby workloads in production was to run JRuby, therefore Java.
- ARandomerDude 4y agoNot really. 1. Java != JVM 2. If JRuby is basically just Java, then keep going. Everything becomes binary at some point, therefore Python/JS/Ruby/etc are just binary.
- TheRealDunkirk 4y agoI've been using Rails for 15 years, and probably written or supported 20 apps with it. In all the reading I've done on it, and all the work I've done with it, I've never used JRuby, nor seen it implied that this was the "correct" way to run an app in production. As an appeal to authority, Heroku's default is MRI.
- systems_glitch 4y agoWorked on a big project like that once. The day we put JRuby out to pasture was a great day indeed.
- wlll 4y ago
- stonogo 4y agoAside from the idea of charting random developers' gut instincts regarding entire programming languages, the only contribution this article makes to the literature is the dubious phrase "scalability of innovation." I would have appreciated some honesty regarding why they're really sticking with Rails at Gitlab: a decade worth of development that would have to be rewritten from scratch to little discernable benefit.
- mooreds 4y ago> I would have appreciated some honesty regarding why they're really sticking with Rails at Gitlab: a decade worth of development that would have to be rewritten from scratch to little discernable benefit. This is an underappreciated value of sticking with a current solution. You know the warts. You know the issues. You have significant sunk costs. The value of moving to a new solution has to be really really high, because there are always surprises when doing so (business logic that you didn't account for, edge cases that only occur once in a blue moon).
- mdasen 4y agoI don't use Rails anymore, but I did use Rails from pre-1.0 through version 3 (and played with later versions a tad). The best thing about Rails is that it delivers a complete package. Rails doesn't come along and say "Oh, you need to use JS packages and minify your CSS and compile your SASS/SCSS? That's an exercise left to the reader. Good luck dealing with npm or yarn, choosing between Bower/Gulp/Grunt/Webpack/Browserify, good luck figuring out how to integrate Node into your build process, good luck figuring out how to add caching, good luck with async background task runners, good luck sending email, good luck with validation, good luck with testing, good luck with all the things beyond the core competency." That's one of the things that made Rails so powerful and continues to make it great. They offered good practices for so much of what you need. I don't want to say best practices because I think sometimes Rails has faltered, but at least there was a reasonable path and because it was "in" the framework, people in the community would talk about it - and talk about how it could be better. I think Rails also pushed the industry toward more structured organization of code (rather than just creating a mess), toward better testing, MVC and other patterns, etc. I hate picking on projects that I think are mostly good, but to illustrate some things it helps. Ninja Framework (Java) has a section "Advanced Topics" which includes things like "working with relational databases" and "validation" and "testing". Frankly, those aren't add-ons or advanced topics. In fact, Rails really pushed testing. It's been a while (so correct me if I'm wrong), but all their generators built testing stubs. Sure, you'd have to fill out the tests, but it gave you a place for the tests, a way of running them, and generating the file gave you that little push of "oh, this isn't hard" (which is especially important for newer programmers). I think Django and ASP.NET are wonderful, but neither really offers a great answer for handling the JS/TypeScript/SCSS/SASS/minification stuff that you really want for a modern web app. ASP.NET points you to LigerShark's WebOptimizer which is good. There are add-ons for Django. But it means that you're left looking around the internet for what is the "right" path which can simply waste time and put people into analysis paralysis. Likewise, there are add-ons for background tasks. ASP.NET has the incredibly popular Hangfire. Django has add-ons as well. These aren't impossible things to overcome, but Rails holds your hand a bit. Many frameworks don't deal with things like "how do I deal with the fact that I want to test my stuff against a database" and set that up nicely for you. Instead, it's an exercise left up to the reader. If you're at a giant company where you have a platform team who can handle all these things, you don't need Rails. You have your own teams making this stuff good for you. If you're a start-up with a few engineers, do you want to spend your time figuring out how to compile assets, how to wire up MySQL to your tests, how to run background async tasks, etc. That said, I do think Rails went in certain directions that have limited it. Static typing has become the way most people want to program. People are less interested in "magical" ways of typing less code and more interested in understanding how code is working. Other languages have become a lot better with lambdas, local type inference, less ceremony, etc. and we've seen new languages like Kotlin and Go. Other languages are substantially faster. Ultimately, a lot of frameworks learned a ton from Rails and copied a lot of the best bits. I still think Rails has a broader vision than basically anyone else and I think it's a bit of a pity that no one else seems to want to have that vision (and please point me to projects you think have that broad vision if you know of them). Rails really changed web software. Even if you want to use something else, Rails has likely had a huge impact on how you're developing web software (even if you don't know it). I'm grateful for what Rails taught me and how it impacted the industry even though it's been a long time since I've used it.
- ksec 4y agoI hope Gitlab could afford to offer some resources towards the Ruby and Rails ecosystem.
- mdaniel 4y agoI dunno how this eluded the dupecheck, but it's been submitted several times: https://news.ycombinator.com/item?id=31684529 https://news.ycombinator.com/item?id=31684529 https://news.ycombinator.com/item?id=31693971 https://news.ycombinator.com/item?id=31693971
- Rhedox 4y agoJava is hard to use? Seriously?
- mschuster91 4y agoTomcat is an archaic goddamn mess with so many pitfalls and difficulties to get it actually performant on a production system it isn't even funny to make memes out of it. Not to mention the crap tooling choices (ant vs gradle vs maven), the tendency of Java applications to eventually bloat in RAM consumption over time due to memory leaks or the fact that Java unlike PHP doesn't punish a developer for wasteful development. With Java apps, startup times of minutes are the norm, the worst thing I ever saw written in it was an "enterprise" CMS (!) that, while definitely more capable than Drupal or Wordpress, takes a 32GB RAM machine to develop on, wants a 64GB or more machine as hosting and takes half a goddamn hour to boot.
- ElectricalUnion 4y agoIt's so hard to get it configured right that instead of deploying your app to Tomcat, you embed Tomcat in your app and letting the framework deal with the configuration, like in Spring Boot. Of course it means you end up with several dozen/hundred/thousand copies of Tomcat...
- mschuster91 4y agoThat's even worse for optimization since now you have to deal with whatever your framework does to get Tomcat up to speed and how to set a configuration option for Tomcat in a way that eventually ends up at the correct place.
- geodel 4y agoAnd now I have to deal with this supremely crappy Spring Boot which would convert compile time Java errors to runtime exceptions. Turn already verbose 100 lines stack trace from Java into 5000 lines of Spring infested stack trace. I guess I just couldn't praise enough this Spring Boot.
- bravogamma 4y agoI like to refer to computing history as much as the next person, but the references in this post [0][1][2] came across as rather weak and mostly anachronistic. Computer hardware, networking, and server software has evolved by leaps and bounds over the last 5-10 years, let alone 50! [0] https://prl.ccs.neu.edu/img/p-tr-1971.pdf https://prl.ccs.neu.edu/img/p-tr-1971.pdf (1971) [1] https://en.wikipedia.org/wiki/The_Mythical_Man-Month https://en.wikipedia.org/wiki/The_Mythical_Man-Month (1975) [2] https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing https://en.wikipedia.org/wiki/Fallacies_of_distributed_compu... (1997?)
- Arubis 4y agoNobody needs to justify not replatforming, regardless of the involved tech. It's just a sane default. It's when an org _does_ decide that rebuilding their existing property on a different stack that justification is in order.
- dijit 4y ago> Nobody needs to justify not replatforming Maybe, but when your software is the piggiest of pig software then it should be called into question. Unrelated to Gitlab, but to give an example of what I mean: How many installations of Slack are there in the world, or Teams. even with an extremely conservative estimate of 10 million; 10mb of ram and 5% of a CPU core has a measurable impact on the planet. With such a wide distribution it's worth calling at performance of the platform, even if it's nice that Teams at least supports Linux...
- Arubis 4y agoOh, yeah. I'm not prescriptive about never replatforming. You just shouldn't do it without a very compelling reason and a lot of consideration. If you've got a dozen microservices written in a mix of ColdFusion, Salesforce, something Microsofty, and some other enterprise slow-and-expensive platform running on leased bare metal with a bunch of third-party licensed support software and you're burning tens of millions a year on that, and you can get a team to rewrite the thing on another stack--virtually _any_ other stack, so long as you go from a dozen vendors to fewer--you can probably justify allocating your entire engineering budget for a year or two just to stop the bleeding. Twitter built their stack on Rails, ran into performance issues that they couldn't mitigate, and replatformed. That seems to have worked out for them. Neither of those are most of us. Sustainable computing, as you're alluding to, is a whole other discussion. It's one worth having, but I hope there's other solutions out there than "write software the 10x slower and harder way", because otherwise anyone who tries it will be beaten by a less principled competitor.
- deleted 4y ago[deleted]
- ifaxmycodetok8s 4y agoruby can be just as "messy" as php. what a strange take.
- goldcountry 4y agoAs someone who has always viewed the winds of web development trends with significant skepticism, this article is one of the best I've read at explaining why no, you don't need <x language/y architecture/z framework>. The technologies that powered the web ten years ago still work just fine. Even the ones that powered the web 20 years ago often still have their place. Keeping your stack boring is frequently the best decision for everyone, save for the career climber who wants to put the latest trends on their CV for the next job.
- klysm 4y ago> The technologies that powered the web ten years ago still work just fine. Yeah maybe for some use cases. Rails has a lot of bandaids to deal with the new stuff and GitLab uses that stuff.
- CameronNemo 4y agoDuplicate post from 3 days ago https://news.ycombinator.com/item?id=31684529 https://news.ycombinator.com/item?id=31684529
- wdb 4y agoWhatever works for them to make the pages load faster. It's really slow lately
- denysvitali 4y agoWhy not Crystal?
- pmarreck 4y agoElixir/Phoenix would be a much better fit but it’s your loss to bear if you really do like a big ball of monkeypatched mutable spaghetticode
- safaci2000 4y agoThis blog articles feels too black or white. There's a middle ground between microservices and de-coupling. The UI can be written in JS/TS with a backend written in a more scalable faster language. It doesn't need to be all or nothing? Even if you stick to Ruby pulling some things apart due to separate concern/responsibilities is not a bad approach. Aka if you have workers/cleanup operations they don't need to live in the same code as your REST/MVC code base. Also, it would be nice if their CI/CD could be defined in multiple .yml instead of one giant file that I seem to end up in most projects.
- jmholla 4y ago> Also, it would be nice if their CI/CD could be defined in multiple .yml instead of one giant file that I seem to end up in most projects. It can. You can use `include` to include templates and job definitions from other files. Also, with child pipelines (i.e. trigger jobs), you can run a pipeline defined in a separate YAML file.
- safaci2000 4y agosure, I've touched on include a bit and removes some of the repetitive code. I would rather have something like: release.yml documentation.yml security-scan.yml I know you can define all these in a common repo and then have a few lines to include them but it's not exactly the same IMO. Not to mention that now I need to pull another repo to see what is going on and why the task no longer works.
- deleted 4y ago[deleted]
- PointyFluff 4y ago"Because we can't write in rust"...I am assuming...I don't care.
- xdennis 4y agoSorry to be so off topic, but the bloody hands image is hilariously morbid.
- andrewstuart 4y agoIf you care abut hiring and recruiting then you would kill your Ruby On Rails projects. In fact, as far as recruiting goes, you really need to switch all your projects to either TypeScript, C# or Python. Everything else, Java, PHP etc etc is on the decline. POSSIBlY on the way up is Golang, but again don't use this is hiring is a primary concern. BUT Ruby On Rails has to be one of the worst to recruit for unless you're using Fortran or COBOL.
- unicornmama 4y agoI treat engineering opinions from Gitlab with the same serious consideration as financial planning advice from a 6 year old.
- mountainriver 4y agoGitlab is one of the buggiest most unreliable applications I’ve used. Not sure how much of that has to do with Ruby but this isn’t a good endorsement
- AtNightWeCode 4y agoAs the saying goes in my country, don’t practice javelin in a green house. The coupling between GIT with the surrounding services and software architecture is just a big joke. Microservices is a terrible match with GIT. Get rid of GIT instead.
- fleddr 4y agoIn my experience, microservices are incompatible with the universe. All things are connected, sometimes in unforeseen ways. Almost inevitably, some app or front-end is going to need a joined result from multiple services. If these services are "best practice" independent, they likely have their own data store.You can now bolt on some new architectural layer on top, thereby introducing a new point of failure. Or, you can let the front-end do sequential calls and do the join. This is how you go from a traditional query in a single data store with a response time of 50ms to the modern equivalent taking multiple seconds. Not just due to the join, also due to the network, auth calls, and other overhead. But hey, at least the microservice teams can operate and deploy independently. Which is a problem instead of a feature. Services require constant (unforeseen) changes from upstream demand whom now have to negotiate/wait for this "independent" team to be able to deliver. Everything becomes slower and more difficult: planning, implementing, testing, debugging. I'm not an absolutionist, I believe there are use cases for micro services but my main point is that reality is not as modular as you arbitrarily have modeled it.