##// END OF EJS Templates
Synced with default branch changes
Synced with default branch changes

File last commit:

r784:e1e1b7d8 decentral
r785:b8db9e2d merge decentral
Show More
sync.markdown
44 lines | 1.7 KiB | text/x-markdown | MarkdownLexer
neko259
Starting a new branch. Added protocol description
r758 # INTRO #
This document discribes the server sync protocol.
neko259
Updated the sync protocol doc
r784 # 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.
neko259
Starting a new branch. Added protocol description
r758 # 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.
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).
neko259
Some additional info to the sync doc
r759
neko259
Updated the sync protocol doc
r784 Each node can have several keys. Nodes can have shared keys to serve as a pool
(several nodes with the same key).
neko259
Some additional info to the sync doc
r759
Each post has an ID in the unique format: node-id/post-id
neko259
Changed protocol a bit to be more clear and universal
r778
All requests pass a request type, protocol and model versions and a list of
optional arguments used for filtering.
# REQUESTS #
Request types:
* pull - pull the desired model ids
* get - get models by ids
neko259
Updated the sync protocol doc
r784 * 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.
neko259
Updated the pull response to be more clear and short
r782
# RESPONSES #
* not supported - request is not supported
* success - request was successfull
* error - unexpected error