AltSql: Lets IoT Teams Ship Products That Work Offline and Sync Automatically
Teams building connected products face a design choice that kills agility: either the device depends on the server for everything, or you build a converter that keeps two data formats in sync. The device has readings and settings in its own format. The server wants those same values as SQL rows. Somebody writes a converter. Then somebody has to keep that converter alive and correct for ten years.
The converter approach is why IoT teams move slowly. Every data format change on the device means updating the converter. Every connection hiccup means figuring out retries and conflicts. The product works in the lab where the network is perfect, but falls apart in the field where networks drop and packet reordering is normal. You end up with code that’s complicated to write and painful to maintain.
AltSql takes the converter out of the equation. Its base engine, AltSql Core, is 15 KB of code that runs on a microcontroller. The device keeps its readings and settings in SQLite. The gateway keeps the same records, byte for byte, in SQLite. When the connection comes back after being down for days, the two sides reconcile automatically without conflicts.
For agile IoT teams, the payoff is speed. You don’t build a converter; the device and gateway speak the same SQL language. A sprint task like “the device should switch the fan on if the last ten readings were all above 60 degrees Celsius” splits cleanly. The rule runs on the device in C, using a SELECT on the local database, with no round trip to a server. The dashboard queries the same ten readings on the gateway, also with a SELECT. Both get their answer instantly.
The device doesn’t stall when the network is slow or gone. Rules fire immediately. Readings get stored locally. Settings get applied locally. When the connection comes back, sync happens automatically. The device doesn’t need the gateway to work; the gateway fills in the history for the dashboard. That’s a design that works in the field, not just in the lab.
The architecture is clean enough that teams can move fast. The device is independent; the gateway is independent; sync is conflict-free because both sides hold the same data in the same format. You’re not building custom merge logic or writing retries on top of retries. You’re writing SQL.
Six prototypes are built around Core, and the engines page lists them all. AltSql Ask puts one SQL question to a fleet of devices and brings back only the answers it needs. AltSql Mesh lets devices share a table peer-to-peer with no gateway at all. The flexibility comes from having a real database on every device, not a message queue or a dumb sensor.
The project is at Alpha. So far everything has run on a PC with radio links and flash chips simulated. Real hardware comes with the Beta. The live demos run the actual AltSql engine in your browser, compiled to WebAssembly, and you can cut power mid-write to see what survives.
Device makers who want to try it on real hardware can plan a pilot with the team.
For IoT teams that ship products, AltSql is the difference between building a converter you have to support for years and shipping a database that works in the field. The device stays alive and useful when the network drops. Rules fire instantly without a server. Sync is automatic and conflict-free. That’s how agile IoT teams stay fast: they eliminate the friction of server dependency and the complexity of custom sync logic. You get a real database on the device and automatic consistency with the gateway, and you spend your cycles on product, not plumbing.