Re: [GENERAL] queueing via database table?

2007-01-03 Thread Vivek Khera
On Jan 3, 2007, at 2:00 AM, Steve Atkins wrote: Holding a lock while generating the thumbnail doesn't sound like a great idea, and I think that the select for update will end up serialising the requests. I'd add a "rendering" field, text, defaulting to an empty string. Then do a "select for u

Re: [GENERAL] queueing via database table?

2007-01-03 Thread Scott Marlowe
On Tue, 2007-01-02 at 22:34 -0800, Mark Harrison wrote: > 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 d

Re: [GENERAL] queueing via database table?

2007-01-03 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/03/07 00:34, Mark Harrison wrote: > 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

Re: [GENERAL] queueing via database table?

2007-01-03 Thread Gregory S. Williamson
ozen jobs. HTH, Greg Williamson DBA GlobeXplorer LLC -Original Message- From: [EMAIL PROTECTED] on behalf of Mark Harrison Sent: Tue 1/2/2007 10:34 PM To: pgsql-general@postgresql.org Cc: Subject: [GENERAL] queueing via database table? I have a cluster of CPUs generating t

Re: [GENERAL] queueing via database table?

2007-01-03 Thread Dawid Kuroczko
On 1/3/07, Mark Harrison <[EMAIL PROTECTED]> wrote: 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 wi

Re: [GENERAL] queueing via database table?

2007-01-03 Thread Richard Huxton
Steve Atkins wrote: Holding a lock while generating the thumbnail doesn't sound like a great idea, and I think that the select for update will end up serialising the requests. I'd add a "rendering" field, text, defaulting to an empty string. Then do a "select for update where ... and rendering

Re: [GENERAL] queueing via database table?

2007-01-02 Thread Steve Atkins
On Jan 2, 2007, at 10:34 PM, Mark Harrison wrote: 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..

[GENERAL] queueing via database table?

2007-01-02 Thread Mark Harrison
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 sh