queueing via database table?

Поиск
Список
Период
Сортировка
От Mark Harrison
Тема queueing via database table?
Дата
Msg-id 459B4E70.2050307@pixar.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: novnov
Дата:
Сообщение: Re: Installing support for python on windows
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: queueing via database table?