by MichaelGG · 13y ago · 0 comments
Isn't the key insight just using a couple layers of ISAM? Create ISAM index, save. Repeat for as many levels as you find useful. Top-level pages are almost always in RAM, so almost all index lookups require only a single seek. Toss in a nice compression library and you've got a fairly tight system.
Not to say it isn't nice to have a standard format and library to implement such things. It just seems that everything's just a variation on things developed in the 70s.
1: I made each index contain a pair of 64-bit ints, allowing me to reasonably index a wide variety of values and point to the likely chunk file. As the keys and values are ordered, I could get by with easy-to-implement delta compression only. The indexes only point to a chunk, so many packets shared a single entry. In production, it came out to about 2.8bits/packet (down from a few 8-byte hash values).
Here's my admittedly poor KV implementation: https://github.com/MichaelGG/cidb/tree/master/CiDB
But sorry, I strongly disagree in that everything is a variation on things from 70's: during these good old years, the memory hierarchy was far simpler than nowadays, and having to deal with that introduces a great amount of complexity in libraries that are designed to get most out of modern computers.
I agree the hardware is quite different, vastly more complex.