Logo

Shineon Systems

smart food sovereignty

"

Deno KV System Server

\n

\n07/08/2023\n

\n

\nDeno Deploy app built with Deno KV for remote processing of system state\ninto device control actions.\n

\n
\n\n
twin-tree-diagram
\n
\n

This is the new backend for processing system state into control\nactions on the shineponics platform.

\n

It is a work in progress and has not been kitted-out with all of the\nnecessary bells and whistles yet. It allows developers to define the\ndevices within a system and their relationships to each other in\nTypeScript code. This code is then used when devices with matching IDs\nto the defined system POST their state data to the cloud.

\n

The Deno KV database was instrumental in allowing this to work in the\nDeno Deploy serverless environment. Each POST request from a device\nupdates an object stored in Deno KV. Deno Deploy instances wait for all\nsystem devices to have POSTed fresh data before they calculate control\nactions and respond to device requests.

\n

Each device receives only it’s own control actions and must request\nwith the correct TLS certificate authority for encrypted HTTPS\nnetworking. Additionally, devices will need to request with a specific\ntoken generated by the backend for that device but this is not yet\nimplemented. These measures are to keep all networking secure as any\nunintended access to a real-world control system could lead to\ndevastating consequences.

\n

This technology is being used to control and log the balcony smart farm data right now! There are currently\nno control systems in the Balcony smart farm but this is being\ndeveloped.

\n

View on\nGitHub

\n"