Skip to content

Draft: Unified Communications Layer (for Rapid Diffs)

Thomas Randolph requested to merge tor/poc/event-based-data-layer into master

What does this MR do and why?

This is a demonstration of the general structure and patterns for a "Message" (or "Event") Bus as the standard interface for application communication.

While not entirely self-explanatory, this set of slides may help shed a bit more light on the goals and structure here.

Relevant code points are:

  1. index.js: The "app" (the bus) is started and tasks are bound to it
  2. /tasks: The standard abstraction of how the app works, placed behind messages
  3. /logic: What the application is supposed to be able to do (e.g. fetch files, store them, etc.)
  4. /messages: What is the catalogue of how this app can be interfaced with and how 3rd parties can hook into it

MR acceptance checklist

This MR is for demonstration purposes only and should never be merged.

How to set up and validate locally

  1. You must either be able to run the GDK in SSL mode OR you must use Chrome with the flag unsafely-treat-insecure-origin-as-secure set to include your local gdk url (for example: http://gdk.test:3000)
  2. Turn on the rapid-diffs feature flag
  3. yarn install to get all the author-time dependencies. This isn't strictly necessary for the structure & patterns being proposed, but these abstractions allowed me to get coding a bit faster, so the demo won't work without them
  4. Visit the Changes tab of an MR
    • Note that for ease of development here, I wiped out the entire MR app, so the MR Tabs UI doesn't function. When you navigate to an MR, add /diffs to the end of the URL.
  5. It's unlikely that you'll understand the structure of the event-based proposal from the UI, but it's there (starting in the /demo/components/simulations folder) to demonstrate how the system fits into "a UI" (rudimentary or not).
Edited by Thomas Randolph

Merge request reports