Sync » History » Version 1
Chengyu Fan, 06/11/2015 10:44 AM
1 | 1 | Chengyu Fan | # Sync |
---|---|---|---|
2 | |||
3 | The sync update messages are triggered by the catalog. It publishes update data through ChronoSync library. The ChronoSync library will generate and handle the sync messages. Then the other catalogs are notified to fetch the update data. |
||
4 | |||
5 | Catalog supports two types of data operations: add, remove. The initiator must encode the update data as a JSON object, with the format: { "add": [NDNname1, NDNname2], "remove":[NDNname3, NDNname4]}, where the "add" and "remove" are operation names. |
||
6 | |||
7 | ## Update data schema |
||
8 | |||
9 | ``` |
||
10 | { |
||
11 | "$schema": "http://json-schema.org/draft-04/schema#", |
||
12 | "title": "catalog update", |
||
13 | "type": "object", |
||
14 | "properties": { |
||
15 | "add": { |
||
16 | "description": "NDN name URIs to be added", |
||
17 | "type": "array", |
||
18 | "items": { |
||
19 | "type": "string" |
||
20 | }, |
||
21 | "uniqueItems": true |
||
22 | }, |
||
23 | "remove": { |
||
24 | "description": "NDN name URIs to be removed", |
||
25 | "type": "array", |
||
26 | "items": { |
||
27 | "type": "string" |
||
28 | }, |
||
29 | "uniqueItems": true |
||
30 | } |
||
31 | }, |
||
32 | "required": [ |
||
33 | "add", |
||
34 | "remove" |
||
35 | ] |
||
36 | } |
||
37 | ``` |