Task #2610
closedDefine Sync Update format
Added by Anonymous over 9 years ago. Updated over 9 years ago.
0%
Description
- What information do Sync Update messages contain?
- Determine encoding format
Updated by Anonymous over 9 years ago
- Blocks Task #2611: Implement Sync Update Executor added
Updated by Chengyu Fan over 9 years ago
Steve DiBenedetto wrote:
- What information do Sync Update messages contain?
In ChronoSync library, the sync update messages help applications learn what is missing.
The missing data info (session name, sequence number range) is given in a callback function as parameter upon the sync messages. Then the code decides whether to fetch the missing data, and what should be fetched.
When a catalog fetches the data from others, it needs to know which file is added, updated, or deleted. Therefore, the published data must contain the file name, the corresponding actions.
- Determine encoding format
In detail, the format for the published data should contain the protocol version of the message, a list of files (each contains the file name, action).
Since the file name length and the number of files is variable, I'd like to use json format. The schema can be:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Catalog sync update",
"type": "array",
"items": {
"title": "SyncUpdate",
"type": "object",
"properties": {
"fileName": {
"description": "NDN name URI"
"type": "string"
},
"action": {
"description": "action for the file"
"type": "string"
}
},
"required": ["fileName", "action"]
}
}
Updated by Anonymous over 9 years ago
Can action be limited to a specific set of values in the schema? Also, this should be defined in a wiki page and linked from here (and the main wiki page).
Updated by susmit shannigrahi over 9 years ago
I think the names should be consolidated based on the actions.
something like:
action: "Insertion"{
fileList:{
numNames: 2,
listNames:["uriA", "uriB"]
}
}
Updated by Chengyu Fan over 9 years ago
- Assignee set to Chengyu Fan
When we have consensus, I'll put the schema to wiki.
Below is the new schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Catalog sync update",
"type": "object",
"items": {
"title": "SyncUpdate",
"type": "object",
"properties": {
"insert": {
"description": "inserted NDN name URIs",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"delete": {
"description": "deleted NDN name URIs",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"required": []
}
}
I didn't include the update section, because I don't quite sure what we are trying to update? The version?
Just had a short discussion with Susmit, he thought we might need to update metadata in the future.
@Steve, do you have any ideas?
Updated by Anonymous over 9 years ago
What update section? We only support add/remove.
Metadata won't be sync'd directly. I'm not sure if we need to explicitly name the metadata. Can we just infer the name from what's added/removed?
You should probably name the fields add/remove rather than insert/delete. There's a relevant point in the style guide.
Also, you should an email to ndn-csu asking for review.