Open Collections

UBC Undergraduate Research

Optimizing Time Series Database Operations on Resource-Constrained Embedded Devices Schoenit, Justin K.

Abstract

Embedded devices are often used for collecting time series data at predefined intervals. By efficiently processing that data onboard the sensor, energy-intensive network transmissions can be reduced, which may significantly increase battery life in remote devices. EmbedDB is a key-value database that runs on embedded devices with limited memory and CPU resources, requiring only 4 KB of RAM to operate. EmbedDB is competitive with SQLite on more powerful devices like the Raspberry Pi, but is still able to run on much smaller hardware like an Arduino. Experimental results show that EmbedDB is up to five times faster on time series queries compared to SQLite on a Raspberry Pi, showing its competence in the embedded ecosystem. To reduce friction while developing with EmbedDB, there are three ways to query the database: for single records by key, for ranges of keys or data, or through the use of chainable, operator-based iterators. Since, for embedded use-cases, it is often known at design-time what queries will be executed, the latter query method can be automatically generated as C code using an SQL pre-compiler purpose-built for EmbedDB. The compilation tool supports simple SQL queries including filtering, projection, and aggregation.

Item Citations and Data

Rights

Attribution-NonCommercial-NoDerivatives 4.0 International