queueing via database table? - Mailing list pgsql-general

From Mark Harrison
Subject queueing via database table?
Date
Msg-id 459B4E70.2050307@pixar.com
Whole thread Raw
Responses Re: queueing via database table?  (Steve Atkins <steve@blighty.com>)
Re: queueing via database table?  ("Dawid Kuroczko" <qnex42@gmail.com>)
Re: queueing via database table?  (Ron Johnson <ron.l.johnson@cox.net>)
Re: queueing via database table?  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
I have a cluster of CPUs generating thumbnails for
a render farm.  I would like to place thumbnail
requests on a queue, and have the cluster of client
dequeue the requests and process them.

Of course, each request should be only dequeued once...
if a thumbnail is being processed by one CPU, it
shouldn't be processed by another CPU.

Does the following sound like a reasonable approach?
If not, what's a good way to go?

The processes generating the requests will insert into
a queue table.  They may add a priority and timestamp.

The several processes servicing the requests will do a
SELECT FOR UPDATE where ... limit 1, generate thumbnail,
delete the record and commit.

Comments and suggestions welcome,
Mark

--
Mark Harrison
Pixar Animation Studios

pgsql-general by date:

Previous
From: novnov
Date:
Subject: Re: Installing support for python on windows
Next
From: Steve Atkins
Date:
Subject: Re: queueing via database table?