Service allows to create/update a player's score in a given category (metric). Service allows to retrieve a list of top x/all scores for a given category and/or player.
Relative URL of the serivce is '/rankings/'. For API description, please see the docstrings in rankings/views.py
- How would you test this?
Tests are in ./tests folder. See below how to run them.
- What would you do if you were told this needs to handle 1 million players?
- Integrate a proven REST framework (i.e. Django REST / Tastypie) to get caching, authentication, pagination, ...
- Run the service on a number of Apache instances behind a load balancer
- Use a (possibly NoSQL) distributed database that allows masterless replication (Cassandra).
- Monitor the load
- Alternatively, I'd consider Erlang-based stack with CouchDB and Yaws :)
1. Create and/or activate virtualenv
. activate_venv
./install_dependencies
./manage.py syncdb --noinput
./run_server
./analyze
./run_tests [ unit | integration | system ]