<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div><br>
</div>
<div>Hi Junxiao,</div>
<div><br>
</div>
<div>Thanks for this.</div>
<div><br>
</div>
<div>I'd propose that the specification of <i>how all libraries must/should operate</i> be separated from the specifics of developing using ndn-cxx.  This would help immensely in NDN-CCL development, for example, where APIs, data types, and even application
 interaction may differ from ndn-cxx, but certain important functionality must be the same.</div>
<div><br>
</div>
<div>I'm not exactly sure where the line should be drawn between spec and ndn-cxx approach, but have
<span style="background-color: rgb(255, 251, 0);">highlighted</span> a few things below that I'd suggest  could
<i>mostly</i> described in a spec and then referenced / expanded upon in the developer guide.</div>
<div><br>
</div>
<div>As an aside, now that NFD has reached its first major milestone, I'd also like to encourage the many developers engaged for that effort to consider contributing functionality and documentation to NDN-CCL as well. </div>
<div><br>
</div>
<div>Jeff</div>
<div> </div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>><br>
<span style="font-weight:bold">Date: </span>Tue, 9 Sep 2014 13:45:19 -0700<br>
<span style="font-weight:bold">To: </span>"<<a href="mailto:nfd-dev@lists.cs.ucla.edu">nfd-dev@lists.cs.ucla.edu</a>>" <<a href="mailto:nfd-dev@lists.cs.ucla.edu">nfd-dev@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>[Nfd-dev] ndn-cxx devguide outline<br>
</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<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>
</div>
</div>
</blockquote>
</span>
<div><br>
</div>
<div><b style="background-color: rgb(255, 251, 0);">None of these sections are specific to ndn-cxx, and should probably not be written in a library specific manner.</b></div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div>
<h3 style="color:rgb(0,0,0);font-family:'Times New Roman'"><span style="background-color: rgb(255, 251, 0);">Data Naming</span></h3>
<ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">
<li><span style="background-color: rgb(255, 251, 0);">fundamental difference between NDN content distribution model and IP communication model</span></li><li><span style="background-color: rgb(255, 251, 0);">same content should have same Name</span></li><li><span style="background-color: rgb(255, 251, 0);">Data is immutable: version component</span></li><li><span style="background-color: rgb(255, 251, 0);">segmenting</span></li></ul>
<h3 style="color:rgb(0,0,0);font-family:'Times New Roman'"><span style="background-color: rgb(255, 251, 0);">Interests</span></h3>
<ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">
<li><span style="background-color: rgb(255, 251, 0);">how Interest matches Data</span></li><li><span style="background-color: rgb(255, 251, 0);">discover names with Interest Selectors, then retrieve with predictable names</span></li><li><span style="background-color: rgb(255, 251, 0);">avoid abusing Selectors</span></li></ul>
<h3 style="color:rgb(0,0,0);font-family:'Times New Roman'"><span style="background-color: rgb(255, 251, 0);">Security</span></h3>
<ul style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">
<li><span style="background-color: rgb(255, 251, 0);">Data carries signature</span></li><li><span style="background-color: rgb(255, 251, 0);">signed Interest for command</span></li><li><span style="background-color: rgb(255, 251, 0);">communication channel is not secured: secrets should be protected by encryption (not signed Interest)</span></li><li><span style="background-color: rgb(255, 251, 0);">trust management: identity, public key, certificate (more details in Security section)</span></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>
</div>
</div>
</blockquote>
</span>
<div><span style="background-color: rgb(255, 251, 0);">The techniques here could be in a recommendations sections of a spec or some other type of design focused document?</span></div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div>
<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><span style="background-color: rgb(255, 251, 0);">Interest pipeling for segmented dataset</span></li><li><span style="background-color: rgb(255, 251, 0);">retransmissions</span></li></ul>
</div>
</div>
</blockquote>
</span>
<div><span style="background-color: rgb(255, 251, 0);">The techniques here could be in a recommendations sections of a spec or some other type of design focused document?</span></div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div>
<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>
</div>
</div>
</blockquote>
</span>
<div><span style="background-color: rgb(255, 251, 0);">The APIs to NFD should be documented separately in a specification for any library to be written to.</span></div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div>
<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><span style="background-color: rgb(255, 251, 0);">identity, public key, certificate</span></li><li>TPM</li><li>PIB and PIB service</li><li>KeyChain</li><li>Validator</li></ul>
</div>
</div>
</blockquote>
</span>
<div><span style="background-color: rgb(255, 251, 0);">I could go both ways on these – if these are considered "architectural" components, they need to be in a spec that is not ndn-cxx specific.  </span></div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div>
<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>
_______________________________________________ Nfd-dev mailing list <a href="mailto:Nfd-dev@lists.cs.ucla.edu">
Nfd-dev@lists.cs.ucla.edu</a> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev">
http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev</a> </blockquote>
</span>
</body>
</html>