dag-resolve/docs/protocol.md
2024-03-04 16:31:16 -08:00

1.4 KiB

protocol

there's the core protocol. each room contains a directed acyclic graph of events. each event is signed and represents one atomic mutation. each room has some immutable config set by the root event. resolvers contain tiebreaking, a verifier, a reducer. the reducer takes in the events and outputs state/a database. rooms can be synced between any two nodes, whether they're server-server, client-server, or peer-peer.

the database. not sure if it will be key value, relational, graph, triplestore? it needs to be fairly flexible to support a wide variety of use cases. query peers for database directly without needing to sync room, for peeking or custom feeds/search indexes. most features are implemented as special server-generated databases.

the frontend. email/forum-like discussion and documents like the web or a git repo are the two main planned things. ideally it would be efficient with your time, bringing back inboxes.

database

key/value sucks in general.

relational is well established and works pretty well. i think a relational database with datalog-like querying would be pretty good overall, but having relations be tables is still a bit annoying and relational dbs don't seem to work with tagged enums particularily well.

i think triplestores with a datalog dialect would be interesting. this is the best contender right now, with much simpler joins than sql.