![]() ![]() This is in stark contrast to Sync Engine Classic, which keyed nodes by their full path. In the Nucleus data model, nodes are represented by a unique identifier. When the user’s local disk looks the same as (i.e., Local Tree matches Remote Tree), sync is complete! It allows us to enforce strict invariants-for example, no matter how the three trees are configured at the beginning of a test, all three trees must still converge. ![]() We arrived at this data model because it is extremely testable! With this data model, it is easy to express a key goal of the system: to converge all three trees to the same state. Without the Synced Tree, we wouldn’t be able to distinguish this scenario from if the user had actually deleted /foo/fum locally. A merge base allows us to derive the direction of a change, answering the question: “did the user edit the file locally or was it edited on ?” In the graphic above, we can derive that the file at path /foo/fum was added remotely because the Local Tree (on disk) matches the merge base expressed by the Synced Tree. If you’re familiar with version control, you can think of each node in the Synced Tree as a merge base. The Synced Tree is the key innovation that lets us unambiguously derive the correct sync result.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |