0 Design:Shared Global Context
TJKoury edited this page 2016-11-01 20:21:41 -04:00

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.