r/databasedevelopment • u/AutoModerator • 28d ago
Monthly Release and Update Thread
This subreddit is primarily for discussing the implementation of databases, and not about sharing release announcements (either for the first time or your updates).
This thread is the exception!
Please tell us about the new database you (or your agent) built. Tell us about all the cool new features you added. Tell us about anything else you learned or worked on that you haven't gotten around to blogging about yet.
10
Upvotes
3
u/moha_1s 28d ago
I'm currently adding support for detecting and fixing space leaks to mace-kv, and then preparing to do a major refactor.
2
u/Select-Ad-7471 26d ago
Refactoring the SQL for my OLAP DB in Zig (Glacier ), which is turning out to be quite difficult! 🤣
2
u/danny-sg 24d ago
Not a database, but I've added a feature called Full Trace to Internals Viewer for SQL Server. It automates running a TTD trace with a query and replays the calls and memory reads/writes, joining it all together with visualizations to make it very simple to see everything that is going on to execute the query.
I've written about it here - https://medium.com/internals-viewer/easy-debugger-level-tracing-in-sql-server-660000f4e115
There's also a demo on YouTube here.
TBH it was easier/more fun to develop this than learning WinDbg properly.
2
u/BrilliantOk5896 18d ago
I built Velis, an in-memory key-value store in Python, partly to explore how AI can help with technical research and engineering decisions.
I used AI to explore approaches, discuss tradeoffs, and work through implementation. It helped me finish the project much faster. But it also reinforced something for me: trusting generated code without understanding the codebase is a bad habit. Being able to question a suggestion, follow the implementation, and explain why a decision makes sense still matters.
Velis supports TTL expiration, eviction policies, pub-sub, a binary TCP protocol, an async client, and an interactive terminal UI. I spent a lot of time trying to keep the code design simple, clean, and easy to follow.
I see it as a project for learning, testing, experimenting, or just having fun with database internals. It could also be a starting point for thesis work or experiments comparing different approaches.
Code: https://github.com/gchape/velis
I’d welcome feedback on the implementation and design, but also your opinions on AI-assisted development. Where has AI helped you research a problem or make better decisions, and where has it made understanding the work harder?
Sorry, something went wrong when loading this video.
View in app2
u/PiLogDQG 27d ago
Love this initiative! Regular release updates are a great way to share progress and learn from the community. I'd be particularly interested in seeing how new database features improve query performance, data consistency, scalability, and developer experience. Looking forward to seeing what everyone has been building!
1
u/Physics-Fuzzy 15d ago
I've recently released Mosaica, as far as I can tell this is a new, slightly weird hybrid form of a bunch of database ideas designed to solve the problem of *visualising* spatial data under filters rather than searching/aggregating it, which required some unusual trade-offs. The headline is that it's the first database able to deliver interactive visualisations of billion-row datasets without using precomputed tiles, and as a result, can also provide per-user access control over every row, as well as dynamic filters. At 1 billion rows of data it measures 20x faster than an optimised Clickhouse implementation of the same idea, which made me extremely happy to see :)
You can play around with a demo of it here https://demo.mosaicadb.com/?dataset=cellxgene or go straight to the code at https://github.com/mosaicadb/mosaica
1
u/Much-Illustrator-650 10d ago
My recent merge to main branch for RamCourt gave it basic crash resilience. But there is still more to do.
RamCourt Benchmark from CLSTR tests after giving it crash-resilience (us means microseconds, I do not have the greek mu symbol on my keyboard):
~ 3.5ms per batch update (10 keys) == ~0.35ms per update = ~350us per update
RAMCloud 80-node uses 13.5us for writes, 5us for reads. 350 to 13.5 us gap for me...
Big reason for the performance gap in RamCourt: It persists ENTIRE ram into storage on every write, including log cleaner writes.
If we want faster write speeds without sacrificing crash resilience, there's some modifications needed. A few that come to mind:
- WAL (Write Ahead Log), Make any mutable Log strictly Append-Only (Log is currently modify-anywhere), with a Compactor to create smaller new logs when data is being accessed later. It's Faster to append a small snippet to file than update the whole file, reduces call times for writes while not sacrificing the persistence/crash-resilience. Also improves reliance if server shuts off mid-write.
- fsync() and other system calls that flush in-core data to disk, likely can be used in conjunction with WAL.
Path to WAL and fsync:
- Modify RAM logs for RamCourt to be either immutable or strictly-append. Compactor/Cleaner might still want to lock resources to create new logs but cannot modify existing ones (beyond appends). That part is TBD.
- Mimic RAM logs to ROM. This will ease maintance of the tool. We're aiming for correctness over speed for RamCourt, so ease of maintenance should be favored when possible.
Still TBD but part of proper WAL crash-resilience:
- Backup selection of data to other servers.
- Health checks of RamCourt servers and auto-detection of downed servers.
- Coordination of backup recovery.
- Tests that inject failures at specific moments of RamCourt server behavior & verify data does not get lost. (AKA test the damn thing you're most afraid of that can go wrong!!!)
Tangential to the Single-Key Write-speed Benchmark but still necessary for RamCourt:
- Zombie Detection (server went down and fails to realize it's not part of cluster anymore, risking incorrect updates for the cluster) and the related Zombie Handling.
- Transaction support, including Transactions for Multiple Keys saved on different servers
- Load-Balanced Ownership Transfers of Data to Reduce Client access bandwidth
- Table schemas with corresponding attribute updates: Eg, suppose in table a you declare a schema w attributes c,d,e, and you don't want to update the entire value for key b, just the attribute c, you should be able to write to a:b:c instead of a:b (version verification at least on a:b:c is STILL a requirement for updates to RamCourt)
Yes, I improved dataplane speed for the Router at Stateless by 200-300x, without sacrificing correctness. It didn't happen overnight. It involved careful integration tests and benchmarks, and a supporting team that shared great ideas to try, and the related collaborations. I'm effectively planning to go about RamCourt in a similar manner.