[Ndn-interest] how to set freshnessSecond?

Steve DiBenedetto dibenede at cs.colostate.edu
Wed Jul 29 19:15:40 PDT 2015


On Wed, Jul 29, 2015 at 7:58 PM, ndn ndn <ndn at sqh.me> wrote:

> Hello everyone,
> I'm using NDN-CCL to writing a NDN application. But I find a problem about
> data cache.
> In NDN network ,all data can store in CS.But in my application,some
> content always changing in 5 seconds,so I think setting a freshnessSecond
> will help me solve this problem.
> I try to setMustBefresh value,but it not works.The app also receive the
> cached value.
> But in NDN-CCL,I didn't find any method to set this?how to set it?
>
> hope you give me some reply.
>
> thanks.
>
> _______________________________________________
> Ndn-interest mailing list
> Ndn-interest at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest
>
>
Please correct me if I'm wrong, but it sounds like you're trying to ensure
the retrieving application always gets the latest data.

"Must be fresh" tells NDN nodes to to return Data that have not yet
expired. Data with a freshness period of 5 seconds will satisfy a "must be
fresh" Interests for 5 seconds. The timer is with respect to when the Data
arrived at the node.

Depending on the details of your application, you can try a couple things:

  1. Set a conservative freshness period (e.g. 1 second).  This will result
in more Interests reaching the publisher, but mitigate stale Data retrieval.
  2. Minimize the freshness period (e.g. 0 ms) so that the content is
effectively never fresh.

You can combine either approach with the CCL's publisher cache:
http://named-data.net/doc/ndn-ccl-api/memory-content-cache.html . Your
application can insert Data packets into this application content cache and
then query it as Interests arrive. Note, you may need to set the cleanup
timer value to something big to prevent it from removing the technically
stale Data packets. However, this should simplify the publisher's
implementation and keeping your consumers up to date.

Hope that helps,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20150729/f79d39e8/attachment.html>


More information about the Ndn-interest mailing list