What does HackerNews think of libsqlfs?

a library that implements a POSIX style filesystem on top of an SQLite database

Language: C

> What I do think would be awesome would be an embeddable Postgres library/binary that could use a single state file on your local filesystem for development

I wired Postgres up for our local dev. I don't believe in mocking the database, so all our tests and local dev run against a real Postgres instance.

The main tricks:

- Store the Postgres installation in a known location.

- Set the dynamic loader path to the installation lib dir, e.g., LD_PRELOAD.

- Don't run CI as root (or patch out Postgres' check for root)

- Create and cache the data directory based on the source code migrations.

- Use clone file to duplicate the cached data directory to give to individual tests.

One thing I'd like to pursue is to store the Postgres data dir in SQLite [1]. Then, I can reset the "file system" using SQL after each test instead of copying the entire datadir.

[1]: https://github.com/guardianproject/libsqlfs

Not sure about compression but somebody could probably hack it in an afternoon using this:

https://github.com/guardianproject/libsqlfs

or something similar to check the potential for speed up.

> but also presents as a true filesystem.

As does:

https://github.com/guardianproject/libsqlfs

https://github.com/narumatt/sqlitefs

(I know nothing about these, just got them from a quick search)

Maybe there isn't a database engine that explicitly supports file system data structures, but you could implement a filesystem in the application layer using SQLite as a storage mechanism.

Here's an example of someone doing that very thing.

https://github.com/guardianproject/libsqlfs

Already there. E.g. https://github.com/guardianproject/libsqlfs but I'd also count something like s3ql where the data is stored as s3 objects.
now let's see what it takes to make absurd-fs, where we use https://github.com/guardianproject/libsqlfs to make a filesystem on top of sqlite on top of the File System Access API.

gotta keep ourselves fully looped! ⥀

(is there perchance a repo available with your work? that'd be lovely to see.)

The GP may seem like sarcasm to some ... sqlite is an overlooked, novel, and faster way (up to 35%!) to store things than the filesystem [0].

You can use something like libsqlfs [1] for POSIX file heuristics with sqlite as the backing store.

One HA single primary/multi-master solution to use sqlite may be drbd.

[0] https://www.sqlite.org/fasterthanfs.html [1] https://github.com/guardianproject/libsqlfs

I'm not actually sure whether this actually helps with the problem described in the post, but such a thing does exist:

https://github.com/guardianproject/libsqlfs