Hello all,

Hope you're all doing great !

This is the 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 :

   1. *Hash table :*
      1. create_ht
      2. insert_ht
      3. lookup
      4. delete_ht
      2. *Min heap : *
      1. insert
      2. pop

During the first week, I improvised on my code and also *added a
makefile*for easy compilation by referring to [3].

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 [1] and
[2]. 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.

*Work for next week : *

I figured out that I would also need to copy the hash table also onto the
memory and am going to be working on this for the next week. I will also
improvise on my code.

You can view my code at [4]. You can find my blog post at [5].

Regards,
Savita.

*Links : *

References :

[1] useless-factor.blogspot.it/2011/05/why-not-mmap.html
[2] http://linux.die.net/man/2/mmap
[3] http://mrbook.org/tutorials/make/


[4] Github repo : https://github.com/tssavita/cache-plugin-implementation
[5] Blog post :
http://savita92.wordpress.com/2014/05/26/gsoc-2014-update-caching-plugin-week-1/
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to