467,877 Members | 1,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

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

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
Jul 18 '05 #1
  • viewed: 882
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Buster McFadden | last post: by
4 posts views Thread by Terry Hancock | last post: by
1 post views Thread by josegomez | last post: by
3 posts views Thread by Michele Petrazzo | last post: by
6 posts views Thread by aomighty | last post: by
1 post views Thread by iwl | last post: by
13 posts views Thread by 7stud | last post: by
1 post views Thread by bluesmanu | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.