设计KV store based on append-only file system

看到这个题,不知道设计起来和老师讲的Memory based cache KV store有什么区别?可以按照memory的来说,然后persist data到file system吗?

题目没有太多细节,只找到这个要求:

  1. create ‍‌‍‍‌‍‍‍‍‌‍‍‍‍‌‌‌‍a file
  2. delete a file
  3. ap‍‍‌‍‌‍‌‌‌‌‌‌‌‍‍‌‌pend something to a file.

从这个要求看,并不是memory方向的

我看题目的意思是利用一个 Append-only file system (提供已有的 create, delete, append API) 实现 KV Store。跟课上讲的是不一样的。
你可以读一下 BigTable paper。BigTable 的 SSTable 就是 Append-only File.


了解。核心思想按照这个说对吗?再聊聊data partitioning, replication, consistent hashing对吧?还有什么别的特别的点吗?
其实这张图也用到memory了,那我们不能往memory based KV store上靠吗?

我不是这个意思。我是说这些 SStable 就是题意里说的 append-only file。而 Bigtable 是一个全功能的数据库,你需要实现的是 KV store,会简单一点。你就讲讲读写的时候,append-only file 会发生什么改动。
比如删除一个key的时候,需要tombstone这个key。

我觉得这里用memory的原因是为了能使得append only file sorted,同时也是的memory里面可以快速查询数据