HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
amark
gun
JavaScript2014–2024
amark / gun

gun

An open source cybersecurity protocol for syncing decentralized graph data.

45Distinct people
291Mentions
2Explicit recommenders
19.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An open source cybersecurity protocol for syncing decentralized graph data.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I was very excited about Datomic as well, but disappointed it wasn't Open Source. I decided to fix that + build something that combines my favorite features from Postgres,…

marknadal used a recommendation phrase. 7 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year291 dated mentions

Observed mentions: 2014-10-19 14:21:58 UTC to 2024-10-08 16:25:37 UTC.

02040602014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 39 mentions; 2 submissions, 37 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 52 mentions; 7 submissions, 45 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 67 mentions; 14 submissions, 53 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 59 mentions; 2 submissions, 57 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 40 mentions; 2 submissions, 38 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 18 mentions; 0 submissions, 18 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC826
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC39237
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC52745
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC671453
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC59257
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC40238
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC18018
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC431
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC110
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
GUN is an ecosystem of tools that let you build community run and encrypted applications - like an Open Source Firebase or a Decentralized Dropbox. The Internet Archive and 100s of other apps run GUN in-production. Multiplayer by default with realtime p2p state synchronization! Graph data lets you use key/value, tables, documents, videos, & more! Local-first, offline, and decentralized with end-to-end encryption. Decentralized alternatives to Zoom, Reddit, Instagram, Slack, YouTube, Stripe, Wikipedia, Facebook Horizon and more have already pushed terabytes of daily P2P traffic on GUN. We are a friendly community creating a free fun future for freedom: Quickstart GUN is super easy to get started with: Try the interactive tutorial in the browser (5min ~ average developer). Or npm install gun and run the examples with cd node_modules/gun && npm start (5min ~ average developer). Note: If you don't have node or npm, read this first. If the npm command line didn't work, you may need to mkdir node_modules first or use sudo. An online demo of the examples are available here: http://try.axe.eco/ Or write a quick app: (try now in a playground) <script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script> <script> // import GUN from 'gun'; // in ESM // GUN = require('gun'); // in NodeJS // GUN = require('gun/gun'); // in React gun = GUN(); gun.get('mark').put({ name: "Mark", email: "mark@gun.eco", }); gun.get('mark').on((data, key) => { console.log("realtime updates:", data); }); setInterval(() => { gun.get('mark').get('live').put(Math.random()) }, 9); </script> Or try something mind blowing, like saving circular references to a table of documents! (play) cat = {name: "Fluffy", species: "kitty"}; mark = {boss: cat}; cat.slave = mark; // partial updates merge with existing data! gun.get('mark').put(mark); // access the data as if it is a document. gun.get('mark').get('boss').get('name').once(function(data, key){ // `once` grabs the data once, no subscriptions. console.log("Mark's boss is", data); }); // traverse a graph of circular references! gun.get('mark').get('boss').get('slave').once(function(data, key){ console.log("Mark is the cat's slave!", data); }); // add both of them to a table! gun.get('list').set(gun.get('mark').get('boss')); gun.get('list').set(gun.get('mark')); // grab each item once from the table, continuously: gun.get('list').map().once(function(data, key){ console.log("Item:", data); }); // live update the table! gun.get('list').set({type: "cucumber", goal: "jumping cat"}); Want to keep building more? Jump to THE DOCUMENTATION! About First & foremost, GUN is a community of the nicest and most helpful people out there. So I want to invite you to come tell us about what you are working on & wanting to build (new or old school alike! Just be nice as well.) and ask us your questions directly. :) Watch the 100 second intro! The GUN ecosystem stack is a collection of independent and modular tools covering everything from CRDT conflict resolution, cryptographic security & encryption, radix storage serialization, mesh networking & routing algorithms, to distributed systems correctness & load testing, CPU scheduled JSON parser to prevent UI lag, and more! On that note, let's get some official shout outs covered first: Support Thanks to:                Robert Heessels, Lorenzo Mangani, NLnet Foundation, Sam Liu, Daniel Dombrowsky, Vincent Woo, AJ ONeal, Bill Ottman, Mike Lange, Sean Matheson, Alan Mimms, Dário Freire, John Williamson, Robin Bron, Elie Makhoul, Mike Staub, Bradley Matusiak, Jeff Cook, Nico, Aaron Artille, Tim Robinson, Fabian Stamm, Mike Staub, Hunter Owens, Jacob Millner, Gerrit Balindt, Gabriel Lemon, Murage Martin, Jason Stallings Join others in sponsoring code: https://www.patreon.com/gunDB ! Ask questions: http://stackoverflow.com/questions/tagged/gun ? Found a bug? Report at: https://github.com/amark/gun/issues ; Need help? Chat with us: http://chat.gun.eco . History GUN was created by Mark Nadal in 2014 after he had spent 4 years trying to get his collaborative web app to scale up with traditional databases. After he realized Master-Slave database architecture causes one big bottleneck, he (as a complete newbie outsider) naively decided to question the status quo and shake things up with controversial, heretical, and contrarian experiments: The NoDB - no master, no servers, no "single source of truth", not built with a real programming language or real hardware, no DevOps, no locking, not just SQL or NoSQL but both (all - graphs, documents, tables, key/value). The goal was to build a P2P database that could survive living inside any browser, and could correctly sync data between any device after assuming any offline-first activity. Technically, GUN is a graph synchronization protocol with a lightweight embedded engine, capable of doing 20M+ API ops/sec in just ~9KB gzipped size. Documentation API reference Tutorials Examples GraphQL Electron React & Native Vue Svelte Webcomponents CAP Theorem Tradeoffs How Data Sync Works How GUN is Built Crypto Auth Modules Roadmap This would not be possible without community contributors, big shout out to: ajmeyghani (Learn GUN Basics with Diagrams); anywhichway (Block Storage); beebase (Quasar); BrockAtkinson (brunch config); Brysgo (GraphQL); d3x0r (SQLite); forrestjt (file.js); hillct (Docker); JosePedroDias (graph visualizer); JuniperChicago (cycle.js bindings); jveres (todoMVC); kristianmandrup (edge); Lightnet (Awesome Vue User Examples & User Kitchen Sink Playground); lmangani (Cytoscape Visualizer, Cassandra, Fastify, LetsEncrypt); mhelander (SEA); omarzion (Sticky Note App); PsychoLlama (LevelDB); RangerMauve (schema); robertheessels (gun-p2p-auth); rogowski (AXE); sbeleidy; sbiaudet (C# Port); Sean Matheson (Observable/RxJS/Most.js bindings); Shadyzpop (React Na
Read the full README on GitHub

