Hi im making a simple app which takes a users search term and scrapes
several sites rss feeds for relevant results. The scrape can take upto
10seconds. I want to make this a background process so I can update the
user with the scrapes status(“currently scraping site x”) and present
results as they are scraped.
Im looking at backgroundrb and have read a guide in Advanced Rails
Recipe however thats for an older version of backgroundrb and the api
has changed. So im a little confused - im also new to processes and
threads.
If my worker is responsible for scraping each site and providing updates
do I have one worker which will be used by all the users currently
online? I guess I then can use threads to process multiple search
requests at times when the site is busy.
OR
do i create a new worker for each user? Would this also allow for
concurrent processing?