AltSql is a project to build a very small database engine for connected devices. A sensor keeps its readings and settings in its own flash memory, reads them back to decide on the spot, and sends only what matters. Its gateway keeps the very same records, byte for byte, and answers questions about them in SQL.
The engine works today in simulation. It is one C file, tested through hundreds of thousands of simulated power cuts, and a live demo runs it in your browser. The next step is real chips.
Why Put a Database on the Sensor
A device that can read its own records doesn’t have to wait for a server to tell it what to do. The whole project rests on that idea, and it pays off in four ways. More autonomy: devices keep working and deciding when the connection drops. Less bandwidth: results and alerts go upstream instead of every raw reading. Local decisions: devices act on their own data, with no round trip to the cloud. No translator: one format and one sync protocol run from sensor to cloud.

Today a device and its gateway usually keep data in two different formats. Converter code sits between them, and somebody has to write it for every product and keep it working for the ten or more years the device stays in service. AltSql keeps one format on both sides, so there is nothing to convert. How it works
What the Alpha Has Shown So Far
The sensor build takes about 15 KB of code on a Cortex-M4, with key-value, time-series and sync. The three demo devices use 672 to 1,048 bytes of engine RAM, plus up to 1.4 KB of stack. In one test run the power was cut 400,000 times, and after each cut everything reported as saved was still there. In the demo, the devices sent 26 to 76 times less data over their weak links than sending every record would take.
All of this was measured on a PC, with flash chips and radio links simulated. The engine compiles for four microcontroller families but has not run on one yet. That is what the Beta is for. The Alpha in detail
Where the Project Stands
The Alpha is done: a working engine in one C file, tested hard in simulation, with a demo of three devices in three industries. The Beta comes next: the same engine on real boards from five chip families, 10,000 real power cuts per board, and three devices running for a week. After it, the Advanced Beta adds the Learned Query Optimizer, and v1.0 freezes the on-flash format and the API. See the roadmap
Try It in Your Browser
The live demo runs the real Alpha engine inside your browser. Three simulated devices go through an hour, two days and a month of readings in under a minute, each deciding for itself and syncing to its gateway. Pull the plug whenever you like: the device loses power in the middle of a write, reboots, checks every record it had saved and carries on. It is open to everyone, with no sign-up and nothing to install. Open the live demo

