Comment on The Verge Takes on Self-Hosting for the Masses
somedaysoon@lemmy.world 1 year agoI want to present my files - wherever they may be - to all sorts of different applications which let me interact with them in different ways.
Only some self-hosted software grants us this portability.
I’d say most of it does with Samba shares and docker bind mounts. With Samba shares the data is presented across network to my Kodi clients, the file browser on my phone, and the file browsers of all my computers. And with docker bind mounts those files are presented to any services that I want to run.
otl@lemmy.sdf.org 1 year ago
Devil’s advocate: what about the posts and comments I’ve made via Lemmy? They could be presented as files (like email). I could read, write and remove them. I could edit my comments with Microsoft Word or
ed
. I could run some machine learning processing on all my comments in a Docker container using just a bind mount like you mentioned. I could back them up to Backblaze B2 or a USB drive with the same tools.But I can’t. They’re in a PostgreSQL database (which I can’t query), accessible via a HTTP API. I’ve actually written a Lemmy API client, then used that to make a read-only file system interface to Lemmy (pkg.go.dev/olowe.co/lemmy). Using that file system I’ve written an app to access Lemmy from a weird text editing environment I use (developed at least 30 years before Lemmy was even written!): lemmy.sdf.org/post/1035382
More ideas if you’re interested at upspin.io
eluvatar@programming.dev 1 year ago
That makes sense. I think the reason why they’re not represented as files is pretty simple. Data integrity. If you want to get the comments you just query the table and as long as the DB schema is what you expect then it’ll work just fine and you don’t have to validate that the data hasn’t been corrupted (you don’t have to check that a column exists for example). But with files, every single file you need to parse and validate because another application could have screwed them up. It’s certainly possible to build this, it might be slower but computers are pretty fast these days, but it would require more work to develop to solve the problem that the database solves for you.