Send an update for a given entity. This must be called to send local changes to remote peers.
Subscribe to updates for a given entity.
Every time the sync interface has an update for the entity it will call handleUpdate
, passing
it the entity ID and the update.
The entity ID to subscribe to.
The handler function to be invoked when the sync interface has a new update.
Returns a function that may be called to unsubscribe.
A
SuperPeer1
is a peer that accepts connections from any peer, syncs everyEntity
that it becomes aware of, and persists the entities to storage.It is meant to be run as a part of a sync server that can be used to persist and synchronize
Entity
s between multiple client peers, or possibly other super peers.