Show More
@@ -1,34 +1,44 b'' | |||
|
1 | 1 | # INTRO # |
|
2 | ||
|
3 | 2 | This document discribes the server sync protocol. |
|
4 | 3 | |
|
4 | # PURPOSE # | |
|
5 | This protocol will be used to share the models (currently imageboard posts) | |
|
6 | across multiple servers. The main differnce of this protocol is that the node | |
|
7 | can specify what models it wants to get and from whom. The nodes can get | |
|
8 | models from a specific server, or from all except some specific servers. Also | |
|
9 | the models can be filtered by timestamps or tags. | |
|
10 | ||
|
5 | 11 | # DRAFT PROTOCOL DESCRIPTION # |
|
6 | ||
|
7 | 12 | The node requests other node's changes list since some time (since epoch if |
|
8 | 13 | this is the start). The other node sends a list of post ids or posts in the |
|
9 | 14 | XML or JSON format. |
|
10 | 15 | |
|
11 | 16 | Protocol version is the version of the sync api. Model version is the version |
|
12 | 17 | of data models. If at least one of them is different, the sync cannot be |
|
13 | 18 | performed. |
|
14 | 19 | |
|
15 | 20 | The node signs the data with its key. The receiving node saves the key at the |
|
16 | 21 | first sync and checks it every time. If the key has changed, the info won't be |
|
17 | 22 | saved from the node (or the node id must be changed). |
|
18 | 23 | |
|
19 | Each node holds a list of networks it wants to get info from. | |
|
24 | Each node can have several keys. Nodes can have shared keys to serve as a pool | |
|
25 | (several nodes with the same key). | |
|
20 | 26 | |
|
21 | 27 | Each post has an ID in the unique format: node-id/post-id |
|
22 | 28 | |
|
23 | 29 | All requests pass a request type, protocol and model versions and a list of |
|
24 | 30 | optional arguments used for filtering. |
|
25 | 31 | |
|
26 | 32 | # REQUESTS # |
|
27 | 33 | Request types: |
|
28 | 34 | * pull - pull the desired model ids |
|
29 | 35 | * get - get models by ids |
|
36 | * put - give a model to the given node (you have no guarantee the node takes | |
|
37 | it, consider you are just advising the node to take your post. This request | |
|
38 | type is useful in pool where all the nodes try to duplicate all of their data | |
|
39 | across the pool. | |
|
30 | 40 | |
|
31 | 41 | # RESPONSES # |
|
32 | 42 | * not supported - request is not supported |
|
33 | 43 | * success - request was successfull |
|
34 | 44 | * error - unexpected error |
General Comments 0
You need to be logged in to leave comments.
Login now