<div dir="ltr">Dear folks<div><br></div><div>Here is a draft outline for ndn-cxx Application Developer Guide.</div><div><div>The target audience is developers who intend to develop NDN applications with ndn-cxx library.</div><div>The document should briefly explain ndn-cxx architecture, and provide some guidance of designing producer and consumer applications.<br></div></div><div><br></div><div>Please provide your comments on what should go into the document, and what should be emphasized.</div><div>You may reply-all to this message, or post a note on <a href="http://redmine.named-data.net/issues/1581">ndn-cxx Task 1581</a>.</div><div>Markdown source file can be found on <a href="http://redmine.named-data.net/issues/1581">ndn-cxx Task 1581</a> attachment.</div><div><br></div><div>Yours, Junxiao</div><div><h1 style="color:rgb(0,0,0);font-family:'Times New Roman'">ndn-cxx Application Developer Guide</h1><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">This document describes <strong>ndn-cxx: NDN C++ library with eXperimental eXtensions</strong>, and how to develop an NDN application using the ndn-cxx library.</p><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">Introduction</h2><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>history of ndn-cxx, comparison with ndn-ccl-api</li><li>what <em>should</em> be included in ndn-cxx</li><li>what <em>should not</em> be included in ndn-cxx</li></ul><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">Application Design</h2><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">This section describes how to <em>design</em> an application that can work well with NDN architecture and ndn-cxx library.</p><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Data Naming</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>fundamental difference between NDN content distribution model and IP communication model</li><li>same content should have same Name</li><li>Data is immutable: version component</li><li>segmenting</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Interests</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>how Interest matches Data</li><li>discover names with Interest Selectors, then retrieve with predictable names</li><li>avoid abusing Selectors</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Security</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>Data carries signature</li><li>signed Interest for command</li><li>communication channel is not secured: secrets should be protected by encryption (not signed Interest)</li><li>trust management: identity, public key, certificate (more details in Security section)</li></ul><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">Application Implementation</h2><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">This section describes how to <em>implement</em> an application with ndn-cxx library.</p><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Basics</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>start a project: obtain build flags with <code>pkg-config</code>, include ndn-cxx headers, C++ namespace consideration</li><li><code>Name</code>, <code>Interest</code>, <code>Data</code> classes</li><li><code>Face</code> class, asynchronous operation, event loop</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Producer</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>prefix registration and Interest filter</li><li>in-app storage and its difference from ContentStore</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Consumer</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>Interest pipeling for segmented dataset</li><li>retransmissions</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Security</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>signing with KeyChain</li><li>verification with ValidatorConfig (more details in Security section)</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Integration with Other Components</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>Boost.Asio event loop</li><li>scheduler</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Interacting with NFD Management</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li><code>nfd::Controller</code> class and control commands</li><li>status dataset</li><li>notification stream</li><li>local control header</li></ul><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">Security</h2><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">This section explains more about security features.</p><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Concepts</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>identity, public key, certificate</li><li>TPM</li><li>PIB and PIB service</li><li>KeyChain</li><li>Validator</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Credential Management</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>select PIB and TPM with <code>client.conf</code></li><li><code>ndnsec</code> commands</li><li>publish certificates using PIB service</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Trust Model</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>hierarchical trust model, and how to validate with <code>ValidatorConfig</code></li><li>web-of-trust trust model, and how to validate with <code>ValidatorConfig</code></li><li>considerations on designing a custom trust model</li></ul><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">Library Internals</h2><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">This section describes internals of the ndn-cxx library, useful for those who want to extend the library.</p><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">TLV encoding</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>constants in <code>ndn::tlv</code> namespace</li><li><code>Block</code> and <code>Buffer</code></li><li><code>EncodingBuffer</code> and <code>EncodingEstimator</code></li><li>how to implement a TLV abstraction type</li></ul><h3 style="color:rgb(0,0,0);font-family:'Times New Roman'">Transport</h3><ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><li>interface between <code>Face</code> and <code>Transport</code></li><li>select transport with <code>Face</code> constructor</li><li>select transport with <code>client.conf</code></li><li>how to implement a transport</li></ul></div></div>