diff --git a/docs/src/specification/specification.rst b/docs/src/specification/specification.rst index 97f9b1d..0fc46dc 100644 --- a/docs/src/specification/specification.rst +++ b/docs/src/specification/specification.rst @@ -7,4 +7,6 @@ Specification Insert Delete Check - TCP bulk insert \ No newline at end of file + TCP bulk insert + Sync Group Join + Sync Group Leave \ No newline at end of file diff --git a/docs/src/specification/sync_join.rst b/docs/src/specification/sync_join.rst new file mode 100644 index 0000000..009fcb5 --- /dev/null +++ b/docs/src/specification/sync_join.rst @@ -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 ``//sync/join``. + +2. The client publishes a message to the topic ``//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 `_ for State Vector + Synchronization. \ No newline at end of file diff --git a/docs/src/specification/sync_leave.rst b/docs/src/specification/sync_leave.rst new file mode 100644 index 0000000..2ff8ca5 --- /dev/null +++ b/docs/src/specification/sync_leave.rst @@ -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 ``//sync/leave``. + +2. The client publishes a message to the topic ``//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. \ No newline at end of file