[Backgroundrb-devel] Application Design
adamsubscribe at googlemail.com
Thu May 14 05:19:44 EDT 2009
Im new to background processes in general and threads for that matter.
Ive been googling away like mad trying to find more info but I believe
a process is a slot for a program to run and for each process there
are threads available for concurrent processing. Am I right on that?
Anyway 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 a little confused as to how to the overall setup of workers to do
this? Do I create one worker only for the whole site which all my
users will share at a given time and there requests with be threaded
do I create a worker for each user as they request a search? Do
creations of a worker need to be destroyed when not in use?
If anyone could provide some tips that would be great. (i know what
code i need to put in the worker by for the scraping part - dont worry
im not asking you to code my app ;-) just the direction i should be
More information about the Backgroundrb-devel