realtime
realtime copied to clipboard
Dynamic Configuration
The realtime module supports quasi-dynamic configuration from a json file. In the future it should be completely dynamic so that users can add/remove webhooks and other connectors without restarting the application. This last requirement rules out using Config.Provider.
Some issues that came up while implementing #46:
- If users can add webhooks from the web application, where do we store this data and how do we update realtime to know about it? How can realtime reload the config if it crashes?
- Should all configuration be stored in the same way or should we allow multiple configuration options? If the latter, how do we join the configurations?
- At the moment, the connectors genserver queries the configuration manager every time it needs to notify the subscribers. This has the implication that if the configuration manager crashes (for example because the json file is malformed), the webhook manager will stop sending out notifications. We should replace the configuration manager with an Agent to hold the configuration struct, and a genserver to update it. If the latter crashes, other components can still access the old configuration.