r/coolgithubprojects • • 38m ago

IncHash - A Disk Based Hash Table with NoSQL ambitions

https://github.com/GiorgosXou/inchash

A general-purpose, header-only C99 library for Unix-like systems, implementing a disk-based, dynamically resizable, fixed-slot, (open-addressed) hash table with Fibonacci hashing (Knuth's multiplicative method), triangular probing, per-home-slot probe-bound metadata (with additional early-exit logic), partial in-place value updates (without relocating entries) and incremental rehashing, all designed for modern extent-based filesystems.

Prologue

This is a project I've been working on for quite some time, and I thought some of you here might find it particularly interesting given its rather niche and unconventional specifications.

Intro

It all started with me trying to find a hash-based database (preferably NoSQL) that could support in-place value updates\editing (without relocating entries!) while also being efficiently resizable.

With that goal in mind, and without fully appreciating how difficult implementing something like this would actually be, I somehow managed to pull it off. And honestly, I'm pretty happy with the result.

Outro

Now, to be clear, I'm not claiming this is a fully fledged ACID compliant with WAL etc. database. It's essentially just a hash-table or key-value storage engine, but one that does things a little differently, with its own unique approach.

I genuinely believe that if there's any chance someone besides me might find this project interesting, this is probably the right place to share it.

So, here it is! I hope you find it interesting. I'd genuinely love to hear what you think, whether it's feedback, criticism or just general thoughts. I'd be more than happy to hear from you!

One last thing (because apparently I have to keep repeating this): this is NOT a vibe-coded project, nor is it some low-effort AI-generated slop. There's actual engineering, experimentation, and plenty of work behind it.

Thank you for reading and have fun with it. <3

2 Upvotes

0 comments sorted by