# GUN GUN is a decentralized graph database, and an ecosystem of tools. The stack includes: - [ERA](https://www.youtube.com/watch?v=1HJdrBk3BlE) (economic system) - [AXE](http://axe.eco) (routing) - [DAM](https://gun.eco/docs/DAM) (networking) - [RAD](https://gun.eco/docs/RAD) (storage) - [SEA](https://gun.eco/docs/SEA) (security) - [GUN](http://gun.eco) (data) - [HAM](https://gun.eco/distributed/matters.html) (conflict resolution) ### Network structure Decentralized/p2p. Uses data replication via message passing. It daisy-chains, [routes](https://gun.eco/docs/Routing), & relays messages. It also works over most existing transports: WebRTC, UDP multicast, TCP/HTTP -> Websocket, etc. ## Identity GUN supports multi-device login that is cryptographically secure yet uses "normal" UX. (?) This technique can be extended to secure password resets (no servers). There is a password recovery mechanism using a 3-Friend-Authorization approach. Iris adds a [reputation system](https://medium.com/@mmalmi/learning-to-trust-strangers-167b652a654f) to SEA which provides the underlying cryptographic Security, Encryption, & Authorization. #### Data - Data models (graphs, key/value, document, table, relational, hyper-graphs) - Data availability ([AP](https://gun.eco/docs/CAP-Theorem), strongly eventually consistent) #### Monetization - Business models (Open Source, donation, enterprise, + decentralized PaaS, dBaaS, SaaS, Marketplace) - Payment (AXE bandwidth credits) #### Filtering - Queries (GUN, [GraphQL](https://github.com/brysgo/graphql-gun), historical prototypes of SQL, Mango [Mongo]) #### Moderation Iris and NAB (see above link). - Protocol level (no) - Server level (no) - User level (yes) - Content level (yes) ### Privacy and Access Control 1. Cryptographic keys are assigned to roles, groups, or data points. 2. This information is either used to derive a shared ECDH secret to decrypt (read) 3. Or used to load collaborative multi-writer edits (signed). ### Interoperablity Plugins, such as backup storage on centralized databases or file systems, can be used to extend GUN. ### Scalability A user reported a [70% cost savings](https://twitter.com/cagataycali/status/1245442681251205120) on cloud bills on a project with 1M+ page loads a month. ### Metrics - 11K+ [github](https://github.com/amark/gun) stars - 10M ~ 30M monthly [downloads](https://www.jsdelivr.com/package/npm/gun) ### Implementations - [Internet Archive](https://news.ycombinator.com/item?id=17685682) (library meta-data) - [HackerNoon](https://hackernoon.com/state-of-hacker-noon-2019-2020-8w1ls3axx) (annotations) - [Meething](https://meething.space/) (Mozilla backed secure & decentralized video conferencing powered by GUN) - Iris, Notabug, DTube, others... [Party](https://party.lol/) [Notabug](https://notabug.io/t/notabug/comments/59382d2a08b7d7073415b5b6ae29dfe617690d74/welcome-to-notabug) ### Links [Whitepaper](https://stanford.edu/~nadal/A-Decentralized-Data-Synchronization-Protocol.pdf)