What Hacker News says

291 sources
I'm sure a lot of the technologies on the list (like Yjs!) are well-designed and reliable, but I would not touch GUN with a ten foot pole. The code is absolutely inscrutable (what does any of this do? https://github.com/amark/gun/blob/master/lib/axe.js), the creator has failed to sufficiently explain any of the underlying mechanisms without complete hand-waving (what on earth is a "hypothetical amnesia machine" that supposedly underpins all of GUN? The creator has literally never given any kind of coherent explanation of it) -- it's just pure snake oil.
In Local-First Web Development
Some of the more interesting takes on this are GunJS and it's associated stack (sea, rad, dam etc - https://github.com/amark/gun) It tries to come from a different direction ie. Local database with distributed sync upwards. It's only at the higher levels that it makes use of blockchain to ensure network QoS (axe). Croquet didn't focus quite so much on the infrastructure but looked at the collaboration aspect. Written in smalltalk it has some interesting ideas https://en.m.wikipedia.org/wiki/Croquet_Project Discoverability in both is an issue but I think an eventual project will have to take ideas from both.
In Who Owns the Stars: The Trouble with Urbit
Thanks a lot Kenton. Appreciate the reply and excited to see what the Workers team build next. > WebRTC is a peer-to-peer (browser-to-browser) protocol. We don't currently have plans to implement it directly in Workers, though that's an interesting idea. The reason I asked is, since overlay distributed networks are being built on top of WebRTC (like u/feross' https://WebTorrent.io), Workers Unbound, if it supported WebRTC, could potentially then be a participant in such distributed networks. May be, I can seed torrents through Workers Unbound or build a P2P CDN on top of it which is at least as fast as usual CDNs when there are not very many connectable peers nearby. Or, have Workers Unbound participate as a host in a P2P database / filesystem like GunDB [0], for example. > Is this commonly used for things other than forward proxies? Yep,
Read the rest
pretty much the use-case I was going for with Workers Unbound, tunneling traffic through HTTP to bypass firewalls and navigate NATs. A TURN over HTTPS of sorts, like Tailscale's DERP [1] but with servers worldwide. Will this be supported out-of-the-box? Thanks again! [0] https://github.com/amark/gun [1] https://tailscale.com/blog/how-tailscale-works/
In Cloudflare launches Workers Unbound, next evolution of its serverless platform
> How does OrbitDB compare to GUN? I went to a meetup where the creator of GUN gave a presentation. To this day, it was the single strangest presentation I've ever experienced. The presentation had numerous obvious errors. The audience kept pointing out major misunderstandings and errors about distributed systems. I remember one awkward moment where someone pointed out a glaring error in the author's model of conflict resolution that undermined one of his key points, which the GUN creator tried to gloss over as quickly as possible. To top it off, he ran out of slides before he finished his talk because he hadn't bothered to complete his whole slide deck before presenting. Instead, he just tried to improvise the last 1/3 of his talk about GUN. It was so bad that we all walked out of there wondering if we had just been trolled. To this day,
Read the rest
I'm still surprised when I read about GUN on Hacker News. You don't need to take my word for it. I encourage anyone considering GUN to open up the source code and look through some random files: https://github.com/amark/gun/tree/master/src
In OrbitDB: Peer-to-peer databases for the decentralized web
> without the need to obfuscate under the excuse of performance > load two hundred build dependencies and then write twenty word long variables [...] a very bad position as you would have to 'minify' (i.e. obfuscate) to not have a 70mb production file You defeated your own argument here. You're saying it's nice that the code is obfuscated already (short variables) so you can get better performance, it's really the same thing - except doing it by hand has a lot of downsides. Minifiers and source maps have been around for a long time to get you the best of both worlds, understandable code in development, minified code in production (even though gzip alone gives you 80-90% of the gains). There is absolutely no reason to write obfucasted code like this [1] where you need to guess the meaning of thirty different one-letter variables. Grep'ing
Read the rest
the code becomes impossible. This has nothing to do with 'old school' JS, but universal code standards. [1] https://github.com/amark/gun/blob/master/src/type.js
In OrbitDB: Peer-to-peer databases for the decentralized web
Holy Cow! 2.5GB/s that is amazing. Meanwhile I can barely get Chrome/NodeJS to parse 20MB in less than 100ms :(. How useful (or useless) would Simdjson as a Native Addon to V8 be? I assume transferring the object into JS land would kill all the speed gains? I wrote my own JSON parser just last week, to see if I could improve the NodeJS situation. Discovered some really interesting factoids: (A) JSON parse is CPU-blocking, so if you get a large object, your server cannot handle any other web request until it finishes parsing, this sucks. (B) At first I fixed this by using setImmediate/shim, but discovered to annoying issues: (1) Scheduling too many setImmediates will cause the event loop to block at the "check" cycle, you actually have to load balance across turns in the event loop like so (https://twitter.com/marknadal/status/124247661975
Read the rest
2591360) (2) Doing the above will cause your code to be way slow, so a trick instead, is to actually skip setImmediate and invoke your code 3333 (some divider of NodeJS's ~11K stack depth limit) times or for 1ms before doing a real setImmediate. (C) Now that we can parse without blocking, our parser's while loop (https://github.com/amark/gun/blob/master/lib/yson.js) marches X byte increments at a time (I found 32KB to be a sweet spot, not sure why). (D) I'm seeing this pure JS parser be ~2.5X slower than native for big complex JSON objects (20MB). (E) Interestingly enough, I'm seeing 10X~20X faster than native, for parsing JSON records that have large values (ex, embedded image, etc.). (F) Why? This happened when I switched my parser to skip per-byte checks when encountering `"` to next indexOf. So it would seem V8's built in JSON parser is still checking every character for a token which slows it down? (G) I hate switch statements, but woah, I got a minor but noticeable speed boost going from if/else token checks to a switch statement. Happy to answer any other Qs! But compared to OP's 2.5GB/s parsing?! Ha, mine is a joke.
In Simdjson 0.3: Faster JSON parser

Showing the 15 most recent of 291 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.