Water Softener Tracker

System Architecture

large
System Architecture

The system can be segmented into three subsystems: data collection, passive data output, and active data output. Each of these chunks revolves around the data, which in this case is stored in DynamoDB.

The data input subsystem consists of the distance sensors which collect the data, AWS IoT which is used as a secure interface from the sensors to the rest of the system, and DynamoDB, which persists the data.

The passive data output subsystem includes the segments of the system which require user action to trigger the system. A user accesses my Salt Level page. This page makes a request to an API set up with API Gateway which is backed by a Lambda function as a serverless API. The Lambda function accesses the DynamoDB table to gather persisted sensor data, and returns it to the browser to be rendered.

In contrast with the passive data output subsystem, the active data output subsystem does not require user input to trigger the system. This subsystem starts with a DynamoDB stream on the table that stores the sensor data. This stream triggers a Lambda function which will gather the newly inserted data, check to see if any of the values are outside of the expected threshold, and publishes to SNS if a user notification is required.

Still interested? Go back to the Water Softener Salt Tracker and check out how other things work!