a failed attempt
Find a file
tezlm a3ca248c59
maintenence (see long commit message)
- update packages
- add nix flake
- add prepared sqlx queries
- fix various compilation errors

(this project is still pretty much dead though)
2024-08-01 02:50:11 -07:00
cli maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
docs ... 2023-08-22 01:15:40 -07:00
lib fix cyclic networks, some ideas and cleanup 2023-08-21 21:11:24 -07:00
server maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
store-fs maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
web maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
.gitignore more auth stuff, import old events on initial view 2023-08-20 12:32:06 -07:00
Cargo.lock maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
Cargo.toml more auth stuff, import old events on initial view 2023-08-20 12:32:06 -07:00
flake.lock maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
flake.nix maintenence (see long commit message) 2024-08-01 02:50:11 -07:00
readme.md i actually don't really regret this 2023-08-26 06:28:39 -07:00

ufh

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 has some flaws, but exists and is the best system that exists currently.
  • dat is another dead protocol, but I still like the ideas there.
  • matrix 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.

how to run

  1. cargo run --bin store-fs
  2. cargo run --bin server
  3. (cd web && pnpm i && pnpm dev)