This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Description
I would like to do remote syncronisation as follows
- client initiates a TCP connection to a storage server, and sends the hash of the root representing the current local state of resources
- the server begins walking the directory tree from this hash
- it uses its server-side hash and blob stores as primary
- where a hash is encountered which is not present on the server side it requests it from the client with the open TCP connection
- the client responds with the requested data, either as blobs or hash fanouts
- these are persisted by the server to the server side blob and hash stores
- Once the server has successfully walked the entire tree, it sets the new hash as the next commit of the branch
The API should look as follows
- Server side stores
- Server side
SyncServer server = new SyncServer(); // default to all interfaces and some default port
SyncListener listener = new SyncListener {
public void onSync(String hash, BlobStore blobStore, HashStore hashStore) {
// the app can walk the tree here
}
}
server.start(listener); // the server is now listening for incoming TCP connections
- Client side
SyncClient client = new SyncClient("myserver.com", 9090, blobStore, hashStore); // server address as above, with local stores
client.sync("abc123"); // provide a REAL sha1 hash