Project

General

Profile

Task #1940

Updated by Yingdi Yu about 10 years ago

The task is to provide in-memory NDN data packet cache at the application level 

 Such a cache is desired because: 
 1) Although nfd has content store as cache, the cache is at network level. Applications is not allowed to change the content in content store. 
 2) Content store does not provide a reliable storage for NDN of data packets. Therefore application still have to keep a copy of data in case the copy in content store is ejected due to the cache policy. 

 The application cache provides "persistent" storage of data packet in memory, and also allows application to explicitly control (insert/erase) the content in the cache. 

 An ideal use case of the application cache is to put the application cache at the network entrance of application. 

 More details  
 As a result, any incoming interest will be matched against content in the cache first.  
 The interest will be handled explicitly by the application only if there is no matched data packet in the cache. 


 The cache should support four methods:  

     class ApplicationCache { 
       ... 
       void 
       insert(const Data&); 

       void 
       erase(const Name&);  
      
       shared_ptr<const Data> 
       find(const Interest&);  

       size_t 
       size(); 
       ... 
     }  

 The cache can be found at: http://redmine.named-data.net/projects/ndn-cxx/wiki/InMemoryStorage managed with several strategies. 
 The first strategy is **persistent**, with which inserted data packet will never be removed unless it is explicitly erased. 
 As a result, the cache size will increase according to the content stored inside. 
 Another category of strategies impose a fixed cache size which can be customized. 
 When the cache reaches its limit, some existing cache entries may be ejected according to the policy of each strategy.

Back