Ask A Question

Notifications

You’re not receiving notifications from this thread.

How would I go about building a price-comparison engine with Rails

karatepicke asked in Rails

Hey guys,

I just started a project (based off of Jumpstart Pro). One of its core features should be a price comparison: I'd like the app to fetch prices across different websites/webshops several times a day and display those prices in an aggregated way on the respective product's show page.

How would you go about designing this? At my current stage I lack the experience to make this design choice all by myself - I definitely want to find the optimal solution, right from the start.

Aspects I am interested in hearing your opinions about are:

  • DB design: new model for scraped prices with an association to the product itself? Or just store an array of prices on the product? Etc.
  • Worker for the price scraping? (Unfortunately I cannot rely on the existence of APIs to simply request prices from)
    • this is totally new to me. What worker should I use?
    • it should be fairly to maintain and debug
    • optimally, it should be scalable and easy on computing resources
  • Error handling:
    • how to handle (temporarily) inaccessible websites
    • how to maintain a "low profile" and prevent being blocked from fetching a website's information

Thanks in advance for any insight on this!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.