Divij/client message flow

Wiring up application registration with client "init_interview" message.

For the time being we are hardcoding registered applications see line 52, 53 on interview.py. Registration via selection screen to follow.

PEP8 Compliant. Tested notes and heartbeat application.
By the way I'm going to put up a PR today that will get this in. —
Sent from Mailbox

On Sat, Jun 7, 2014 at 5:21 PM, Divij Rajkumar <notifications@github.com>
wrote:

>> +from akobi.lib.utils import function_as_callback
>> +
>> +
>> +class Initializer(object):
>> +    """
>> +    Initialize the interview for a particular client. Called by the
>> +    WebSocketHandler's on_message method when it receives an init
>> +    message from the client (which happens whenever a new client joins)
>> +    """
>> +
>> +    # This class is never going to be instantiated, so having a Borg here
>> +    # isn't going to work. Instead just use a class variable
>> +    _apps_instantiated = False
>> +
>> +    @classmethod
>> +    def initialize(cls, interview_id, client_socket):
> ```cls``` and ```self``` have different meanings in Python. ```self``` is used to reference instance variables and ```cls``` class variables. When using the ```@classmethod``` decorator, the first argument to the method must always be ```cls``` and not ```self```
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/jivid/akobi/pull/51/files#r13521501