Skip to content

Design:Shared Global Context

TJKoury edited this page Nov 2, 2016 · 1 revision

Requirements

  1. Enable persistence of context across restarts reference
  2. Enable shared context when multiple instances of node-red are running the same flows reference
  3. The model should follow that of the existing storage plugin mechanism. reference

Considerations

  1. Current plugin model interface is specifically designed with getters/setters for specific data types (flows, settings, sessions).
  2. The global context is dynamically typed, with the 'interface' being that of a context with dynamic getter / setter functions accepting keys.

Approaches

  1. Create an inherited interface with dynamic getter / setters, extend prototype to create storageModuleInterface.
  2. Modify the storageModuleInterface to include dynamic getter / setters.
Clone this wiki locally