I am looking to write a Key/value store (probably in python) mostly just for experience, and because it\'s something I think that is a very useful product. I have a couple of qu
It all depends on the level of complexity you want to dive into. Starting with a simple Python dict
serialized to a file in a myriad of possible ways (of which pickle is probably the simplest), you can go as far as implementing a complete database system.
Look up redis
- it's a key/value store written in C and operating as a server "DB". It has some good documentation and easy to read code, so you can borrow ideas for your Python implementation.
To go even farther, you can read about B-trees.
For your specific questions: above some DB size, you can never keep it all in memory, so you need some robust way of loading data from disk. Also consider whether the store is single-client or multi-client. This has serious consequences for its implementation.