Live data from Hacker News

Show HN: On-disk B+ tree for Python 3

github.com

21–22 of 22 posts

Re: Show HN: On-disk B+ tree for Python 3

#21
post #19

How does this perform compared to sqlite3? And and can you use keys that aren't builtin values?

It is possible to use your own key if it has a natural order and you write your own simple serializer: https://github.com/NicolasLM/bplustree/blob/master/bplustree...

Re: Show HN: On-disk B+ tree for Python 3

#22

This is pretty cool. As I was reading the code I really wished for an explanation or simple ASCII diagram of the serialization formats for the various node/record types, as well as for the frames/wal format. Given that the poster is the author of the project, I hope you'll consider filling in these kinds of details, as they'd presumably be of interest to the people you're "Show"-ing this to.

Thank you. I know what you mean, I'm not happy with how the serialization is done right now, it's too complicated.

Maybe someone on HN knows a Python serialization library beyond pickle that would allow to describe how the data is laid out and take care of the rest. It looks like struct is not flexible enough for this usage.

Post reply on HN