Show More
@@ -1,12 +1,16 b'' | |||
|
1 | 1 | <request> |
|
2 | 2 | <version> |
|
3 | 3 | <protocol>1</protocol> |
|
4 | 4 | <models> |
|
5 | 5 | <post>1</post> |
|
6 | 6 | </models> |
|
7 | 7 | </version> |
|
8 | 8 | <data> |
|
9 | <type>get</type> | |
|
10 | <model>post</model> | |
|
11 | <options> | |
|
9 | 12 | <id>id1/1</id> |
|
10 | 13 | <id>id2/56</id> |
|
14 | </options> | |
|
11 | 15 | </data> |
|
12 | 16 | </request> |
@@ -1,26 +1,32 b'' | |||
|
1 | 1 | <?xml version="1.1" encoding="UTF-8" ?> |
|
2 | 2 | <request> |
|
3 | 3 | <version> |
|
4 | 4 | <protocol>1</protocol> |
|
5 | 5 | <models> |
|
6 | 6 | <post>1</post> |
|
7 | 7 | </models> |
|
8 | 8 | </version> |
|
9 | 9 | <data> |
|
10 | <!-- Request type --> | |
|
10 | 11 | <type>pull</type> |
|
11 | <timestamp>0</timestamp> | |
|
12 | <!-- Model which we wish to pull --> | |
|
13 | <model>post</model> | |
|
14 | <options> | |
|
15 | <timestamp_from>0</timestamp_from> | |
|
16 | <timestamp_to>0</timestamp_to> | |
|
17 | <tags> | |
|
18 | <tag>tag1</tag> | |
|
19 | </tags> | |
|
20 | </options> | |
|
12 | 21 | <hosts> |
|
13 | 22 | <allow> |
|
14 | 23 | <host>*</host> |
|
15 | 24 | </allow> |
|
16 | 25 | <deny></deny> |
|
17 | 26 | <pools> |
|
18 | 27 | <pool>test1</pool> |
|
19 | 28 | <pool>test2</pool> |
|
20 | 29 | </pools> |
|
21 | <tags> | |
|
22 | <tag>tag1</tag> | |
|
23 | </tags> | |
|
24 | 30 | </hosts> |
|
25 | 31 | </data> |
|
26 | 32 | </request> |
|
1 | NO CONTENT: file renamed from docs/samples/response_post.xml to docs/samples/response_get.xml |
@@ -1,32 +1,29 b'' | |||
|
1 | 1 | # INTRO # |
|
2 | 2 | |
|
3 | 3 | This document discribes the server sync protocol. |
|
4 | 4 | |
|
5 | 5 | # DRAFT PROTOCOL DESCRIPTION # |
|
6 | 6 | |
|
7 | Version: | |
|
8 | * Protocol version | |
|
9 | * Model version | |
|
10 | ||
|
11 | Node data: | |
|
12 | * Public key | |
|
13 | ||
|
14 | Object data: | |
|
15 | * Post | |
|
16 | * Post list (for sync) | |
|
17 | ||
|
18 | 7 | The node requests other node's changes list since some time (since epoch if |
|
19 | 8 | this is the start). The other node sends a list of post ids or posts in the |
|
20 | 9 | XML or JSON format. |
|
21 | 10 | |
|
22 | 11 | Protocol version is the version of the sync api. Model version is the version |
|
23 | 12 | of data models. If at least one of them is different, the sync cannot be |
|
24 | 13 | performed. |
|
25 | 14 | |
|
26 | 15 | The node signs the data with its key. The receiving node saves the key at the |
|
27 | 16 | first sync and checks it every time. If the key has changed, the info won't be |
|
28 | 17 | saved from the node (or the node id must be changed). |
|
29 | 18 | |
|
30 | 19 | Each node holds a list of networks it wants to get info from. |
|
31 | 20 | |
|
32 | 21 | Each post has an ID in the unique format: node-id/post-id |
|
22 | ||
|
23 | All requests pass a request type, protocol and model versions and a list of | |
|
24 | optional arguments used for filtering. | |
|
25 | ||
|
26 | # REQUESTS # | |
|
27 | Request types: | |
|
28 | * pull - pull the desired model ids | |
|
29 | * get - get models by ids |
General Comments 0
You need to be logged in to leave comments.
Login now