[concurrency-interest] Hello, Stability of the Backport, Database-backed Queue?

Steven J. Owens puff@darksleep.com
Mon, 6 Dec 2004 05:00:39 -0500


Hi guys,

     I have a couple of questions.  I need to add a job queue and
worker thread pool to my application.  

     Any opinions on the stability/reliability of the backport?  We're
still on jdk 1.4x and will be for a fair bit longer.  I was going to
go with concurrent.util and upgrade to 1.5 concurrency later, but then
I heard about the backport.  

     Is there any sort of known/accepted database-backed queue?  My
current plan of attack is to basically grab a couple hundred rows out
of a database table and dump them into the queue.  Each worker would
then do the processing, and when complete mark each row as done.  But
it feels like I should have the queue be backed by the table, instead
of dumping them into the table.

     For background, my application needs to make 300-500 HTTP
requests to an external system.  Each request has to stay open for
20-60 seconds, and the whole set of requests has to be done inside a 2
hour time window (which is doable now, but as the number grows...).
Right now it all happens in one thread kicked off from a browser
click.  I want to make it multithreaded to fit inside the necessary
time window.  I also want to make it more automated, durable and
schedulable by using a database table with one row per scheduled
request.

-- 
Steven J. Owens
puff@darksleep.com

"I'm going to make broad, sweeping generalizations and strong,
 declarative statements, because otherwise I'll be here all night and
 this document will be four times longer and much less fun to read.
 Take it all with a grain of salt." - http://darksleep.com/notablog