[ndnSIM] Implementing My Own Cache Policy
Kanin Assantachai
kanin at inl.ics.keio.ac.jp
Fri Mar 6 01:09:45 PST 2015
Hello all,
After I have read through documentations of ndnSIM 1.0, especially the
source codes of the provided basic cache policies, I have some questions
about them as well as questions about trying to create my own cache
policy as follows.
1. Referring to the source code of LRU policy (lru-policy.h), what are
the roles (functions) of codes from line 39 to line 47? I have crossed
check with the code of empty policy (empty-policy.h) and I found that
such codes are not necessary for the case of policy that does not
implement any algorithm.
2. From line 89 to 96 of the same file (lru-policy.h), the "lookup"
function is implemented there. Why doesn't it handle the case of cache
miss? Based on the code, it seems to me that this case is not handled at
all.
3. It seems to me that the "policy_container" in the code serves as a
cache storage (list). In that case, how can I check for the list of
available functions I can call? I wonder if there are functions I can
use to access specific orders of cached objects in the list. Is there a
way to set IDE to automatically display a list of possible related
functions?
4. This question is about the policy I would like to implement. How can
I make nodes automatically send messages about some of the contents of
their stored cache objects to next neighbor nodes? Is it better to
implement this detail in the same cache policy file or different files
at different levels? Please kindly provide some suggestions.
Thank you for your responses in advance.
Kanin Assantachai
More information about the ndnSIM
mailing list