<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Junxiao,<br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Just two quick comments about in-app storage.</div><div><br></div><div>On Sep 9, 2014, at 9:50 PM, Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>> wrote:</div></div></span></span></div><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><h2 style="font-family: 'Times New Roman';">In-App Storage</h2><p style="font-family: 'Times New Roman'; font-size: inherit;"><a href="http://redmine.named-data.net/projects/ndn-cxx/wiki/InMemoryStorage">In-App Storage</a> provides an application-controllable Data storage within the application. The module is typically provided by the library.</p><p style="font-family: 'Times New Roman'; font-size: inherit;">Benefits:</p><ul style="font-family: 'Times New Roman'; font-size: inherit;"><li>keep the forwarder simple</li><li>application has a chance to inspect the Data again before using it to satisfy incoming Interest</li></ul><p style="font-family: 'Times New Roman'; font-size: inherit;">Drawbacks:</p><ul style="font-family: 'Times New Roman'; font-size: inherit;"><li>duplication: when a Data packet is used to satisfy an Interest, it would have copies in both In-App Storage and ContentStore</li></ul></div></div></blockquote><div>This can be solved if app can tell nfd not to cache the data. Given this only happens on a localhost, it can be done by extending the local control header. Although there are some encoding/decoding overhead, we do not have change the architecture.</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><ul style="font-family: 'Times New Roman'; font-size: inherit;"><li>risk of Data loss: when a Data packet is used to satisfy an Interest, if application chooses to delete the copy in In-App Storage, the Data would be lost when the copy in ContentStore is evicted</li></ul></div></div></blockquote></div><div>As the producer of the data packet, the app should be responsible for taking care of its own data. If the app wants to keep the data persistently available, it should look for some persistent storage service for that purpose, rather than relying on nfd. If the producer decides to discard a data packet, then there is no point for local ContentStore to keep it.</div><div><br></div><div>Yingdi</div><br></body></html>