Show More
@@ -1,18 +1,10 b'' | |||
|
1 | 1 | <?xml version="1.1" encoding="UTF-8" ?> |
|
2 | 2 | <response> |
|
3 | 3 | <status>success</status> |
|
4 | 4 | <models> |
|
5 | <post> | |
|
6 |
|
|
|
7 | </post> | |
|
8 | <post> | |
|
9 | <id>id1/2</id> | |
|
10 | </post> | |
|
11 | <post> | |
|
12 | <id>id2/1</id> | |
|
13 | </post> | |
|
14 | <post> | |
|
15 | <id>id2/5</id> | |
|
16 | </post> | |
|
5 | <id>id1/1</id> | |
|
6 | <id>id1/2</id> | |
|
7 | <id>id2/1</id> | |
|
8 | <id>id2/5</id> | |
|
17 | 9 | </models> |
|
18 | 10 | </response> |
@@ -1,29 +1,34 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 | 7 | The node requests other node's changes list since some time (since epoch if |
|
8 | 8 | this is the start). The other node sends a list of post ids or posts in the |
|
9 | 9 | XML or JSON format. |
|
10 | 10 | |
|
11 | 11 | Protocol version is the version of the sync api. Model version is the version |
|
12 | 12 | of data models. If at least one of them is different, the sync cannot be |
|
13 | 13 | performed. |
|
14 | 14 | |
|
15 | 15 | The node signs the data with its key. The receiving node saves the key at the |
|
16 | 16 | first sync and checks it every time. If the key has changed, the info won't be |
|
17 | 17 | saved from the node (or the node id must be changed). |
|
18 | 18 | |
|
19 | 19 | Each node holds a list of networks it wants to get info from. |
|
20 | 20 | |
|
21 | 21 | Each post has an ID in the unique format: node-id/post-id |
|
22 | 22 | |
|
23 | 23 | All requests pass a request type, protocol and model versions and a list of |
|
24 | 24 | optional arguments used for filtering. |
|
25 | 25 | |
|
26 | 26 | # REQUESTS # |
|
27 | 27 | Request types: |
|
28 | 28 | * pull - pull the desired model ids |
|
29 | 29 | * get - get models by ids |
|
30 | ||
|
31 | # RESPONSES # | |
|
32 | * not supported - request is not supported | |
|
33 | * success - request was successfull | |
|
34 | * error - unexpected error |
General Comments 0
You need to be logged in to leave comments.
Login now