Websockets for Django applications using Redis as message queue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
5.0 KiB

.. changelog
Release History
* Fix issue #206: Safari websocket problem on runserver.
* Allow WS4REDIS_PROCESS_REQUEST to be a string.
* Renamed spelling error: send_persited_messages -> send_persisted_messages.
* Fix: Handle binary messages in Python 3.
* Fix: Websocket closed status code compatibility with Django v1.11.
* Fix: Support for Unix Domain Sockets.
* Support for Django-1.11.
* Support Redis connections over Unix Domain Sockets.
Improvements to the javascript API:
* Performing reconnection attempts when the first connection (on instantiation) fails.
* Adding the 'close()' method to enable closing the connection explicitly. When the connection is
closed calling this method, there will be no reconnection attempts. In order to connect again,
the client must be re-instantiated.
* Adding 'connecting' and 'disconnected' callback options. The first is fired right before the
Websocket is being instantiated, while tha last is fired after connection is closed.
* Adding the following methods to check websocket status: ``is_connecting()``, ``is_connected()``,
``is_closing()``, ``is_closed()``.
* Replaced ``STATIC_URL`` against ``{% static %}`` in all templates.
* Keep track on opened websockets.
* Added support for the Sec-WebSocket-Protocol header. Thanks to Erwin Junge.
* Fixed bug in unpacking binary websocket protocol.
* created 1 requirements file under ``examples/chatserver/requirements.txt``
* renamed chatclient.py to test_chatclient.py - for django-nose testrunner
* migrated example project to django 1.7
* edited ``docs/testing.rst`` to show new changes for using example project
* Added method ``release()`` to ``RedisSubscriber`` and calling this method each time a Websocket
closes, for whatever reason. This should avoid some reported memory issues.
* Fixed: **django-websocket-redis** failed to initialize under some circumstances in combination
with Django-1.7. This only happened for logged in users and threw this exception:
``django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.``
* Added setup on how to run **django-websocket-redis** with uWSGI but without NGiNX.
* Message echoing can be switched “on” and “off” according to the user needs. Before it was “on”
by default.
* Many changes to get this app compatible with Python3. This is still not finished, since the
pilfered module ``websocket.py`` is not PY3 compatible yet.
* Added a class ``RedisMessage`` to pass and store the message to and from the websocket.
Before this was just a string with serialized data.
* Fixed: ``request.user.username`` has been replaced by ``get_username()``.
* Messages can be sent to users being member of one or more Django groups.
* ``RedisPublisher`` and ``RedisSubscriber`` now only accept lists for ``users``, ``groups`` and
``sessions``. This makes the API simpler and more consistent.
* A new magic item ``ws4redis.redis_store.SELF`` has been added to reflect self referencing in
this list, what before was done through ``users=True`` or ``sessions=True``.
* Added the possibility to receive heartbeats. This lets the client disconnect and attempt to
reconnect after a number of heartbeats were missed. It prevents silent disconnections.
* Refactored the examples.
* Added reusable JavaScript code for the client.
* Added a context processor to inject some settings from ``ws4redis`` into templates.
* Keys for entries in Redis datastore can be prefixed by an optional string. This may be required
to avoid namespace clashes.
* Added possibility to publish and subscribe for Django Groups, additionally to Users and Sesions.
* To ease the communication between Redis and the Django, a new class ``RedisPublisher`` has
been added as Programming Interface for the Django loop. Before, one had to connect to the Redis
datastore directly to send messages to the Websoclet loop.
* Renamed configuration setting ``WS4REDIS_STORE`` to ``WS4REDIS_SUBSCRIBER``.
* Fixed: Use flush to discard received PONG message.
* Moved mokey patching for Redis socket into the runner. This sometimes caused errors when
running in development mode.
* Added timeout to select call. This caused IOerrors when running under uWSGI and the websocket
was idle.
* Reverted issue #1 and dropped compatibility with Django-1.4 since the response status must
use force_str.
* Major API changes.
* Use ``WS4REDIS_...`` in Django settings.
* Persist messages, allowing server reboots and reconnecting the client.
* Share the file descriptor for Redis for all open connections.
* Allow to override the subscribe/publish engine.
* Fixed: Can use publish to websocket without subscribing.
* Instead of CLI monkey patching, explicitly patch the redis.connection.socket using
* Initial revision.