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