Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1 KB

creating-a-custom-provider.md

File metadata and controls

29 lines (17 loc) · 1 KB
description
How to sync document updates to a database or network

Custom Provider

You already learned that document updates in Yjs are commutative, associative, and idempotent. Yjs doesn't care in which order document updates are applied, as long as all changes are applied eventually. It is the role of the provider to distribute or store updates generated by the Yjs document. A network provider sync document updates to other peers. A database provider syncs document updates to a database. In this tutorial, you will learn how to build your custom provider for Yjs. The Document Updates section is a prerequisite for this tutorial.

[[todo]]

Example: The simplest database provider

Example: The simples network provider

Recommendaditions

TODO

  • What a provider does
  • Find a new analogy of blocks
  • Network provider - y-protocols
  • Database provider - tricks how to merge updates (after differential updates feature is finished)
  • How to sync subdocuments