32 have a chance to get the stale data from the cache. That’s why, in equation 3.5, replacement time is smaller than expire time of the cache.
Chapter 4
33 Table 4.1 is just the example of how the lifetime is assign to the content name for evaluate in Producers. When the interest is received by producer in the condition of no cache in all routers in first stage, producer has to send back the data in reversed path to the consumer. In normal traditional Lease, producer only provide the data to the next step. But in our proposed lease, the producer has to evaluate the lifetime of the content to provide expire time (Lease Time) of the content.
Figure 4.1 Producer and the net device face how to operate for proposed Lease
Interest
Data?
Content Type
Calculation of Exptime Data
Content with exptime value
Create Tag Data Packet
Set exptime to tag
Producer
Net-Device-Face
34
4.3. Simulation Challenges with Content Store
.
Figure 4.2 To store expire time in CS, on Receiving Data
Figure 4.3 To get expire time in CS, on Outgoing Data
On Receiving Data
Data Copy With Data
Data Expire Time
value CS
Data Exptime
Data Packet with exptime Tag
Set exptime in Tag CS
35 Content store also has to save expire time when the data is insert to invalid the content. If there is another request come to it, cache is already. So, it will provide the cache and expire time for the next cache. Next cache router also has to save this expire time value for the cached content. This is shown in fig 4.2 and 4.3
In this way, all of the caches can hold expire time for each contents respectively and can be invalid at the same time for each contents.
4.4 Simulation Challenges of Discard entry and Replace the cache
Additional part for our proposed lease is that to discard the content whose expire time is expire from the CS. This is described in figure 4.4 according to equation (3.4).
Figure 4.4 Producers to discard the CS entry whose content is expire
Check CS Exp time is expire?
Discard this Entry
No
Yes Start
36 In figure 4.4, we check expire time of the content, if it is expire, discard it from the CS. By this way, we can get the place to save the new content. That makes the cache effectively used.
Another additional solution is for replacement when the new content is need to cache in the CS and CS is full. In that case, one of the caches will be replaced to save the new content. It is to search the smallest expire time value in whole CS entry in first. The smallest expire time is means that one will be expire soon than the others.
And replace with the new content that has to cache. By this way cache can be used effectively.
Figure 4.5 Producers to replace the CS entry Replace
this Entry Start
Check entire CS (the smallest one in expire
time)
Smallest expire time from CS
37
4.5 Algorithm for Overall Operation
Producer : For each interest
Set Lifetime according to Content Types Check data
Send data
Calculate Exptime
Net-Device-Face
Make packet for data Attach Tag to data packet
Call function -calculate Exptime- Set Exptime to tag
Content Store: For each entry
Create CS table (Exptime)
Forwarder: On Receiving Data Data Copy with Packet Entry to CS table (Exptime) :On Outgoing Data
Set Exptime to tag Send data packet with tag
Replacement: For each Replacement While (whole Cs entry) do
If Exptime=simulator now ( ) THEN Discard this entry
Algorithm
38 Figure 4.5. Algorithm for Overall Operation
4.6 Evaluation Results for the Proposed Lease
In the original lease, the producer has to maintain the lists of all caches and lease time that means when the cache is expire. So the producer needs memory space to save this information. It will be significant when the network is large. If the number of router is higher, the requirement of memory space will be large. But in our proposed lease, the producer send the data with expire time. Therefore, the producer no needs to save list of caches and also the time. All of the caches can invalid with
ELSE
While (whole CS entry) do Temp(first exptime entry of CS) For CS entry start to end
If Temp < exptime CS entry THEN Temp = exptime CS entry
Discard this entry Else go to next Cs entry END IF
END FOR END WHILE END IF END WHILE
Algorithm
39 expire time that the producer provided. So requirement of producer’s memory can be eliminated.
As a second, in the original lease, the producer has to send invalidation messages to all the caches. And also all of the caches have to reply back these messages before updating the content in the producer. So there will be overhead messages and it make the network load to high. If one of the caches can’t reply messages, the producer has to wait till this cache expires. This makes delay in updating of content in the producer. But in our proposed lease, all the caches can expire with expire time. So the producer no needs to send the invalidation messages to all the caches and no needs to wait reply from all these caches. Therefore, no overhead messages and no delay time for updating the content. This also can reduce the network load between the server and the caches.
40