3 ms·
A read-only VFS doing this can be really simple, with the right API… This is my VFS: https://github.com/ncruces/go-sqlite3/blob/main/vfs/readervfs/reader.go ht
by ncruces 10mo ago
A read-only VFS doing this can be really simple, with the right API…
This is my VFS:
https://github.com/ncruces/go-sqlite3/blob/main/vfs/readervfs/reader.go https://github.com/ncruces/go-sqlite3/blob/main/vfs/readervf...
And using it with range requests:
https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/readervfs#example-package-Http https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/readerv...
And having it work with a Zstandard compressed SQLite database, is one library away:
https://pkg.go.dev/github.com/SaveTheRbtz/zstd-seekable-format-go/pkg https://pkg.go.dev/github.com/SaveTheRbtz/zstd-seekable-form...
- pdyc 10mo agothis does not caches the data right? it would always fetch from network? by any chance do you know of solution/extension that caches the data it would make it so much more efficient.
- ncruces 10mo agoThe package I'm using in the HTTP example can be configured to cache data: https://github.com/psanford/httpreadat?tab=readme-ov-file#caching https://github.com/psanford/httpreadat?tab=readme-ov-file#ca... But, also, SQLite caches data; you can simply increase the page cache.
- keepamovin 10mo agoYour page is served over sqlitevfs with Range queries? Let's try this here.
- ncruces 10mo agoI did a similar VFS in Go. It doesn't run client-side in a browser. But you can use it (e.g.) in a small VPS to access a multi-TB database directly from S3.
- keepamovin 10mo agoThat is cool. Maybe i look at the go code