# HG changeset patch # User neko259 # Date 2014-08-05 18:40:21 # Node ID 2a649214d95821e32263c0ec04c8bfcc80aca5e2 # Parent df59247284b513dbde34b75e8b197945a0f7b71b Starting a new branch. Added protocol description diff --git a/docs/sync.markdown b/docs/sync.markdown new file mode 100644 --- /dev/null +++ b/docs/sync.markdown @@ -0,0 +1,28 @@ +# INTRO # + +This document discribes the server sync protocol. + +# DRAFT PROTOCOL DESCRIPTION # + +Version: +* Protocol version +* Model version + +Node data: +* Public key + +Object data: +* Post +* Post list (for sync) + +The node requests other node's changes list since some time (since epoch if +this is the start). The other node sends a list of post ids or posts in the +XML or JSON format. + +Protocol version is the version of the sync api. Model version is the version +of data models. If at least one of them is different, the sync cannot be +performed. + +The node signs the data with its key. The receiving node saves the key at the +first sync and checks it every time. If the key has changed, the info won't be +saved from the node (or the node id must be changed).