Closed htdvisser closed 2 years ago
Re-assigning to @johanstokking and @adriansmares because they're also assigned on https://github.com/TheThingsIndustries/lorawan-stack/issues/1804
We'll revisit this later as needed. Many things have changed in the meantime.
I think that triggering alerts for gateway disconnection, for example, should be handled by the NOC.
Summary
I propose to add an "Event Pipelines Registry" to the Identity Server.
The goal of the "Event Pipelines Registry" is to have a central API and storage model that allows us to configure event pipelines in different scopes: Entity (Application/Gateway to start with), Organization, and User. This allows organizations and users to configure event pipelines for all their applications/gateways at once, instead of having to configure them on different entities (applications/gateways), on different servers (GS/NS/AS/JS) in different clusters.
Additionally, the API, the storage and the (web) UI should be flexible enough to support "plugins" similar to what I described in https://github.com/TheThingsNetwork/lorawan-stack/issues/4935, allowing for (enterprise) plugins to provide event pipeline types that are understood by the "Event Server" and (web) UI that can be (dynamically) loaded by the Console.
How do you propose to implement this?
The API for a
Pipeline
will be as follows:The
pipeline_type
is the name of the "plugin" that provides the pipeline. This name is used by the Event Server to load the plugin, which is configured with thedata
. The name is also used by the Console to load the web UI for configuring the pipeline.The API for the
EventPipelineRegistry
would look like this:Since
ListGatewayEventPipelines
would also return pipelines configured on the Organization and User scopes, this would need to be implemented in the Identity Server so that we can derive memberships.The initial implementation may only support the Entity (Application/Gateway) scope.
Event Servers would fetch and cache event pipelines for each gateway/application for which they process events (https://github.com/TheThingsIndustries/lorawan-stack/issues/3001 may also apply here).