This is my first week’s update on my GSoC Project – Developing a caching plugin for Monkey server.
During the community bonding period, I had started coding some of the basic data structures that would be required for the caching plugin, such as the hash table for lookup of a resource and a min heap for the deletion of the file that has been used the least number of times. Since these are independent structures from the code, I decided to get started with these. I had done a very simple implementation of these.
Work done this week :
The designed and coded are the functions that I added :
- Hash table :
- Min heap :
During the first week, I improvised on my code and also added a makefile for easy compilation by referring to .
I then concentrated on reading up more about linux system calls that would enable memory copying of files in the cache. My mentor, Eduardo suggested that I try using mmap () for this purpose. mmap is basically a linux system call, an interface, that can be used to map files onto the virtual memory of the process that calls it. You can read more about it at  and . I tried out mapping files using mmap function.
Problem faced :
I had some problems with the makefile and also the delete function of hash table. However I fixed both these problems. You can view my code at .
Work for next week :
I figured out that I would also need to copy the hash table also onto the memory. So I am going to be working on that for the next week. I will also improvise more on my code.