-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from jaczhi/jaczhi/sync-documentation
Sync join and sync leave documentation
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Sync Join | ||
========= | ||
|
||
The sync join protocol is used to command the repo to join a state vector sync group. | ||
|
||
1. The repo subscribes to the topic ``/<repo_name>/sync/join``. | ||
|
||
2. The client publishes a message to the topic ``/<repo_name>/sync/join``. The message payload is of type | ||
``RepoCommandParam``, containing one or more ``SyncParam`` with the following fields: | ||
|
||
* ``sync_prefix``: The name prefix of the sync group to join. | ||
* ``register_prefix``: (Optional) The name prefix for the repo to register with the forwarder. This prefix must not | ||
be the same as ``sync_prefix``. | ||
* ``data_name_dedupe``: (Optional) If true, the repo will deduplicate data names in the sync group. | ||
* ``reset``: (Optional) If true, rebuild state vectors from the stored state vectors on the repo disk. This is useful | ||
if interests are sent for permanently unavailable data from an old vector. | ||
|
||
3. The repo joins the sync group, saving sync information to disk. | ||
|
||
* The repo will listen for state vector interests for the sync group. Then, to fetch any data, the repo will send | ||
interests following the SVSPS data naming convention. For more information, see the | ||
`specification page <https://named-data.github.io/StateVectorSync/Specification.html>`_ for State Vector | ||
Synchronization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Sync Leave | ||
========== | ||
|
||
The sync leave protocol is used to command the repo to leave the sync group. This command also removes any information | ||
about the sync group from repo storage. | ||
|
||
1. The repo subscribes to the topic ``/<repo_name>/sync/leave``. | ||
|
||
2. The client publishes a message to the topic ``/<repo_name>/sync/leave``. The message payload is of type | ||
``RepoCommandParam``, containing one or more ``SyncParam`` with the following field: | ||
|
||
* ``sync_prefix``: The name prefix of the sync group to leave. | ||
|
||
3. The repo leaves the sync group, removing sync information from disk. The repo no longer listens to the originally | ||
specified register prefix. | ||
|
||
* Note that any already-stored data packets that were received prior to leaving the sync group are *not* deleted. |