![]() Public web APIs can face compatibility challenges when trying to maintain backward compatibility with older clients. Let’s look more closely at several of these systems and the solutions they employ. The need to maintain backward and forward compatibility appears in a wide variety of distributed systems, both centralized and decentralized. The Mozilla Developer Network maintains this guide with advice on the subject. ![]() As any web developer already knows, writing forward-compatible HTML is more art than science. We can see forward compatibility in web browsers, which are written so the features added to HTML won’t break the ability to render new sites in old browsers. Forward compatibility, the ability to open documents in formats invented in the future, is rarer. It’s the ability to open old documents in new versions of the program. Peers would agree to new protocols without dispute.Īlas, because we can’t actually change all our systems at once, our changes must often preserve both:īackward compatibility, making new code compatible with existing data.įorward compatibility, making existing code compatible with new data.īackward compatibility is straightforward. Every API client would jump forward at once. ![]() Database columns would be renamed simultaneously in clients and servers. Why is change so hard? If we could update our software in lockstep everywhere, life would be easy. Appendix III: On scalar-array conversions.Appendix II: Cambria-Automerge implementation.Ultimately, we hope that better schema evolution tools will lead to a “Cambrian Era” for software, where people can customize their software more freely while preserving the ability to collaborate with one another. The benefits apply in many familiar contexts, but take on particular importance in decentralized software, where no single authority controls the data format. We believe tools like Cambria could revolutionize the way developers handle schema change. The issue tracker has full support for real-time collaboration between all of its versions, and is demonstrated throughout this piece. We have implemented these ideas in Cambria, a TypeScript lens library, and used it to build an experimental issue tracker. ![]() Translation logic is defined by composing bidirectional lenses, a kind of data transformation that can run both forward and backward. ![]() This layer allows developers to maintain strong compatibility with many schema versions without complicating the main codebase. We propose a principled replacement for these messy solutions: an isolated software layer that translates data between schemas on demand. But we don’t have powerful tools for handling this schema evolution, so we usually resort to ad hoc solutions, like conditionals peppered throughout the code and complex multi-step migration processes. As these systems evolve, we need to change data schemas while maintaining compatibility between different versions and components. We consume or provide APIs, connect to databases, and load files written by others. Project Cambria: Translate your data with lenses Project Cambria Translate your data with lensesĭistributed software is everywhere. ![]()
0 Comments
Leave a Reply. |