Skip to content

Replace notes polling with ActionCable

Heinrich Lee Yu requested to merge replace-notes-actioncable-backend into master

What does this MR do and why?

Updates notes in real time using websockets instead of polling.

The websocket is used to signal a note change and then we request the same endpoint used for polling to get the updated notes. This is done so minimal changes are needed.

This will eventually be changed to use GraphQL subscriptions, but I did this since we can get most of the benefits with just small code changes.

How to set up and validate locally

  1. Enable the action_cable_notes feature flag
  2. Open an issue / MR / epic in two windows / browsers
  3. Add / update a note in one window

The updates should show up immediately on the other window. You can also verify in the network inspector that we are no longer polling on the notes endpoint.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Heinrich Lee Yu

Merge request reports