Skip to content

Commit c773907

Browse files
committed
add sync & pubsub sections to documents docs page
1 parent 4f4928b commit c773907

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

src/app/docs/layers/documents/page.mdx

+18-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Authors create and join documents: mutable key-value stores that multiple users
1414
/>
1515
</div>
1616

17-
## Documents
17+
## Document Namespaces
1818

1919
A document is a _namespace_ that is uniquely identified by a keypair.
2020

@@ -49,14 +49,24 @@ ktrygcpxealfdtfmohw66nb2keivu52opk65cyj4j7jy7wior7ea
4949

5050
Document IDs are base32-lower serialization of the public key of the document. They do _not_ change as the document changes.
5151

52-
{/*
53-
## Permissions
52+
## Syncronizing Documents
5453

55-
## Multiple Writers
54+
When an author wants to sync with a document, they first find the document's current state, then they perform a [range-based set reconciliation](https://arxiv.org/abs/2212.13567) to fill in any changes in the keyspace.
5655

57-
## Collaging
56+
When two nodes want to sync, they perform a range-based set reconciliation to fill in any changes in the keyspace. Any node with the read key (document ID) can read & sync the latest state of the document. Having the read key denotes read access. All entries in the document are double-signed, once with an authorID (keypair) and the write key of the document.
5857

59-
## Subscriptions
58+
<Note>
59+
Check out our [youtube video](https://www.youtube.com/watch?v=_D_tbAMqADM) on how range-based set reconciliation works!
60+
</Note>
6061

61-
## Revocations & Key Rotations
62-
*/}
62+
After this synchronization step, we know the hashes of all the content the document references. By default iroh documents will fetch all content associated with the document.
63+
64+
## Document PubSub
65+
66+
Every document is it's own pubsub swarm, keyed by the public key of the document. Iroh pubsub swarms implement techniques described in [HyParView](https://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf?ref=bartoszsypytkowski.com) & PlumTree to keep a bounded number of active nodes any one node in the swarm needs to push to.
67+
68+
<Note>
69+
Bartosz Sypytkowski has a great [blog post](https://www.bartoszsypytkowski.com/hyparview/) on HyParView & Plumtree, well worth reading.
70+
</Note>
71+
72+
As authors write to a document, they publish these changes as pubsub messages that other peers pick up on & apply to their local state.

0 commit comments

Comments
 (0)