How can I make the creation of an efficient keystore (like memcache) / simple database?
For several projects that I am working on, I need a persistent key store (something similar to memcache). It works perfectly as a server; it must be really effective. I know memcachedb exists, but I would like to write it myself as there will be many custom functions that I will need to include later. I'll probably write this in C ++ (or perhaps C or Java if there is every reason to do so).
Should I be looking for a database implementation (B-trees, indexes, etc.) or is it unnecessary for this kind of work? What would be a good way to keep most of the content on disk, but have quick access to it using memory for caching?
Thanks.
a source to share
There are many key value stores out there, from tried and true BDB to hip Tockyo Cabinet . If you must implement your own, I would recommend checking the Varnish sources, especially Architecture .
a source to share
Don't reinvent the wheel.
You will become a storage user. That is, your main concerns are business logic and might be the user interface, not the details of how the database works. Leave that to the DB developers. Focus on your main task.
For example, try using HBase (Google Bigtable analog).
a source to share