2 ms·
After reading the topmost info I still don't know if this only runs in the browser, on the server or both. I don't know how data is stored, how nodes sync, what
by rapsey 10y ago
After reading the topmost info I still don't know if this only runs in the browser, on the server or both. I don't know how data is stored, how nodes sync, what protocol it uses, what storage engine it uses, etc. The main page has paragraphs of text that tell me nothing.
- marknadal 10y agoYes, it runs in the browser and server (both). Data is stored in a graph format, currently (unfortunately) as just JSON. There are storage adapters to backup to S3, Level, SQLite, etc. Here is an article on the JSON graph structure: https://github.com/amark/gun/wiki/GUN%E2%80%99s-Data-Format-%28JSON%29 https://github.com/amark/gun/wiki/GUN%E2%80%99s-Data-Format-... Sync is done using a deterministic AP (of the CAP Theorem) conflict resolution algorithm. Specifically, a hybrid vector-lexical-timestamp CRDT. An article on how it works is here: https://github.com/amark/gun/wiki/Conflict-Resolution-with-Guns https://github.com/amark/gun/wiki/Conflict-Resolution-with-G... And the tradeoffs are discussed here: https://github.com/amark/gun/wiki/CAP-Theorem https://github.com/amark/gun/wiki/CAP-Theorem Custom protocol, our docs aren't up to date on it though. But it is designed to work over WebSockets, HTTP, TCP, UDP, WebRTC, etc.