diff --git a/docs/sync.markdown b/docs/sync.markdown --- a/docs/sync.markdown +++ b/docs/sync.markdown @@ -1,9 +1,14 @@ # INTRO # - This document discribes the server sync protocol. +# PURPOSE # +This protocol will be used to share the models (currently imageboard posts) +across multiple servers. The main differnce of this protocol is that the node +can specify what models it wants to get and from whom. The nodes can get +models from a specific server, or from all except some specific servers. Also +the models can be filtered by timestamps or tags. + # DRAFT PROTOCOL DESCRIPTION # - 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. @@ -16,7 +21,8 @@ The node signs the data with its key. Th 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). -Each node holds a list of networks it wants to get info from. +Each node can have several keys. Nodes can have shared keys to serve as a pool +(several nodes with the same key). Each post has an ID in the unique format: node-id/post-id @@ -27,6 +33,10 @@ optional arguments used for filtering. Request types: * pull - pull the desired model ids * get - get models by ids +* put - give a model to the given node (you have no guarantee the node takes +it, consider you are just advising the node to take your post. This request +type is useful in pool where all the nodes try to duplicate all of their data +across the pool. # RESPONSES # * not supported - request is not supported