I'm looking at implementing a live voting system on my website. The website provides a live stream, and I'd like to be able to prompt viewers to select an answer during a vote initiated by the caster. I can understand how to store the data in a mySQL database, and how to process the answers. However:
How would I initially start the vote on the client-side and display it? Should a script be running every few seconds on the page, checking another page to see if a question is available for the user?
Are there any existing examples of a real-time polling system such as what I'm looking at implementing?
mysql - Database design for voting module with long-run and high-load capability - Database Administrators Stack Exchange.
The regular methods of voting in such bodies are a voice vote, a rising vote, and a show of hands. Additional forms of voting include a recorded vote and balloting. The assembly could decide on the voting method by adopting a motion on it. Different legislatures may have their voting methods.
1. Automated election system — a system using appropriate technology for voting and electronic devices to count votes and canvass/consolidate results; 2. Counting machine — a machine that uses an optical scanning/mark—sense reading device or any similar advanced technology to count ballots; 3.
Benefits. Electronic voting technology intends to speed the counting of ballots, reduce the cost of paying staff to count votes manually and can provide improved accessibility for disabled voters. Also in the long term, expenses are expected to decrease. Results can be reported and published faster.
You would have to query the server for a new question every few seconds.
The alternative is to hold the connection open until the server sends more data or it times out, which just reduces (but does not eliminate) the server hits. I think it is called "long polling". http://en.wikipedia.org/wiki/Push_technology
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With