← Back to context

Comment by avinassh

2 years ago

> PS: I've got nothing against Turso, or libSQL. In fact I spent the last year perusing their virtual WAL API. The problem is that I found no documentation, nor any useful open source implementations of it. If there any I'd be very interested. So, thus far, I also don't have anything that drives towards libSQL.

Hey, this is v and I am an engineer at Turso. We do have some documentation and an example implementation of Virtual WAL

docs: https://github.com/tursodatabase/libsql/blob/ef44612/libsql-...

example: https://github.com/tursodatabase/libsql/blob/ef44612/libsql-...

for an open source implementation, you may check how Bottomless works. Bottomless is another project which does back up like litestream and it internally implements a Virtual WAL.

Bottomless - https://github.com/tursodatabase/libsql/tree/main/bottomless

I am sure we can improve our docs, make it more discover-able and easy to find. I am open to feedback and suggestions!

Hi! Thanks for this.

I find that documentation completely insufficient to implement a virtual WAL. The example (which I had looked into) it's just a "do nothing" wrapper. I learn that there are 25 methods I should implement, and that I can just forward them to another implementation.

For my bindings, I implemented an entire SQLite VFS from scratch for a handful of different platforms, including file-locking and shared-memory primitives. However, and having studied your virtual WAL code for about a month, I still have no idea where to even start. It just doesn't feel like an coherent API (more like an internal SQLite API, simply exposed for outside use).

I'll look into Bottomless, but I'm not very hopeful at this point. Maybe it's just me and Rust; if that is so, I'm sorry.

  • I have noted your feedback and I do acknowledge that documentation on virtual WAL trait can be improved.