CRDT 란 무엇인가? (작성중)
Yorkie 오픈소스를 분석해보자
About Yorkie
Yorkie is an open-source document store that provides a suite of tools for building real-time collaborative applications like Google Docs and Figma. It includes a JSON-like Document based on Conflict-free Replicated Data Types(CRDTs), Presence, and auth webhook features to enable synchronous co-editing.
Unlike other libraries like AutoMerge and Yjs, Yorkie includes a full-stack solution with SDKs, Cloud or Self-Hosted Server, making it easier to implement co-editing capabilities in your application.
In the following sections, we will explore the structure and workings of Yorkie in more detail.
Components
Yorkie consists of three main components: Clients, Documents, and Server.
Clients are the entities that communicate with the server. Changes made by documents can be synchronized with the server, allowing for real-time collaboration.
Documents are the core data structures of Yorkie, and are based on Conflict-free Replicated Data Types(CRDTs). This allows for seamless collaboration on a document, even when clients are offline.
Server is the central hub of the Yorkie, receiving changes from clients, storing them in the database, and propagating them to other clients who are subscribed to the same documents.
In addition, Projects in Yorkie represent separate services or applications within the system. This allows for multiple independent projects to coexist within a single Yorkie installation.
How it works
A high-level overview of Yorkie is as follows:
The Yorkie system allows clients to have replicas of a document, representing an application model, on multiple devices. Each client can edit the document independently on their local devices, even when offline. When a network connection is available, Yorkie determines which changes need to be synced between clients and brings their replicas into the same state. In the event that the document is being edited concurrently on different devices, Yorkie automatically syncs the changes and resolves any conflicts, ensuring that all replicas end up in the same state.
To get started with Yorkie, please refer to the Getting Started.
CRDT vs OT
CRDT ( Conflict-Free-Replicated Data Types) 와 OT (Operational Transformation) 란 동시 편집 기술로, 실시간 협업 툴에 관련된 기술이다.
실시간 협업 에디터가 동작되는 과정
CRDT 와 OT 비교
Last updated