low-end persistence strategies?
Paul Rubin
http
Fri Feb 18 05:30:08 EST 2005
Pierre Quentel <quentel.pierre at wanadoo.fr> writes:
> Even if the 12 requests occur in the same 5 minutes, the time needed
> for a read or write operation on a small base of any kind (flat file,
> dbm, shelve, etc) is so small that the probability of concurrence is
> very close to zero
I prefer "equal to zero" over "close to zero". Also, there are times
when the server is heavily loaded, and any file operation can take a
long time.
> If you still want to avoid it, you'll have to pay some price. The most
> simple and portable is a client/server mode, as suggested for
> KirbyBase for instance. Yes, you have to run the server 24 hours a
> day, but you're already running the web server 24/7 anyway
If I have to run a db server 24/7, that's not simple or portable.
There's lots of hosting environments where that's plain not permitted.
Using file locks is much simpler and more portable. The penalty is
that I can only handle one request at a time, but as mentioned, this
is for a low-usage app, so that serialization is ok.
More information about the Python-list
mailing list