# Design Notes ## Synchronization We support several operations for Bootstrapping * Fetch Bootstrap * Fetch Reference * Fetch Object ## Resource Datamodel We assume all resources are content-addressable and form a merkle tree. We maintain an index of path to content-addressable items. Resource reference paths are rooted at a `/ref/` prefix for their path namespace. They contain a payload with the `objectID`, `content_address` if there is one, and a list of any dependent resources. ```json { "objectId": , "content_address": , "name": "/path/name0", "dependents": [ { "path": "path/name1", "content_address": , "objectId": , content: }, { "path": "path/name2", "content_address": , "objectId": , content: } ], } ``` ### Reserved References * `/ref/all/` The root of the resouce tree. List all sub resources that the user has access too. * `/ref/user/` The user information. ### Content-Addressable Query API The content addressable store is considered immutable. You do not delete from it. We may garbage collect at some point as a storage optimization. Content addressable paths are rooted at `/object/`. Their payloads are whatever the contents serialize to in json ## Syncrhonization ### Bootstrapping * Load `/ref/all/` * Follow the sub resources recusively to load the entire dataset locally making sure to keep the content-addresses around for comparison. # Benchmarking ## Bootstrapping benchmark tests * Rest API * WebSockets