This module makes it easy to use the realtime capabilities of Rethinkdb in Django.
- Push data to a table
- Handle in Django the data coming from the Rethinkdb changefeed
Depends on Celery for the async jobs.
Push a document to Rethinkdb:
from changefeed.tasks import push_to_feed
push_to_feed.delay({"message":"Hello world"})
Handle the changefeed events:
# this function will be triggered on every change in the Rethinkdb data
def feed_handlers(database, table, change):
message = change['new_val']['message']
print message
return
Read the documentation.
Jafeed: rss aggregator that listens to the changefeed to display live update notifications