theY4Kman / dcrf-client

Javascript client for Django Channels REST Framework

Home Page:https://www.npmjs.com/package/dcrf-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for generic model subscriptions

theY4Kman opened this issue · comments

Though DCRF doesn't have a standardized way of subscribing to all updates to any instance in a stream, it does offer support for this type of subscription, handing off implementation responsibility to the developer.

It would be nice if dcrf-client could support these types of arbitrary subscriptions, i.e.

  • Send an arbitrary request (e.g. subscribe_all, or whatever action name is chosen)
  • Add a dispatch listener, using a selector of the developer's choosing (e.g. {action: 'update', data: {...}})
  • Automatically resubscribe upon reconnection