Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Vote tallying...

Reply
Thread Tools

Vote tallying...

 
 
Andrew Robinson
Guest
Posts: n/a
 
      01-17-2013
Hi,

I have a problem which may fit in a mysql database, but which I only
have python as an alternate tool to solve... so I'd like to hear some
opinions...

I'm building a experimental content management program on a standard
Linux Web server.
And I'm needing to keep track of archived votes and their voters -- for
years.

Periodically, a python program could be given a batch of new votes
removed from the database, and some associated comments, which are no
longer real-time necessary; and then a python script needs to take that
batch of votes, and apply them to an appropriate archive file. It's
important to note that it won't just be appending new votes, it will be
sorting through a list of 10's of thousands of votes, and changing a
*few* of them, and appending the rest.

XML may not be the ideal solution, but I am easily able to see how it
might work. I imagine a file like the following might be inefficient,
but capable of solving the problem:

<?xml version="1.0"?>
<data>

<identify>
<contentid>12345A3</contentid>
<authorid>FF734B5D</authorid>
<permissions>7FBED</permissions>
<chapter>The woodstock games</chapter>
</identify>

<comments>
<comment id="FF53524" date="2013.01.12">I think you're on
drugs, man.!</comment>
<comment id="unregistered" date="2013.01.12">It would have been
better if they didn't wake up in the morning.</comment>
</comments>

<votes>
<v id="FF3424">10</v>
<v id="F713A4">1</v>
<v id="12312234">3</v>
</votes>
</data>

The questions I have are, is using XML for vote recording going to be
slow compared to other stock solutions that Python may have to offer?
The voter ID's are unique, 32 bits long, and the votes are only from 1
to 10. (4 bits.). I'm free to use any import that comes with python
2.5. so if there's something better than XML, I'm interested.

And secondly, how likely is this to still work once the vote count
reaches 10 million?
Is an XML file with millions of entries something someone has already
tried succesfully?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vote for the October Scapegoat!!! bigal The Lounge 228 10-19-2005 09:11 AM
To U all who didn't vote for Bush! This message link is for U! Tron2004 MCSE 2 11-04-2004 01:44 PM
[OT] Vote for Me! JaR MCSE 52 09-10-2004 01:22 PM
OT: violence mars India vote Vigo Breadcrumbs MCSE 21 04-20-2004 10:58 PM
Vote this java2d bug -> 4916948 Michele Puccini Java 0 09-19-2003 12:49 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57