What’s new in Snorky 0.1.0-a3

Apr 14, 2015

Here is a new release with new features.

  • compare_digest, a function that provides constant-time string comparison in Python 2.7.7+ and Python 3.3+ has been replaced with streql, a third party module that performs the same task, but it is compatible with older Python versions.

    This is required to use Snorky in CentOS 7 with Python 2 without building the interpreter from source.

  • Added a SNORKY_JSON_ENCODER setting in the Django connector, allowing to change the JSON encoder class (as if cls parameter of json.dumps() was specified).

  • Added debug logging to the Python backend connector. The logging channel is ‘snorky’. If the logging level is DEBUG it will emit a line for each message sent or received between the client and Snorky.

  • When DataSyncBackend does not receive a field now it will include its name in the error message (before only Missing field was returned).

  • Now SnorkyWebSocketHandler pings clients each 90 seconds by default. This is needed in order to not let NAT routers drop long lived otherwise inactive connections.

    The interval can be customized with the ping_pong_interval option of SnorkyWebSocketHandler. For example, in order to ping the clients with a frequency of 3 minutes (180 seconds) you could use this code:

    app_frontend = Application([
        SnorkyWebSocketHandler.get_route(frontend, "/ws",
              ping_pong_interval=180),
    ])