Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added implementation details

...

The game pico is an owner pico named "OpenWest 2018" and manages the game. Participants in the game are assigned a pin which is a four digit number. When a pin is given out, it is provided as the last four digits of a 15 digit number. The other 11 digits are computed in such a way as to be unique for a given pin. This prevents guessing, and makes even a brute force search expensive. In its 15 digit form, the pin is called a "tag" because it is used to create a QR Code encoding a sign-up or registration event. A sign-up page, at a kiosk at our booth, presents to a potential participant a QR Code (containing the tag) which they can scan to join the contest. 

...

This ruleset shares a single function, named high_scores_page, which produces the leaderboard page (shown below after the first day of the contest). See this the complete ruleset on GitHub.

Owner picos

Each participant owns an owner pico, named by the owner pin. Each owner pico has a subscription to the collection pico, in which it plays the role of "member".

...

Implementation details

The high scores page is available from any of the URLs shown below. The first one serves an index.html page which uses an HTML <meta http-equiv="refresh" ...> tag to redirect to the second one which is more widely published. The second one, which the reader will note, uses port 80, is re-written by the Apache mod_rewrite module to the third one, so that a CGI script is executed. That script delegates to the fourth line which is re-written by the pico engine to the fifth and final one, which actually invokes the function defined in the ruleset:

Code Block
linenumberstrue
http://picolabs.io/openwest/topfive/
http://picos.byu.edu/openwest/topfive/
http://picos.byu.edu/cgi-bin/topfive.cgi
http://<game domain>:<game port>/OpenWest2018.collection.ui/high_scores_page.html
http://<game domain>:<game port>/sky/cloud/EsT2xDLSkr1RyWYYn2mPQx/OpenWest2018.collection.ui/high_scores_page.html

where the particular ECI shown is one belonging to the collection pico used during OpenWest. Note that the fourth URL is not a standard /sky/cloud URL. We are using a URL shortener (registered with the root pico of the game pico engine). What this allows us to do is, after deleting the game and collection picos, create them anew for a different instance of the game without having to modify the CGI script.

Owner picos

Each participant owns an owner pico, named by the owner pin. Each owner pico has a subscription to the collection pico, in which it plays the role of "member".

The owner pico is created by the root pico (when it reacts to an owner:creation event sent to it by the game pico). One of the event attributes is a list of rulesets to install in a newly created pico. The game pico asks for the "OpenWest2018.attendee" ruleset to be installed.

...

This pico runs on a different pico engine, running on a machine at our booth. It's job is to request an introduction tag id (the next valid 15 digit number), and create and display a QR Code for a tag:scanned event to the game pico. A  It has a ruleset "OpenWest2018.kiosk" paints which provides a decorative screen, which when touched links to the file kiosk.html. This HTML page uses AJAX to request (request an introduction tag id (which will be the next valid 15 digit number) from the game pico ) the next 15 digit number and embeds it in a URL like(via its keys ruleset), and creates and displays a QR Code for a tag:scanned event to the game pico. The URL encoded is:

Code Block
http://<game domain>:<game port>/qr/tag/scanned?id=<15 digit number>

Note that this is not a standard /sky/event URL. We are using a URL shortener (registered with the root pico of the game pico engine) so that the QR Code doesn't need to be as precise as it might have been. A side-effect of this is that the ECI used for the game pico is not made publicly available (to someone who might read the URL from the result of the device scanning the tag). The shortener internally redirects to:

Code Block
/sky/event/XEJJytM8MWCAYqKpi3wPTP/qr/tag/scanned?id=<15 digit number>

where the particular ECI shown here is one belonging to the game pico used during OpenWest.

Conclusions

Innovations

Owner picos, the very idea

...