##// END OF EJS Templates
Edited info about version
neko259 -
r786:2564a266 decentral
parent child Browse files
Show More
@@ -1,8 +1,8 b''
1 <?xml version="1.1" encoding="UTF-8" ?>
1 <?xml version="1.1" encoding="UTF-8" ?>
2 <request version="1" type="get">
2 <request version="1.0" type="get">
3 <model>post</model>
3 <model>post</model>
4 <filter>
4 <filter>
5 <id>id1/1</id>
5 <id>id1/1</id>
6 <id>id2/56</id>
6 <id>id2/56</id>
7 </filter>
7 </filter>
8 </request>
8 </request>
@@ -1,19 +1,19 b''
1 <?xml version="1.1" encoding="UTF-8" ?>
1 <?xml version="1.1" encoding="UTF-8" ?>
2 <request version="3" type="pull">
2 <request version="1.0" type="pull">
3 <model>post</model>
3 <model>post</model>
4 <filter>
4 <filter>
5 <version>3</version>
5 <version>3</version>
6 <timestamp_from>0</timestamp_from>
6 <timestamp_from>0</timestamp_from>
7 <timestamp_to>0</timestamp_to>
7 <timestamp_to>0</timestamp_to>
8 <tags>
8 <tags>
9 <tag>tag1</tag>
9 <tag>tag1</tag>
10 </tags>
10 </tags>
11 <sender>
11 <sender>
12 <allow>
12 <allow>
13 <key>abcehy3h9t</key>
13 <key>abcehy3h9t</key>
14 <key>ehoehyoe</key>
14 <key>ehoehyoe</key>
15 </allow>
15 </allow>
16 <!-- There can be only allow block (all other are denied) or deny block (all other are allowed) -->
16 <!-- There can be only allow block (all other are denied) or deny block (all other are allowed) -->
17 </sender>
17 </sender>
18 </filter>
18 </filter>
19 </request>
19 </request>
@@ -1,44 +1,49 b''
1 # INTRO #
1 # INTRO #
2 This document discribes the server sync protocol.
2 This document discribes the server sync protocol.
3
3
4 # PURPOSE #
4 # PURPOSE #
5 This protocol will be used to share the models (currently imageboard posts)
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
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
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
8 models from a specific server, or from all except some specific servers. Also
9 the models can be filtered by timestamps or tags.
9 the models can be filtered by timestamps or tags.
10
10
11 # DRAFT PROTOCOL DESCRIPTION #
11 # DRAFT PROTOCOL DESCRIPTION #
12 The node requests other node's changes list since some time (since epoch if
12 The node requests other node's changes list since some time (since epoch if
13 this is the start). The other node sends a list of post ids or posts in the
13 this is the start). The other node sends a list of post ids or posts in the
14 XML or JSON format.
14 XML or JSON format.
15
15
16 Protocol version is the version of the sync api. Model version is the version
16 Protocol version is the version of the sync api. Model version is the version
17 of data models. If at least one of them is different, the sync cannot be
17 of data models. If at least one of them is different, the sync cannot be
18 performed.
18 performed.
19
19
20 The node signs the data with its key. The receiving node saves the key at the
20 The node signs the data with its key. The receiving node saves the key at the
21 first sync and checks it every time. If the key has changed, the info won't be
21 first sync and checks it every time. If the key has changed, the info won't be
22 saved from the node (or the node id must be changed).
22 saved from the node (or the node id must be changed).
23
23
24 Each node can have several keys. Nodes can have shared keys to serve as a pool
24 Each node can have several keys. Nodes can have shared keys to serve as a pool
25 (several nodes with the same key).
25 (several nodes with the same key).
26
26
27 Each post has an ID in the unique format: node-id/post-id
27 Each post has an ID in the unique format: node-id/post-id
28
28
29 All requests pass a request type, protocol and model versions and a list of
29 All requests pass a request type, protocol and model versions and a list of
30 optional arguments used for filtering.
30 optional arguments used for filtering.
31
31
32 Each protocol has its own version. Version consists of 2 numbers: first is
33 incompatible version (1.3 and 2.0 are not compatible and must not be in sync)
34 and the second one is minor and compatible (for example, new optional field
35 is added which will be igroned by those who don't support it yet).
36
32 # REQUESTS #
37 # REQUESTS #
33 Request types:
38 Request types:
34 * pull - pull the desired model ids
39 * pull - pull the desired model ids
35 * get - get models by ids
40 * get - get models by ids
36 * put - give a model to the given node (you have no guarantee the node takes
41 * 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
42 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
43 type is useful in pool where all the nodes try to duplicate all of their data
39 across the pool.
44 across the pool.
40
45
41 # RESPONSES #
46 # RESPONSES #
42 * not supported - request is not supported
47 * not supported - request is not supported
43 * success - request was successfull
48 * success - request was successfull
44 * error - unexpected error
49 * error - unexpected error
General Comments 0
You need to be logged in to leave comments. Login now