Skip to content
Mark Nadal edited this page Feb 10, 2018 · 26 revisions

GUN is a small, distributed data sync and storage solution that runs everywhere JavaScript does. GUN lets you focus on the data you need to store, retrieve, and share without worrying about servers, network calls, databases, or handling offline edits and merge conflicts. This lets you build cool apps fast, like:

Offline-First

When a browser peer sends a request, it'll merge the responses with its own model using our graph-based CRDT conflict resolution algorithm, then cache the result. Since it's cached in the browser, there are a few interesting side effects:

  • The next time the client sends that request, the response is instantaneous, even when offline.
  • Data is replicated on each client that requests it.
  • If your server catastrophically fails, you can still recover your data from the clients.

This makes the loss of important information nearly impossible, as all copies of the data must be destroyed for it to be unrecoverable. Servers are also just peers, but they aren't as picky about what they cache.

Distributed

GUN is peer-to-peer (multi-master decentralized replication), meaning updates do not need a centralized server. You save data on one machine, and you can sync it with other peers without needing a complex consensus systems. It just works.

However, you do not need peers or servers to use GUN, they're completely additive!


Get started with the easy installation, no download required!

This wiki is where all the GUN website documentation comes from.

You can read it here or on the website, but the website has some special features like rendering some markdown extensions to create interactive coding tutorials.

Please feel free to improve the docs itself, we need contributions!

Clone this wiki locally