Live data from Hacker News

How to build a search engine with Ruby on Rails

blog.testdouble.com

41–50 of 65 posts

Re: How to build a search engine with Ruby on Rails

#41
post #6

Earlier quoted context omitted.

How is it demised? Shopify, Stripe and many new YC startups use it.

Rails hasn't had any interesting updates since version 4, and arguably introduced a few regressions IMHO (I'm looking at you, active storage and action cable) Ruby hasn't evolved much either. Rails only scales so far and then scaling gets really challenging, obviously the named companies have figured it out, but its not easy. For example, rails due to the high coupling between models and the database, rspec test get…

You don't know what you are talking about. Every Rails release from 4 adds a ton of new stuff, bug fixes to the framework.

ActiveStorage is great addition - storing files on AWS now takes 30 minutes at most to setup. You don't need to use external gems for the same functionality now. Labeling it as a regression is nonsense as Rails before didn't have the functionality at all.

Ruby also evolved a ton since Rails 4. Just look at changelogs or something.

Scaling Rails is same as scaling any other stack. If your software grows it will run into bottlenecks no matter what you use. Rails is no harder to scale than anything else. It mostly is about people, not stacks anyways.

And i think mentioning ML points in a direction that you don't know much about normal web development since for 99% of web things you don't need any ML at all.

Re: How to build a search engine with Ruby on Rails

#42
post #20
post #2

This is a bit off topic but I wanted to say I’m really glad there are still people out there hacking on some ruby + Postgres projects and writing about it. I feel that ruby is an excellent language and dread the demise of it.

Some of the most interesting projects I stumble on as part of the public sector digitalisation in EU are made in Ruby on Rails (Southern Europe, especially Spain/Portugal), PHP (all of EU) and Python (Eastern Europe). Having recently switched most of our internal development from C# to Python and Powershell I get it. I can’t imagine not building small web apps in Python and I imagine PHP and RnR are exactly the same…

Parts of GOV.UK [1] and the Paris.fr website [2] are also good examples

[1] https://github.com/DFE-Digital?q=&type=&language=ruby&sort=

[2] https://www.paris.fr

Re: How to build a search engine with Ruby on Rails

#43
post #10
post #7

Earlier quoted context omitted.

I highly doubt that you will reach the scaling limits of rails unless you have a massive product and even if you do Python would not be a good replacement.

Depends on the product. The Rails architecture is fine for CRUD apps, and Heroku will happily take more and more money for more and more database capacity. As long as your ARPU is solid, you're fine scaling like that. But there are more things in the world than CRUD apps. I'm building tools to track hate on social media, and there's a lot of social media out there. Rails, or any RDBMS-centered architecture, won't cut…

If you are just trying to pull as many records from an api and run it through ML Python would make a good choice.

If you wanted a website to handle traffic rails or even php would be a better. Both have a more mature ecosystem and both allow for rapid development.

Re: How to build a search engine with Ruby on Rails

#44

Earlier quoted context omitted.

As someone who has recently started using Ruby for some personal projects - I agree. I like the simplicity of it and that I can do simple command line one liners with it.

Exactly, I only started maybe a month ago and incredibly simple to get into.

Ironically, I think that's part of the reason it became trendy to hate on Ruby and Rails: they make it really easy to do things, which means they also make it really easy to do ill-advised things. But that's not really the fault of the lanaguage or the framework - writing good and maintainable code is a skill you need to work at and develop over time, no matter what language you're using.

Re: How to build a search engine with Ruby on Rails

#45

Earlier quoted context omitted.

Exactly, I only started maybe a month ago and incredibly simple to get into.

Ironically, I think that's part of the reason it became trendy to hate on Ruby and Rails: they make it really easy to do things, which means they also make it really easy to do ill-advised things. But that's not really the fault of the lanaguage or the framework - writing good and maintainable code is a skill you need to work at and develop over time, no matter what language you're using.

Ruby is a beautiful language - Rails is opinionated (much like its creator). If the ways Rails is opinionated works well with your use-case, it's wonderful to use but if not, it's simply horrible.

I don't think RoR usage has declined (maybe as evidenced by the number of "I'm a newb" comments here?) but rather think it's become mainstream so it's simply missing the hype it had when it was the new hipster technology.

Re: How to build a search engine with Ruby on Rails

#46
post #23
post #6

Earlier quoted context omitted.

Rails hasn't had any interesting updates since version 4, and arguably introduced a few regressions IMHO (I'm looking at you, active storage and action cable) Ruby hasn't evolved much either. Rails only scales so far and then scaling gets really challenging, obviously the named companies have figured it out, but its not easy. For example, rails due to the high coupling between models and the database, rspec test get…

Rails doesn't scale? Github's the largest code repository site in the world. Stripe's one of the largest fintech sites in the world. Shopify is one of the largest ecommerce sites in the world. There's also Airbnb, TripAdvisor, many others that are huge. Also, you can write shitty, slow code in any language. You can make too many calls to the DB in any language. You can also scale to Google size in any language. Pytho…

Github does make it work, but you can see there's a tradeoff for that. Like in this blog post:

https://github.blog/2020-08-25-upgrading-github-to-ruby-2-7/

You see mentions of 70 second application boot times. Also interesting is the reference that a future upgrade to Ruby 3.x might increase performance by a factor of 3. That would mean they are leaving quite a lot on the table right now.

Basically, yes, they make it scale, but that's not free.

Re: How to build a search engine with Ruby on Rails

#48
post #11

Earlier quoted context omitted.

I think it's easy to say it's declining based on things like Red Monk's ranking, but with GitHub, Stripe and Shopify behind it, it's not going anywhere soon. And apparently Rails us is slowly increasing: https://arstechnica.com/gadgets/2021/09/php-maintains-an-eno...

Yeah, three companies worth an estimated $300B can keep any language alive. It’s fascinating to track the second wind of out-of-fashion languages, held aloft by a few mature companies that depend on it.

Facebook and PHP are kind an interesting twist on that. Facebook spent a lot of time and money on Hack/HHVM, then the PHP core devs responded with a new version of PHP that is, in many cases, faster. Though Hack/HHVM is still better for async work.

Re: How to build a search engine with Ruby on Rails

#49
Great post at the perfect time. I am currently wrestling with some gnarly, expensive queries in postgres and this gives me some great leads to try out.

Also, I appreciate the Rails love.

I know this is not a Who Is Hiring post, but if you are into Rails/Postgres and in the market (between UTC-4 and UTC-8 timezones), feel free to send me a note: gabe at instrumentl.com. We are doing some "biggish" data work helping nonprofits find grants and other fundraising opportunities.

Re: How to build a search engine with Ruby on Rails

#50
post #10

Earlier quoted context omitted.

Depends on the product. The Rails architecture is fine for CRUD apps, and Heroku will happily take more and more money for more and more database capacity. As long as your ARPU is solid, you're fine scaling like that. But there are more things in the world than CRUD apps. I'm building tools to track hate on social media, and there's a lot of social media out there. Rails, or any RDBMS-centered architecture, won't cut…

You still have the GIL in python to overcome.

Ruby (MRI) also has a GIL
Post reply on HN