Evolutionary Data Through Schemaboi: Achieving Forward, Backwards, and Sideways Compatibility

· Source: InfoQ · Field: Technology & Digital — Software Development & Engineering, Emerging Technologies & Innovation · Depth: Intermediate, quick

Summary

Seph Gentle, in a closing talk at a local-first software conference, proposed a robust data format to enable interoperable applications and user data ownership, moving beyond the limitations of traditional local or cloud software. He introduced "schemaboi", an experimental Rust implementation, which embeds a self-describing, statically typed schema directly into file headers. This approach allows any tool to interpret data without external schema files, contrasting with Protocol Buffers or JSON. "schemaboi" supports primitives and complex structures, preserving unknown fields and filling missing ones with defaults. Gentle defined "sideways compatibility," allowing independent field additions via globally unique identifiers, alongside standard backward and forward compatibility. He outlined safety guidelines for schema evolution, noting that adding optional fields is safe, while renaming or type changes are high-risk. Benchmarks indicate "schemaboi" is significantly smaller and faster than JSON, though the project remains experimental.

Key takeaway

For software engineers designing local-first applications, consider adopting a data format that embeds its schema directly within files. This approach, exemplified by "schemaboi", ensures long-term data durability and "sideways compatibility," allowing your team to evolve schemas independently without central coordination. Prioritize globally unique field identifiers and incremental schema changes, like adding optional fields, to maintain data integrity across diverse application versions and prevent costly migrations.

Key insights

A durable, self-describing schema embedded in data files enables robust, independent evolution for local-first applications.

Principles

Method

The "schemaboi" system embeds the schema in the initial bytes of every file, merging it with the application's internal schema upon opening to ensure data interpretation and compatibility.

In practice

Topics

Code references

Best for: CTO, VP of Engineering/Data, AI Architect, Software Engineer, Research Scientist

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by InfoQ.