2023-07-06 11:06:29 +00:00
|
|
|
# ufh
|
|
|
|
|
2023-08-26 13:28:39 +00:00
|
|
|
A global graph database with access control
|
|
|
|
|
|
|
|
## archived
|
|
|
|
|
|
|
|
This doesn't work. I am not an expert in distributed systems and didn't
|
|
|
|
know what I was doing from the start.
|
|
|
|
|
|
|
|
The entire system has deep flaws:
|
|
|
|
|
|
|
|
- There's no semblance of time. This is fine for redaction/updates,
|
|
|
|
but if I want to have a range of time where a certain key is valid or
|
|
|
|
events are able to be sent, that's not possible. I'd either need every
|
|
|
|
event to also have prev events, or to somehow use single append-only
|
|
|
|
logs.
|
|
|
|
- One key is one user, and they can't be stored on servers. If a key
|
|
|
|
is stolen, that entire account is compromised. If all copies of a key
|
|
|
|
is lost, that account is gone.
|
|
|
|
|
|
|
|
### what to use instead
|
|
|
|
|
|
|
|
- [ipfs](https://ipfs.tech/) has some flaws, but exists
|
|
|
|
and is the best system that exists currently.
|
|
|
|
- [dat](https://www.datprotocol.com/) is another dead protocol, but I
|
|
|
|
still like the ideas there.
|
|
|
|
- [matrix](https://matrix.org/) has many flaws (state resets yay),
|
|
|
|
but also exists and is the best system to currently exist.
|
|
|
|
|
|
|
|
### learning experience
|
|
|
|
|
|
|
|
Despite the fact that this is a failure, I still think I got suprisingly
|
|
|
|
far. Here are the upsides:
|
|
|
|
|
|
|
|
- A suprising amount of stuff actually works
|
|
|
|
- `x.file`, `x.tag.local`, `x.redact` events (protocol side)
|
|
|
|
- file derivations (server side)
|
|
|
|
- many files can be thumbnailed or have thumbnails extracted
|
|
|
|
- media info is extracted via ffmpeg
|
|
|
|
- pdf text and video subtitles are extracted and put in a fts index
|
|
|
|
- structured documents + latex-like markup language (client side)
|
|
|
|
- plus, a proper dht (protocol/network side), so this is actually
|
|
|
|
somewhat competitive with ipfs!?
|
|
|
|
- I still think a lot of ideas here are have merit
|
|
|
|
- combining the data and blob layer - refs can reference blobs and
|
|
|
|
blobs can be events. this solves the problem of having an excellent
|
|
|
|
decentralized protocol, but no way of distributing files.
|
|
|
|
- modelling as a graph database, querying by relations. this is much
|
|
|
|
more powerful than it seems, and could be used to build a lot of
|
|
|
|
different applications.
|
|
|
|
- custom indexers. there are a lot of different use cases for protocols,
|
|
|
|
but some cases need special "views" into the data. being able to
|
|
|
|
install modules/"appservices" for sorting/aggregating events in
|
|
|
|
special ways would be nice.
|
|
|
|
- I learned a lot, which is always nice, but still disappointing seeing
|
|
|
|
this work was pointless.
|
|
|
|
|
|
|
|
Since the spec is unfinished and will probably never be finished since
|
|
|
|
it's broken, feel free to ask me on matrix via dm or #ufh:celery.eu.org.
|
2023-08-18 06:32:07 +00:00
|
|
|
|
2023-07-06 11:06:29 +00:00
|
|
|
## how to run
|
|
|
|
|
|
|
|
1. `cargo run --bin store-fs`
|
|
|
|
2. `cargo run --bin server`
|
|
|
|
3. `(cd web && pnpm i && pnpm dev)`
|