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

Discussion in 'Python' started by PiedmontBiz, Jun 13, 2004.

  1. PiedmontBiz

    PiedmontBiz Guest

    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
     
    PiedmontBiz, Jun 13, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken North
    Replies:
    0
    Views:
    619
    Ken North
    Jul 14, 2005
  2. Eric Wichterich
    Replies:
    1
    Views:
    452
    Peter Otten
    Nov 1, 2003
  3. Michael P. Soulier

    oddness in shelve module

    Michael P. Soulier, Jun 22, 2005, in forum: Python
    Replies:
    2
    Views:
    356
    John Machin
    Jun 22, 2005
  4. softwindow
    Replies:
    4
    Views:
    279
    Jim Segrave
    May 26, 2006
  5. Replies:
    2
    Views:
    313
Loading...

Share This Page