Syncing multiple user logs adds complexity to server architecture.
Scopes and scope sets enhance sharing flexibility in collaborative work.
Managing text blocks in a scoped sync system showcases intricacies of data handling.
Deep dives
Transition to Multi-User Collaboration
In transitioning from a single-user app to multi-user collaboration, the team introduced an additional layer of indirection, creating logs for each user and documents for collaborative work. The challenge shifted from individual user log maintenance to synchronizing overlapping logs of multiple users, adding complexity to the server architecture and data syncing processes.
Unit of Sharing and Scope Sets
The podcast delves into the concept of scopes as the smallest unit for sharing, such as a board, and the subsequent bundling of scopes into scope sets for sharing flexibility. Decisions to maintain granularity and anticipate future sharing options were highlighted, emphasizing the flexibility to extend sharing capabilities for boards and beyond.
Text Blocks and Data Handling Challenges
Special consideration was given to text blocks as a unique data type within the MUSE canvas due to their proliferation and complex handling in the sync system. The transition from core data to scoped sync led to an explosion of scopes for text blocks, showcasing the intricacies of managing various data types within the collaborative framework.
Challenges of Handling Permissions and Offline Changes
In a local-first approach, the handling of permission changes and offline edits poses challenges. The server determines the sequence of events for permissions to ensure consistency. While content editing can be resolved by clients, permission changes require a server-led approach to maintain an agreed-upon order. Although there are potential complexities such as concurrent actions, experiences from distributed content edits suggest practicality in managing permissions.
Evolution of Sync Solutions and Developer Experience
Implementing a local-first sync system demands thorough consideration due to the evolving landscape of sync solutions. Commercial off-the-shelf and open-source options provide insights, yet none offer a fully integrated solution. The complexity of sync systems suggests caution in choosing to build a custom solution unless with a specific expertise. Developers face the challenge of designing APIs familiar enough for developers while incorporating unique sync capabilities for a seamless user experience.
It's been a year since Muse 2.0 launched. To help commemorate this anniversary, Adam Wulf once again joins Mark and Adam Wiggins to do a technical deep-dive on Muse's sync architecture. They discuss the benefits such as less ops burden and good developer experience; and challenges such as event vs state based data, handling different app schema versions, and the tradeoffs of a content-aware server.