Overview
Questions
Objectives
We will be using this Jupyter notebook to generate a mock sensor with temperature and rainfall data. This will demonstrate how the streams API could be used for real-time climatological data. You will use the provided TACC login credentials (or your own if you have a personal TACC account) to authenticate with Tapis.
You will generate Project, Site, Instrument, Variable, and Measurement definitions through the API. We will be generating random temperature and rainfall data, but in a real-world scenario this data could be generated by a physical sensor station and submitted to the API when the measurement is taken either by the device itself, or by a separate system receiving data from the sensor station.
Once the mock station data is created, we will demonstrate the use of Streams Channels for generating notifications. Abaco Actors can be registered and conditionally triggered by measurements that meet specific criteria as they are created.
Example
A common use case for Channels would be to send a notification if a measurement exceeds a threshold. This can be used to monitor abnormal/extreme conditions or potentially faulty data from a sensor.
You will register an Abaco actor with a Docker container that will plot the values of an instrument and upload the plot to your Tapis storage system. Then a Streams Channel will be set up to trigger this Actor when your instrument reports a measurement exceeding a threshold.
Finally, an alternative use of Tapis Channels will be presented. You will create a channel that generates a discord message when a measurement exceeds a threshold. Below is a link to join the Discord server this webhook is set up to execute with.
In addition to the Actor and Discord webhook methods shown, Slack webhooks, Tapis Jobs, and general POST requests for third-party APIs are supported.
Key Points