Project

General

Profile

Watched Prefix Insertion Protocol » History » Version 1

Weiqi Shi, 07/24/2014 01:04 AM

1 1 Weiqi Shi
Watched Prefix Insertion Protocol
2
=================================
3
Watched Prefix is a new protocol for repo insertion. By using this protocol, repo keep sending interests to request the data with same prefix. When a data packet is received, repo will update selectors (exclude selector in most cases) to exclude the received data and request new one. Repo will stop watching the prefix until a command interest in tell it to stop, the total amount of sent interests reaches a specific number or time out.
4
5
## Basic operations
6
7
### Keep requesting and inserting data with same prefix
8
9
Command verb: **watch**
10
11
The name semantics follows the format of the repo command. The <command verb> is defined as ``watch``.
12
For example, for ``<repo prefix>`` as ``/ucla/cs/repo``, the following is an example:
13
14
    /ucla/cs/repo/watch/<RepoCommandParameter>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>
15
16
### Watch status check
17
18
Command verb: **watch check**
19
20
During the watched prefix progress, requester could send watch status check command to check the status of the progress. This status check command is also signed interest. The semantics of watch status check command is shown as follows:
21
22
<command verb> equals to ``watchCheck``. For example:
23
24
    /ucla/cs/repo/watchCheck/<RepoCommandParameter>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>
25
26
## Formats
27
28
### RepoCommandParameter
29
30
The following components are used in watch-prefix command
31
32
* ``Name``
33
* ``Interest timeout``
34
* ``Max number of Interest``
35
* ``Watching timeout``
36
* ``Status``
37
* ``Selectors``
38
* ``ProcessId``
39
40
Name is the prefix that will be watched.
41
42
Interest timeout is the maximum latency between interest sent and data received. If the time duration is larger than interest timeout, the same interest will be resent. If data is received within the Interest timeout, the selectors of the interest will be updated and sent to request new data.
43
44
Max number of Interest is the maximum of total interests that can be sent. The process will stop if the total number of interests reaches this limit.
45
46
Watching timeout is the time duration of this process. Repo will keep watching the prefix until it times out.
47
48
Status is used to show whether repo is watching a prefix or not. 
49
50
ProcessId shows the id number of this command interest, a random number generated by repo.
51
52
Selectors are used to exclude the received data and request new data.
53
54
For watchCheck command interest, only ProcessId is needed.
55
56
### RepoCommandResponse
57
58
This watch status data object could be the response data object of both watch command and watchCheck command. It will follow the format of repo command response.
59
60
Response has three part: ProcessId, indicates an ID of process;  InsertNumber, indicates how many data packets under the watched prefix has been inserted into repo; 
61
StatusCode, indicates the status of repo,