Jump to content

Voting Storage


jason257

Recommended Posts

Hi there, i was in midst of starting new site and in that i wanted to put voting feature , something like http://Digg. So i was wondering that how does digg stores information about which user voted to which link and then not allowing them to vote again.

 

One option could be to create a vote table then store link-id and member-id in this table. Now when any user tries to vote again this table is checked for entry and then accordingly user is allowed or not.

 

But this method's major flaw(according to me) is that it would be pretty large table e.g if there are 1k articles and each has approx 10 votes. Then there would be 1k*10=10k, and seeing size of digg where there is around 250k links in 24hrs and based on 10 votes theory there would be 2,500,000 entries added each day.

Link to comment
Share on other sites

I'm not sure how they do that... the Digg team would have to explain that themselves.

 

You may want to look at one of the many digg clones (http://mashable.com/2008/03/28/create-digg-clone/) and take a look at the source code and see how one of the clones handle it. I don't know that they will do things the same way that Digg does, but it may give you some ideas.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...