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, 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
It's humorous to me that Hacker News allows this kind of unsubstantiated slander. No example of "obvious errors", no mention of which talk this even was.
I'm not even a Gun fanboy. I've just used it successfully and it has done for me what it claims to do.
Could it be that Hacker News has a vested interest in seeing competitors to IPFS fail? I'm not sure, but either way, your comment grosses me out.
What are the alternatives for offline-first databases? I have a project in the back of my head where clients to a simple central database would be frequently offline and I had GUN in my notes for doing that.
I'd say another option might be PouchDB in combination with CouchDB. That's what Hoodie uses.
But I don't see why you couldn't try GUN if you wanted to. It's disturbing how HN seems to demand a kind of "brand loyalty" regarding technology. Just use what works.
Gun is a graph database. I don't think Orbit uses a graph system, but instead uses feeds or KV stores. So that's a another difference. But Gun can use IPFS as a storage adapter if you wanted.
There is also support for a mongodb like datastore. Slightly separated from orbitdb itself. But uses orbitdb as core system. https://github.com/dappkit/aviondb
To clarify here, OrbitDB's core is an append-only, immutable log CRDT. While a mouthful, what is gives, is a distributed (decentralized) database operations log. Almost any type of database, or data structure, can be then built on top of that log. The log in OrbitDB is a Merkle-DAG [1], so, a graph.
Key-Value databases, feeds, and other data model types that OrbitDB supports by default, are all built on that log. You can also create your custom database types, ie. custom data models.
I wrote the beginnings of a Gun implementation in Go based on my reverse engineering of the Gun JS code: https://github.com/cretz/esgopeta. I halted development as I am no longer needing it, but the code might give some insight (assuming it's even accurate, never made it to significant testing).
old school javascript like this have an advantage: you can ship as is, without the need to obfuscate under the excuse of performance.
if you load two hundred build dependencies and then write twenty word long variables, it might look nice for you at development, but a user trying to debug or validate code on the fly would be in a very bad position as you would have to 'minify' (i.e. obfuscate) to not have a 70mb production file.
Code like this is very readable if you know some conventions, things like `cb` being a callback pointer. Its not even close to the cryptic knowledge needed to read assembly on weird platforms, for example. And a far cry from obfuscated.
> 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 the code becomes impossible. This has nothing to do with 'old school' JS, but universal code standards.
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, 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