Project

General

Profile

Task #1581 ยป ndncxx-app-devguide_20140909.md

Junxiao Shi, 09/09/2014 01:47 PM

 

ndn-cxx Application Developer Guide

This document describes ndn-cxx: NDN C++ library with eXperimental eXtensions, and how to develop an NDN application using the ndn-cxx library.

Introduction

  • history of ndn-cxx, comparison with ndn-ccl-api
  • what should be included in ndn-cxx
  • what should not be included in ndn-cxx

Application Design

This section describes how to design an application that can work well with NDN architecture and ndn-cxx library.

Data Naming

  • fundamental difference between NDN content distribution model and IP communication model
  • same content should have same Name
  • Data is immutable: version component
  • segmenting

Interests

  • how Interest matches Data
  • discover names with Interest Selectors, then retrieve with predictable names
  • avoid abusing Selectors

Security

  • Data carries signature
  • signed Interest for command
  • communication channel is not secured: secrets should be protected by encryption (not signed Interest)
  • trust management: identity, public key, certificate (more details in Security section)

Application Implementation

This section describes how to implement an application with ndn-cxx library.

Basics

  • start a project: obtain build flags with pkg-config, include ndn-cxx headers, C++ namespace consideration
  • Name, Interest, Data classes
  • Face class, asynchronous operation, event loop

Producer

  • prefix registration and Interest filter
  • in-app storage and its difference from ContentStore

Consumer

  • Interest pipeling for segmented dataset
  • retransmissions

Security

  • signing with KeyChain
  • verification with ValidatorConfig (more details in Security section)

Integration with Other Components

  • Boost.Asio event loop
  • scheduler

Interacting with NFD Management

  • nfd::Controller class and control commands
  • status dataset
  • notification stream
  • local control header

Security

This section explains more about security features.

Concepts

  • identity, public key, certificate
  • TPM
  • PIB and PIB service
  • KeyChain
  • Validator

Credential Management

  • select PIB and TPM with client.conf
  • ndnsec commands
  • publish certificates using PIB service

Trust Model

  • hierarchical trust model, and how to validate with ValidatorConfig
  • web-of-trust trust model, and how to validate with ValidatorConfig
  • considerations on designing a custom trust model

Library Internals

This section describes internals of the ndn-cxx library, useful for those who want to extend the library.

TLV encoding

  • constants in ndn::tlv namespace
  • Block and Buffer
  • EncodingBuffer and EncodingEstimator
  • how to implement a TLV abstraction type

Transport

  • interface between Face and Transport
  • select transport with Face constructor
  • select transport with client.conf
  • how to implement a transport
    (1-1/1)