PeerRoster
An add-wins peer presence roster backed by ORSet.
Multicast discovery is lossy and reorders packets — an ORSet is the natural shape for a presence set where concurrent announce + goodbye resolves in favour of the add (a goodbye only cancels the specific dots it has witnessed).
Usage
Wire mDNS announce and goodbye observations to announce and goodbye. Read peers for a reactive view of the current peer set.
For multi-replica convergence (e.g. two discovery nodes), call merge with the remote replica's roster snapshot.
Parameters
replicaId
The stable identity of this node's replica — must be unique across all nodes that will eventually merge with each other.