2020-04-26 19:10:06 +02:00
# GUN
2020-06-08 20:40:05 +02:00
GUN is a decentralized graph database, and an ecosystem of tools.
2020-04-26 19:10:06 +02:00
2020-06-08 20:40:05 +02:00
The stack includes:
2020-04-26 19:10:06 +02:00
2020-06-06 01:44:46 +02:00
- [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)
2020-04-26 19:10:06 +02:00
2020-06-08 20:40:05 +02:00
### Network structure
2020-04-26 19:10:06 +02:00
2020-06-08 20:40:05 +02:00
Decentralized/p2p. Uses data replication via message passing.
2020-04-26 19:10:06 +02:00
It daisy-chains, [routes ](https://gun.eco/docs/Routing ), & relays messages.
2020-06-08 20:40:05 +02:00
It also works over most existing transports: WebRTC, UDP multicast, TCP/HTTP -> Websocket, etc.
2020-04-26 19:10:06 +02:00
## Identity
2020-06-08 20:40:05 +02:00
GUN supports multi-device login that is cryptographically secure yet uses "normal" UX. (?) This technique can be extended to secure password resets (no servers).
2020-04-26 19:10:06 +02:00
2020-06-08 20:40:05 +02:00
There is a password recovery mechanism using a 3-Friend-Authorization approach.
2020-04-26 19:10:06 +02:00
2020-06-08 20:40:05 +02:00
Iris adds a [reputation system ](https://medium.com/@mmalmi/learning-to-trust-strangers-167b652a654f ) to SEA which provides the underlying cryptographic Security, Encryption, & Authorization.
2020-04-26 19:10:06 +02:00
#### Data
- Data models (graphs, key/value, document, table, relational, hyper-graphs)
- Data availability ([AP](https://gun.eco/docs/CAP-Theorem), strongly eventually consistent)
2020-06-08 20:40:05 +02:00
#### Monetization
2020-04-26 19:10:06 +02:00
- 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)
2020-05-18 02:40:45 +02:00
### Privacy and Access Control
2020-06-06 01:44:46 +02:00
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).
2020-06-01 00:30:15 +02:00
2020-06-08 20:40:05 +02:00
### Interoperablity
2020-06-01 00:30:15 +02:00
2020-06-08 20:40:05 +02:00
Plugins, such as backup storage on centralized databases or file systems, can be used to extend GUN.
2020-06-01 00:30:15 +02:00
2020-05-18 02:40:45 +02:00
### Scalability
2020-06-08 20:40:05 +02:00
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.
2020-06-01 00:30:15 +02:00
2020-05-18 02:40:45 +02:00
### Metrics
2020-06-08 20:40:05 +02:00
- 11K+ [github ](https://github.com/amark/gun ) stars
- 10M ~ 30M monthly [downloads ](https://www.jsdelivr.com/package/npm/gun )
2020-06-01 00:30:15 +02:00
2020-06-06 01:44:46 +02:00
### Implementations
2020-06-01 00:30:15 +02:00
2020-06-06 01:44:46 +02:00
- [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...
2020-06-08 20:40:05 +02:00
[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 )