Portal relies on a publish-subscribe event model to drive its render and update cycles. File tree structure and individual file statuses are stored in a trie structure known as the Registry. On the host side, there is a local Registry that listens to file changes on the host machine and broadcasts them to an append-only [Hypercore](https://hypercore-protocol.org/protocol/#hypercore) that is used as an event log. A drive syncing hook listens for changes in the local registry and streams file changes from disk to a [Hyperdrive](https://hypercore-protocol.org/protocol/#hyperdrive). On the client side, a remote Registry listens for changes in the event log and replicates changes locally. A drive download hook listens for changes in the remote registry and streams file changes from the Hyperdrive to the local disk.
0 commit comments