3 ms·
> A key-value-store (KVS), aka hashtable, is a database used for storing and retrieving data associated with a key. They are frequently used to cache data. Some
by eatonphil 3y ago
> A key-value-store (KVS), aka hashtable, is a database used for storing and retrieving data associated with a key. They are frequently used to cache data. Sometimes they run on the same machine as the client application. Sometimes they are accessed over the network. Software examples include Memcached and Redis.
Just to clarify there, many key value stores are not hash tables but btrees or LSM trees. One reason not to use hashtables is that you can't do efficient prefix scans since hashtables aren't sorted. Though it's possible redis and memcached do use a hashtable. Rocksdb/Leveldb, and pebble use LSM trees. Berkeleydb allows you to use a btree or hashtable.
- jakemoroni 3y ago> many key value stores are not hash tables Yep. In fact, in an FPGA, you can even have true TCAM/CAMs (content addressable memory). https://www.xilinx.com/products/intellectual-property/ef-di-cam.html https://www.xilinx.com/products/intellectual-property/ef-di-...
- luma 3y agoCAM has always interested me, it’s used in network gear for fast MAC lookups and in modern CPUs for functions like the TLB. It feels like it could also be applied to some application logic if only it was accessible to the app layer.
- eatonphil 3y agoI'm missing the connection you're making. What is the implication of content addressable memory here?
- kevin_nisbet 3y agoI suspect it's that if you have a CAM/TCAM, the layout of the data in this memory is less dependent on algorithms meant for fast lookups. As in, if I search all the memory in a single cycle for a match anyways, it's other properties of the memory layout that become far more important.
- deleted 3y ago[deleted]