Repo Protocol Specification v02 » History » Version 14
weijia yuan, 02/14/2018 02:14 PM
1 | 11 | weijia yuan | Repo Protocol Specification v0.2 |
---|---|---|---|
2 | 3 | weijia yuan | =========================== |
3 | |||
4 | 2 | weijia yuan | A Repo supports the network by preserving content and responding to Interests requesting content that it holds. A Repo can exist in any node, and is recommended if applications in that node need to preserve data. The NDN repo protocol is a specification of repo operations including reading, insertion and deletion of data objects in repo. |
5 | |||
6 | Repo semantics is based on Signed Interests with signed components at the end of the name and basic common semantics of NDN. |
||
7 | |||
8 | When some operation of repo including insertion and deletion of data objects is requested, a command interest is sent. The command interest is the interest as command of insertion and deletion and signed as form of command interest for access control. The repo will response the command with the data object. |
||
9 | |||
10 | 1 | weijia yuan | The repo protocol can be categorized in two sections of Data packet retrieval and Data packet management. Repo-ng implements a set of repo management protocols to insert and delete data in different ways. |
11 | 3 | weijia yuan | |
12 | ## Repo Management Protocols |
||
13 | |||
14 | 12 | weijia yuan | - **[[Repo Command ]]** defines the request and response formats of commands that can insert or delete data from repo, and how these commands should be signed and authenticated. |
15 | - **[[Basic Repo Insertion Protocol ]]** defines format of insertion of a single or collection of Data packets. In addition to the basic protocol, repo-ng implements several other insertion protocols: |
||
16 | 8 | weijia yuan | |
17 | 14 | weijia yuan | |
18 | + **[[Watched Prefix Insertion Protocol]]** defines a protocol to insert continuously generated data |
||
19 | 1 | weijia yuan | + **[[Tcp Bulk Insert Repo Insertion Protocol]]** defines a simple TCP-based protocol to insert Data packets in bulk (e.g., from a producer on the same host) |
20 | 14 | weijia yuan | |
21 | 3 | weijia yuan | |
22 | 13 | weijia yuan | - **[[Repo Deletion Protocol ]]** defines format of deletion of a single or collection of Data packets under certain prefix |
23 | 3 | weijia yuan | |
24 | |||
25 | ## Data packet retrieval from repo |
||
26 | 8 | weijia yuan | |
27 | Repo registers prefixes of data objects it holds into NDN forwarding daemon and the repo will respond the data with such prefixes. |
||
28 | |||
29 | A standard interest is used to fetch content from the repo. The repo will respond when the name of the interest matches the prefix it registered in NFD. If the content in repo matches the interests, it will respond with the data object. When the interest is not matched, it will not respond. |
||
30 | |||
31 | The protocol is listed as bellow |
||
32 | |||
33 | If there is a matching data object: |
||
34 | |||
35 | Requester Repo |
||
36 | | | |
||
37 | | | |
||
38 | | Interest | |
||
39 | t1 |-------------------------->| |
||
40 | | | |
||
41 | | Data Object | |
||
42 | t2 |<==========================| |
||
43 | | | |
||
44 | | | |
||
45 | | | |
||
46 | |||
47 | If there is no matching data object: |
||
48 | |||
49 | Requester Repo |
||
50 | | | |
||
51 | | | |
||
52 | | Interest | |
||
53 | t1 |-------------------------->| |
||
54 | | | |
||
55 | | | |
||
56 | | | |
||
57 | |||
58 | |||
59 | ### About Freshness |
||
60 | |||
61 | 9 | weijia yuan | Producer needs to take care of freshness when it puts things into repo, i.e. explicitly delete obsolete content. The `MustBeFresh` selector will be ignored by repo when fetching content from repo or handling repo command by repo. |