Skip to content

NDN Repo Server

Jonny Kong edited this page Nov 21, 2019 · 3 revisions

NDN-Repo server daemon can be started with systemd, and exposes the following API:

Insert

The Insert command instructs NDN-Repo to fetch Data packets. It has the following name:

/<repo_prefix>/insert/<RepoCommandParameter>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>

The following parameters are used in the Insert command:

  • name: Data prefix to insert
  • start_block_id: Fetch sequential data starting from start_block_id. If start_block_id is not present, it is set to 0
  • end_block_id: Fetch sequential data until end_block_id. If end_block_id is not present, fetch continuously until number of failures exceeds a threshold

After NDN-Repo receives an Insert command, it will send back a response carrying a status code, along with a randomly generated process_id which identifies this insert process.

Insert Check

The Insert Check command checks whether a previous Insert process has completed. It has the following name:

/<repo_prefix>/insert check/<RepoCommandParameter>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>

The following parameters are meaningful in the Insert Check command:

  • process_id: The insert process ID to check

After NDN-Repo receives an Insert Check command, it will return a response carrying a status code.

Delete

The Delete command instructs NDN-Repo to delete Data packets. If has the following name:

/<repo_prefix>/delete/<RepoCommandParameter>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>

The following parameters are used in the Delete command:

  • name: Data prefix to delete
  • start_block_id: Delete sequential data starting from start_block_id. If start_block_id is not present, it is set to 0
  • end_block_id: Delete sequential data until end_block_id. end_block_id is required

After NDN-Repo receives a Delete command, it will send back a response carrying a status code, along with a randomly generated process_id which identifies this delete process

Delete Check

The Delete Check command checks whether a previous Delete process has completed. It has the following name:

/<repo_prefix>/delete check/<RepoCommandParameter>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>

The following parameters are meaningful in the Delete Check command:

  • process_id: The delete process ID to check

After NDN-Repo receives an Delete Check command, it will return a response carrying a status code.

TCP Bulk Insertion Protocol

NDN-Repo listens on port 6367. Clients can establish a TCP connection, and transfer multiple Data packets over this connection.

Data Fetching

Clients can fetch Data packets stored in NDN-Repo using ordinary Interests.

Clone this wiki locally