Technical Stuff

Michael Allan mike at zelea.com
Sun Aug 22 19:07:40 EDT 2010


David Bovill wrote:
> 1. Descriptions of the Restful API's that I can use for interfaces /
>    prototypes / mobile apps

I wish we had an architectural overview.  You'll be a little lost
without it.  I'll describe the pollserver and pollwiki APIs for now,
just to get you started.

Pollserver
----------
These are currently flat file, for the most part (I'll explain why
later).  Here's an overview of the pollserver data:
http://u.zelea.com/system/host/u/home/v/votorola/out/vocount/

The latest local votes are here:
http://u.zelea.com/system/host/u/home/v/votorola/out/vocount/_snap_report/_in_vote/

The latest external votes (mirrored from other pollservers) are here:
http://u.zelea.com/system/host/u/home/v/votorola/in/vomir/

The compiled count (tree structure etc.) isn't properly exposed.  It
would have to be scraped from this user interface:
http://u.zelea.com:8080/v/w/Votespace?p=G!p!sandbox
But once we have an idea of the client requirements, we can look at
adding a proper API for this.

Pollwiki (also streetwiki, which doesn't exist yet)
--------
MediaWiki provides 3 basic interfaces (see top of page):
http://www.mediawiki.org/wiki/API

In addition, you have Semantic MediaWiki's interfaces:
http://semantic-mediawiki.org/wiki/Help:Semantic_search
http://semantic-mediawiki.org/wiki/Help:RDF_export

The first is the richest.  It's essentially a query interface for all
of the formalized data in the wiki.  Take this page for example.  It's
an electoral district: http://u.zelea.com/w/Tor/riding/Trinity-Spadina

Here's all the polls, registrants, etc. in that district:
http://u.zelea.com/w/Special:Ask?title=Special%3AAsk&q=[[Division%3A%3ATor%2Friding%2FTrinity-Spadina]]

You can get them in various data formats, too.  Here's JSON:
http://u.zelea.com/w/Special:Ask?title=Special%3AAsk&q=[[Division%3A%3ATor%2Friding%2FTrinity-Spadina]]&p=format%3Djson

> 2. Database schema

Database schemas are extremely simple (no secondary keys or joins).
Here's the raw votes (see "CREATE TABLE"):
http://zelea.com/project/votorola/a/poll/InputTable.java

Counted results (the tree):
http://zelea.com/project/votorola/a/poll/CountTable.java

The most complicated thing is the naming of count tables.  We can
mount multiple counts simultaneously, and remount old ones from the
archive.  Each unique mount creates a separate table in the DB.
There's a namespacing scheme to prevent collisions.  See:
http://zelea.com/project/votorola/s/manual.xht#line-vocount

> 3. Installation instructions + minimal requirements for installing
>    on a public web server

http://zelea.com/project/votorola/s/manual.xht#site-setup
It may need updating.  When you're ready to install (and we have a
better idea of which parts you'll actually need) I can do an update.

Please let me know if you need more info,
-- 
Michael Allan

Toronto, +1 647-436-4521
http://zelea.com/



More information about the Votorola mailing list