"Allen Fowler" <[email protected]> wrote
I have several CGI scripts that I would like coordinate via a "First In / First Out" style buffer. That is, some processes are adding work units, and some take the oldest and start work on them.

What is the right way to do this? I suppose I could use an SQL server or SQlite , but that seems very complex for just a FIFO.

Given how easy it is to use something like SqlLite from Python I don't think its an unreasonable approach and it avoids or eases some of the hidden complexities around using simple files (such as locking issues).

But a lot will depend on transaction volumes etc. If you never, or rarely, have concurrent accesses then using a text file might work. Or you could do it all in memory via a long running process and a queue. But if volumes are (or could become) high or bursty I'd go for the SQL route.


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to