(Replying to PARENT post)

It would be great to see a walkthrough writing a minimal btree from scratch with reading/writing from disk.

If you've got one (walkthrough with code, not just an existing implementation), link it please!

๐Ÿ‘คeatonphil๐Ÿ•‘4y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

This incomplete tutorial is about how to write a sqlite clone, with particular emphasis on how to implement the underlying b-tree: https://cstack.github.io/db_tutorial/
๐Ÿ‘คspanspan๐Ÿ•‘4y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

I just implemented one in go, working on the repl now. I plan to eventually write it in C++ for a real database, but Iโ€™m doing this for my team to teach them the difference between LSM trees and Btrees. Iโ€™m hoping to show that a specialized concurrent btree, though harder to write, performs better than LSM trees for the same data. Maybe Iโ€™ll make a blog post about it.

EDIT: For more context, this is for time series metrics, so super specialized data.

๐Ÿ‘คcraigching๐Ÿ•‘4y๐Ÿ”ผ0๐Ÿ—จ๏ธ0