The Engines
AltSql is AltSql Core, a small database engine for devices and their gateways, and six prototypes built around it. Core is the foundation and goes onto real chips first. The prototypes each take its idea to one more problem in how devices keep, search and share their data. Everything so far runs on a PC: none of the engines has run on a microcontroller yet, and that is the job of the Betas, AltSql Core’s first.
All of them serve the same premise. Devices keep working and deciding when the connection drops. Results and alerts go upstream instead of every raw reading. Devices act on their own data, with no round trip to the cloud. One format and one sync protocol run from sensor to cloud.
AltSql Core: The Foundation
Key-value and time-series storage on the device, SQL on the gateway, and the same records on both, copied byte for byte. A sensor keeps its readings and settings in its own flash, decides on the spot and keeps working when the link drops; its gateway answers SQL over the very same records, with no converter in between.
It is one C file of 3,907 lines. The sensor build, with key-value, time-series and sync, takes 14,954 bytes of code as compiled for a Cortex-M4, and the three demo devices use 672 to 1,048 bytes of engine RAM. In one test run the simulated power was cut 400,000 times with nothing saved lost, and the tests caught 16 of 16 deliberately planted bugs. It has not yet run on a microcontroller.
The Alpha results, the technical brief and the live demo
Six Prototypes Built Around It
Each prototype is one C file with its own tests and live demo. Four are layers on top of AltSql Core and keep their data in it. Two are storage layers of their own and use none of Core’s code: AltSql Instant writes Core’s records and speaks its sync, so a gateway running Core takes them as they are, and AltSql Realtime shares only Core’s flash driver interface.
| Engine | What it adds | How it relates to Core | Lines of C | Tested in |
|---|---|---|---|---|
| AltSql Ask | Questions put to a whole fleet; only the answers travel | A layer on Core: it runs over each device’s Core records | 1,923 | Simulation on a PC |
| AltSql Vector | Vibration fingerprints, matched to what it was taught | A layer on Core: its fingerprints live in Core’s store | 931 | Simulation, and recorded vibration |
| AltSql Wave | Raw vibration bursts, lossless and searchable | A layer on Core: bursts and features in Core, features sent by Core’s sync | 1,550 | Simulation, and recorded vibration |
| AltSql Mesh | One table shared by a fleet, with no gateway | A layer on Core: each device’s copy is its own Core database | 1,566 | Simulation on a PC |
| AltSql Realtime | A limit on every write, for a control loop | Its own storage layer and records; shares Core’s flash driver interface, none of Core’s code | 974 | Simulation; chip times from a datasheet |
| AltSql Instant | Storage for MRAM and FRAM, kept the moment a write returns | Its own storage layer, none of Core’s code; writes Core’s records and speaks its sync, so a Core gateway takes them | 1,270 | Simulation; chip energy from datasheets |
AltSql Ask
AltSql Ask lets a gateway ask a whole fleet of devices one SQL question. Each device works out its own share of the answer from its own records, within limits the question carries, and sends back a small answer: 23 to 45 bytes for most of the demo’s questions. The gateway merges the answers into the rows the same SQL would give over all the raw data.
AltSql Vector
AltSql Vector lets a device learn what a machine sounds like. It turns each stretch of vibration into a 32-byte fingerprint, names what it hears by the closest fingerprint it was taught, and flags what it was never taught. Taught only a normal bearing, the Alpha flagged every fault fingerprint in nine fault recordings of a public bearing data set, at each of two loads, and none of 55 normal ones; with so few normal ones, a false-alarm rate of a few percent cannot be ruled out.
AltSql Wave
AltSql Wave lets a device keep the raw signal. It stores short bursts of vibration compressed without losing a bit, works out the figures an analyst looks at first while the samples arrive, and makes them searchable with SQL on the device or on a gateway, which can then fetch the raw burst behind any row. On 94 channels of a public bearing data set, its bursts came out 2.3% larger than FLAC at its default level and 23% smaller than xz at its strongest.
AltSql Mesh
AltSql Mesh lets the devices of a fleet share one table with no gateway or server. Each device writes to its own copy, and whenever two come within radio range they bring each other up to date. In the tests, fleets of 2 to 32 devices meeting at random over links that lost up to 30% of their messages all ended with the same table, and a meeting with nothing new cost 484 bytes in a fleet of 12.
AltSql Realtime
AltSql Realtime is storage for a control loop: every write has a limit on its flash work, worked out from the configuration before the device runs, and no write ever erases. The one call that erases runs when the application has time for it, with a flash driver that lets the chip erase in the background; the demo models such a driver. On a model of a common flash chip, with times computed from its datasheet, ten seconds of a loop writing every 10 ms missed none of their 1,000 deadlines, while the same loop on AltSql Core missed 76 at the chip’s typical timings and 829 at its slowest.
AltSql Instant
AltSql Instant is storage for MRAM and FRAM: each record sits in a fixed place and is updated there, and a write is kept the moment its call returns. Its records are AltSql Core’s, byte for byte, so a gateway running Core takes its sync batches as they are. In the demo, with 500 µW of light and a 2,200 µF capacitor, a sensor with no battery saved 1,428 readings in a minute with Instant on MRAM, and 220 with AltSql Core on NOR flash; the energy comes from the demo’s model of the chips.
Coming Later
AltSql Private, for totals across devices without their individual readings, is on hold until an outside security review.
The Reports, and a Pilot
Each engine has an Alpha report that sets out how it was built and tested, and how each figure was measured or computed. The reports go to device makers and investors on request, through the contact page. Device makers who want to see AltSql Core on their own board can plan a hardware pilot. The engines are proprietary, and the prototypes are marked all rights reserved until a license is chosen.