frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

ToyDB rewritten: a distributed SQL database in Rust, for education

https://github.com/erikgrinaker/toydb
97•erikgrinaker•15h ago

Comments

atombender•10h ago
Hi, Erik! Nice to see this on the HN front page.

Have you considered using this as a test bed to explore alternative architectures and approaches? The classical Volcano architecture used here has been established for many decades, and it could be fun exercise to see what can be done to improve on it, while remaining true to the original goal of having something that's purely for educational purposes.

erikgrinaker•3h ago
Hi Alex!

I quite like the Volcano model, it has a certain elegance to it. :) With vectorization and distribution you can get pretty far with it.

For my next real project, I want to build something based on the Accord consensus protocol from Cassandra: https://cwiki.apache.org/confluence/download/attachments/188...

It’s the first productionization of leaderless consensus protocols. It merges strict serializable transactions into the consensus layer (in 1RTT on the fast path), and has sharding built-in including cross-shard transactions.

It doesn’t support interactive transactions though, so it’s not a drop-in for SQL systems (but I don’t think they are suitable in modern systems anyway, given the latency cost). And it requires quorum reads, since it can’t use leader leases (for obvious reasons), so reads may end up being too slow for many georeplicated setups. But it’s a neat design.

fabianlindfors•10h ago
Super cool project and the code is delightfully readable as well!

I had the pleasure of having Erik advise me for my thesis on distributed databases a few years ago. I’m very lucky to have had the chance to tap into his knowledge on all things distributed systems. On top of being super knowledgeable he’s also a terrific teacher!

erikgrinaker•3h ago
Thanks for the kind words, Fabian — it was fun working together on your thesis!
GeorgeCurtis•8h ago
Really cool project, your code is beautifully neat and commented. I'm also building a Rust DB so was really nice reading through yours
mdaniel•8h ago
There were quite a few interesting projects linked to in the prior comment threads from 2021 https://news.ycombinator.com/item?id=27874992
mehulashah•6h ago
Love it, though if it’s sufficiently instructive, I bet it will go beyond education.
dev_l1x_be•2h ago
Is there a way to use this as a simple key value store without sql?
erikgrinaker•2h ago
It already uses a key/value store for on-disk storage, but you’ll have to write the server API and client yourself, along with a Raft state machine layer. It’s not a big lift though, and could make a fun weekend project.
nextaccountic•2h ago
Maybe consider sled? https://github.com/spacejam/sled

It's been abandoned for some years, the author was working on a new engine for it and in the last 5 days they started working again on sled proper. However, it's pretty good the way it is (the 0.34.7 release from 2021 https://crates.io/crates/sled), despite the beta warnings

More info here https://dbdb.io/db/sled

(Note, non affiliated to the author, just liked the project)

wood_spirit•1h ago
Simple question but is this OLAP or OLTP?
erikgrinaker•1h ago
OLTP

I ruined my vacation by reverse engineering WSC

https://blog.es3n1n.eu/posts/how-i-ruined-my-vacation/
202•todsacerdoti•7h ago•89 comments

Plain Vanilla Web

https://plainvanillaweb.com/index.html
1106•andrewrn•18h ago•515 comments

Continuous Thought Machines

https://pub.sakana.ai/ctm/
185•hardmaru•9h ago•15 comments

Armbian Updates: OMV support, boot improvents, Rockchip optimizations

https://www.armbian.com/newsflash/armbian-updates-nas-support-lands-boot-systems-improve-and-rockchip-optimizations-arrive/
24•transpute•3h ago•1 comments

Intellect-2 Release: The First 32B Model Trained Through Globally Distributed RL

https://www.primeintellect.ai/blog/intellect-2-release
134•Philpax•9h ago•38 comments

Making PyPI's test suite 81% faster – The Trail of Bits Blog

https://blog.trailofbits.com/2025/05/01/making-pypis-test-suite-81-faster/
69•rbanffy•3d ago•19 comments

Dart added support for cross-compilation

https://dart.dev/tools/dart-compile#cross-compilation-exe
30•Alifatisk•3d ago•22 comments

Why Bell Labs Worked

https://1517.substack.com/p/why-bell-labs-worked
226•areoform•14h ago•165 comments

Car companies are in a billion-dollar software war

https://insideevs.com/features/759153/car-companies-software-companies/
355•rntn•17h ago•608 comments

Absolute Zero Reasoner

https://andrewzh112.github.io/absolute-zero-reasoner/
83•jonbaer•4d ago•16 comments

High-school shop students attract skilled-trades job offers

https://www.wsj.com/lifestyle/careers/skilled-trades-high-school-recruitment-fd9f8257
195•lxm•19h ago•312 comments

Ask HN: Cursor or Windsurf?

154•skarat•6h ago•203 comments

Scraperr – A Self Hosted Webscraper

https://github.com/jaypyles/Scraperr
193•jpyles•16h ago•68 comments

The Academic Pipeline Stall: Why Industry Must Stand for Academia

https://www.sigarch.org/the-academic-pipeline-stall-why-industry-must-stand-for-academia/
103•MaysonL•8h ago•79 comments

Writing an LLM from scratch, part 13 – attention heads are dumb

https://www.gilesthomas.com/2025/05/llm-from-scratch-13-taking-stock-part-1-attention-heads-are-dumb
284•gpjt•3d ago•57 comments

Show HN: Vom Decision Platform (Cursor for Decision Analyst)

https://www.vomdecision.com
5•davidreisbr•3d ago•3 comments

Title of work deciphered in sealed Herculaneum scroll via digital unwrapping

https://www.finebooksmagazine.com/fine-books-news/title-work-deciphered-sealed-herculaneum-scroll-digital-unwrapping
214•namanyayg•21h ago•96 comments

One-Click RCE in Asus's Preinstalled Driver Software

https://mrbruh.com/asusdriverhub/
471•MrBruh•1d ago•224 comments

LSP client in Clojure in 200 lines of code

https://vlaaad.github.io/lsp-client-in-200-lines-of-code
147•vlaaad•17h ago•18 comments

How friction is being redistributed in today's economy

https://kyla.substack.com/p/the-most-valuable-commodity-in-the
214•walterbell•3d ago•97 comments

ToyDB rewritten: a distributed SQL database in Rust, for education

https://github.com/erikgrinaker/toydb
97•erikgrinaker•15h ago•12 comments

A formatter for your kdl files

https://github.com/hougesen/kdlfmt
3•riegerj•3d ago•1 comments

Why alien languages could be far stranger than we imagine Essays

https://aeon.co/essays/why-alien-languages-could-be-far-stranger-than-we-imagine
8•rbanffy•1h ago•8 comments

Burrito Now, Pay Later

https://enterprisevalue.substack.com/p/burrito-now-pay-later
137•gwintrob•15h ago•235 comments

Show HN: Codigo – The Programming Language Repository

https://codigolangs.com
42•adamjhf•2d ago•13 comments

A simple 16x16 dot animation from simple math rules

https://tixy.land
459•andrewrn•2d ago•91 comments

Lazarus Release 4.0

https://forum.lazarus.freepascal.org/index.php?topic=71050.0
241•proxysna•5d ago•138 comments

Avoiding AI is hard – but our freedom to opt out must be protected

https://theconversation.com/avoiding-ai-is-hard-but-our-freedom-to-opt-out-must-be-protected-255873
179•gnabgib•11h ago•104 comments

3D printing in vivo for non-surgical implants and drug delivery

https://www.science.org/doi/10.1126/science.adt0293
22•Phreaker00•1d ago•5 comments

The Epochalypse Project

https://epochalypse-project.org/
186•maxeda•1d ago•81 comments