using shelve module to create web databases....problems?

P

PiedmontBiz

I am finishing up a simple survey for a web site.
I am creating a server-side data base using the shelve module.
I am a relative python newcomer.
I began with anydbm, but found that shelve uses anydbm and pickle so it is a
bit easier for me to do what I want.

The database I am testing list 4 candidates for president.
A web form ( I use javascript to validate the data before sending it on ) posts
the users survey data to a server-side python program which simply entesr the
data into the database.
The user can then go to another page to see the cumulative results of the
survey. This is generated by another python cgi program.
This all works fine on my home system with Apache and Python 2.3(Win 2k)

Question.
Do I need to worry about contention for the single database file if more than
one user is trying to post his/her vote?
If so, should I write a routine which randomly waits a while then retries the
write?
How do I write the exceptions to control this?

Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top