Why DragonflyDB uses B+ Trees to implement Sorted Set instead of Skiplist like Redis?

preview_player
Показать описание


### Other links

CS Engineering and Software Development books that I have read

Research papers that I have read

Until next time, stay awesome :)

Yours truly,
Arpit
#AsliEngineering
Рекомендации по теме
Комментарии
Автор

Cool. I will start learning DSA after this video.

SrikanthReddyKaram
Автор

Beautiful video Arpit but I didn't get ZADD command part, what is that command?

imhiteshgarg
Автор

Great video! I'm curious about what the cons are with the B+ Tree approach for sorted lists. Are there no tradeoffs? We talk about ZADDs here, but I'd assume ZRANGE would also have similar performance gains. Is that the case?

On a different note:
An observation of skip-trees.
The fundamental idea of "traversal" seems to be similar to fenwick tree. Of course, fenwick tree is more like a prefix-sum tree data structure. With a fixed number of "levels" that is determined by the number of elements in the list. It'll always have log2(n) levels.
But with skip trees, the "levels" is a tunable factor, a tradeoff between node memory overhead and ops to find the node.

Different purposes, but the traversal mechanism is very similar.

ramnewton
Автор

I have one doubt, in B+ tree will there be no overhead of pointers to store the neighbours info, and also pointers for storing the branches information?

TECH_KG
Автор

B+ trees work best when we know fixed size data to be stored, but if update happens and the new data doesn't fit in its own leaf node, it will take up space from next leaf node and tree has to balanced

shubhamdebnath
Автор

What's the disadvantage? Why doesn't Redis use this?

rjarora
Автор

In one leaf node 256 entries can be fitted, sounds confusing

Amansharma-zjse