Settings

Theme

Show HN: Dbeel – A distributed thread-per-core db

github.com

73 points by tontinton 2 years ago · 16 comments · 1 min read

Reader

For a while now I had the urge to learn how to pick the "right" database for projects, I looked around online at different databases to try to understand their different traits, and was bombarded with marketing instead of actual info on the advantages and drawbacks.

The only solution for me was to learn some database internals (I read the wonderful book written by Alex Petrov), and the problems seemed so interesting, I could not fight the urge and went ahead with trying to write my own db.

Anyway, ~9 months have passed and I feel like I'm "done", I have learned a ton, and really proud of dbeel.

Now I can pick a database and way more easily understand what are its most defining traits.

Some short time in the future, I will release a blog post or something, where I will write about the fundamental problems you need to solve when writing a performant data system like a database, so stay tuned :)

henry_bone 2 years ago

"dbeel" sounds like the Russian word for (approx.) moron.

avinassh 2 years ago

Can you elaborate on how does thread per core work in context of the database and how/why it is beneficial

  • refset 2 years ago

    This post on Glommio is insightful - "Glommio is a cooperative thread-per-core crate for Rust & Linux based on io_uring": https://www.datadoghq.com/blog/engineering/introducing-glomm...

    The key insight being that in this model "locks are never necessary", which is huge source of efficiency when working with sharded data across multiple cores.

    > Thread-per-core architectures are friendly to modern hardware, as their local nature helps the application to take advantage of the fact that processors ship with more and more cores while storage gets faster, with modern NVMe devices having response times in the ballpark of an operating system context switch.

dabber 2 years ago

> Some short time in the future, I will release a blog post or something, where I will write about the fundamental problems you need to solve when writing a performant data system like a database, so stay tuned :)

Please do!

quickthrower2 2 years ago

Well done! Someone will use this in prod. Just make sure the defaults are secure :-)

adhamsalama 2 years ago

I started reading that book this month, and I too want to write a database.

Did you finish the entire book then write it, or did you do it chapter by chapter?

elwell 2 years ago

Drop the "is an attempt to learn". It's more trustworthy.

  • soulofmischief 2 years ago

    I think it's more trustworthy that the author is honest in their intentions, not less. As they say in the repo, "It's not production ready at all".

    • elwell 2 years ago

      To clarify, I was quoting from the first line of the repo README. I think it's a turn-off if that's the first thing you read about the project.

      • dabber 2 years ago

        > To clarify, I was quoting from the first line of the repo README. I think it's a turn-off if that's the first thing you read about the project.

        A turn off from what, exactly? IMO it does a great job of quickly setting the context of what you are looking at before describing why you might care:

        > It's not production ready at all, but that doesn't mean there is no value in the project. If you ever wanted to read database code without getting overwhelmed by massive amounts of code, dbeel is for you.

  • oytis 2 years ago

    Reminds me of how Linus introduced Linux for the first time. I miss the times when self-inflation wasn't considered cool in the community.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection