in reply to "Session Tracking" Voting Booth CGI

Session id's. Nice and simple, and will scale if your back end is tuned.

  1. Create a voting schema, normalise and index it nicely, so you can store multiple polls.
  2. Track users via session id's
  3. Associate session id's to users
  4. Add a row to the voting tables for each poll for each user
  5. Each time the user click "vote" check to see if they have voted already.

Of course this will only work if you work with registered users. As mentioned you'll need lots of testing with load and performance.

HTH!

  • Comment on Re: "Session Tracking" Voting Booth CGI

Replies are listed 'Best First'.
Re: "Session Tracking" Voting Booth CGI
by hacker (Priest) on Jun 03, 2002 at 13:41 UTC
    Good ideas, Ryszard, but unfortunately I don't have registered users (yet). There is a new site, my.plkr.org which will incorporate similar functionality, but putting the voting booth option on that site just "doesn't fit" with the rest of the purpose.

    Is there a way to do this without requiring registered IDs of users? Perhaps a hybrid, serializing a hash of the incoming IP/hostname and store that in the DB?

      I dont really think there is a method of doing this accurately without identifying the user explicitly.

      I would depend on your market as to wich method you would use. For example, if your market is highly technical then perhaps cookies would be a bad idea as the techies may turn them off. OTOH if you market is maily dialup, you may get lots of incorrect stats based on that. (I havent even mentioned proxies and invisible proxies)

      I guess it depends on your market and which on is the lesser of twee evils for you.

      As merlyn mentions you could generate a gif and have the user type that in along with their vote. You may get a smaller number of votes, (as its a pita to enter) but better quality - it also doesnt prevent double voting.