{"id":22887595,"url":"https://github.com/imjching/sql-fs","last_synced_at":"2025-03-31T19:14:09.608Z","repository":{"id":77658676,"uuid":"204345099","full_name":"imjching/sql-fs","owner":"imjching","description":"POSIX-style filesystem on top of a SQL database using FUSE","archived":false,"fork":false,"pushed_at":"2019-08-26T02:16:17.000Z","size":146,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-13T09:23:18.964Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://en.wikipedia.org/wiki/Filesystem_in_Userspace","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imjching.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-25T20:16:16.000Z","updated_at":"2024-06-19T09:15:01.777Z","dependencies_parsed_at":"2023-04-22T09:49:41.581Z","dependency_job_id":null,"html_url":"https://github.com/imjching/sql-fs","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjching%2Fsql-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjching%2Fsql-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjching%2Fsql-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjching%2Fsql-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imjching","download_url":"https://codeload.github.com/imjching/sql-fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523866,"owners_count":20791444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T20:36:48.425Z","updated_at":"2025-03-31T19:14:09.570Z","avatar_url":"https://github.com/imjching.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sql-fs\n\nPOSIX-style filesystem on top of a SQL database using [FUSE](https://en.wikipedia.org/wiki/Filesystem_in_Userspace). At the moment, this filesystem only supports CockroachDB. This is a proof of concept and has limitations. See *Future Work* below.\n\n## Details\n\nThis project uses [bazil.org/fuse](https://github.com/bazil/fuse), which is a Go library for writing FUSE userspace filesystems. Bazil implements the kernel-userspace communication protocol.\n\n`sql-fs` will communicate with the kernel through Bazil to register the `mount/` mountpoint as a filesystem. The kernel will forward all filesystem operations for that filesystem back to the `sql-fs` process through the communication channel established.\n\n## Dependencies\n\n1. [CockroachDB](https://github.com/cockroachdb/cockroach)\n2. FUSE kernel driver and libraries:\n   - Mac: [OSXFUSE](https://osxfuse.github.io/)\n   - Linux: `fuse` package\n3. Go.\n\n## Usage\n\nAssuming that CockroachDB is listening on port `26257`, here are the steps to run sql-fs:\n\n```\n# Clone the sql-fs git repository\ngit clone git@github.com:imjching/sql-fs.git\ncd sql-fs\n\n# Run schema.sql\ncockroach sql --insecure \u003c schema.sql\n\n# Build the binary and start the filesystem\nmake run\n\n# Your mountpoint will be ./mount\n```\n\n## Future Work\n1. Support for multiple databases (MySQL, PostgreSQL, etc.) with abstraction.\n2. Concurrent file access. The current implementation for writing and reading is a little fragile.\n3. Tests.\n\n## References\n\n- To FUSE or Not to FUSE: Performance of\nUser-Space File Systems: https://www.usenix.org/system/files/conference/fast17/fast17-vangoor.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjching%2Fsql-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimjching%2Fsql-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjching%2Fsql-fs/lists"}