Hi guys. I thought I’d show off my little immutable database. It’s not exactly ready for prime time but I’d love feedback anyway. It’s my first public Zig project…mama, we made it!
Well done, and welcome to the community
Can you explain how you envision people using a database that effectively copies itself? I see that this mentions embedded programming, but maybe you can explain a bit more about what you see this being used for?
I think the benefits are similar to what you find with in-memory immutable data: easy undo and concurrency. If your program needs to undo any change to the db, in xitdb it is just a pointer copy.
As for concurrency, immutable databases can be read while a write is happening; all of these so-called edge apps would benefit because they can serve arbitrary reads without ever waiting for a write to finish.
Clients can make requests to an immutable db while it is being changed and are guaranteed that all of their requests are on the same snapshot. They just need to query the same transaction id each time.
BTW, by embedded I meant in the sense than SQLite is embedded – it is part of your program rather than running as a separate service. I didn’t mean embedded programming…I know nothing about it