Part of Stem. This page defines the policy rule struct that makes up a sync policy.
A policy rule says: for this scope, follow, pin, fetch on demand or ignore, exchanging with these peers at this interval.
Fields
field | type | required | meaning |
|---|---|---|---|
| yes | What the rule is about. | |
| one of | yes | Follow: reconcile periodically and watch, keep what arrives. Pin: follow and never garbage-collect. On-demand: fetch when a client asks, may be collected. Ignore: never fetch or accept. |
| list of peer id | no | Peers to exchange with in addition to the space's authority peers. |
| no | Seconds between reconciliations when not watching. |
Rules
Rules are evaluated most specific scope first: a rule on a node beats a rule on its ancestor, and exact beats children beats subtree on the same node. An account's own space is implicitly pin at the root. Joining a space (a contact with join) adds a follow rule by default, which is the roadmap's "subscription derived from what the account has joined and followed". ignore is also what makes Offer refuse a scope. Peers named here are added to, never replace, the authority peers.
Today (HM24)
A subscriptions(iri, is_recursive) row per daemon, invisible to the user and not shared between a user's devices.
Example
{"scope": {"space": {"/": {"bytes": "7QEE...Alex"}}, "depth": "subtree"}, "mode": "follow", "interval": 60}See also
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime