Subscribe / unsubscribe to data streams over websocket channel

21 views
Skip to first unread message

Ian Danforth

unread,
Sep 30, 2016, 6:59:51 PM9/30/16
to Django users
Hello!

 Channels + databinding is a great way to push updates to clients of an API. I'm wondering however if there are any good examples of the client being able to subscribe and unsubscribe to streams of data over an existing websocket/channel pair (while making use of databinding)

 For example, github.com will send a message like this from the client to the server when it wants to get a particular data stream over the websocket:

subscribe:tenant:1:repo:51179261:branch:master

 I'd like to provide this kind of protocol to my clients. I think it may have to go into a custom consumer, but any examples / insights into this pattern would be greatly appreciated.

Ian
Reply all
Reply to author
Forward
0 new messages