CMU15445-2023 笔记:Project 0 - Copy-On-Write Trie

LiJQLOG / 2023-08-05 / 原文

CMU15445-2023 笔记:Project 0 - Copy-On-Write Trie

In this project, you will implement a key-value store backed by a copy-on-write trie. Tries are efficient ordered-tree data structures for retrieving a value for a given key. To simplify the explanation, we will assume that the keys are variable-length strings, but in practice they can be any arbitrary type.

Task #1 - Copy-On-Write Trie

copy-on-write 是指操作并不会直接修改原来的 trie node,而是创建一个新的 node 用来修改数据,并返回新的 trie 树的 root 节点。

使用 copy-on-write 的好处在于,能够在操作完成的任意时刻,以很小的代价访问 trie 树。

img

如图所示

Task #2 - Concurrent Key-Value Store

Task #3 - Debugging

Task #4 - SQL String Functions