p2pethereumipfsgun

what is the difference between orbitdb (based on IPFS) and gun ?


I'm looking for a decentralized database for my Dapp. I found two helpful solutions orbitdb and gun but I couldn't realize the main difference and which one is more suitable for a social-media-like application that use ethereum smart contract.


Solution

  • I'm the author of gun. I've seen OrbitDB floating around (ha, pardon the pun!) but obviously am not intimately knowledgable about it enough to speak about it. I'll leave that for them to answer. :)

    It does look like OrbitDB also uses CRDTs, which means they are probably doing things right/correct. Very few people are using CRDTs, which is sad, but makes GUN pretty unique! Despite the last 4 years I've been trying to evangelize to people that they should use CRDTs, I welcome it.

    Maybe a practical way to answer your question, @maroodb , is around GUN's use case for social media:

    Yes, GUN is already being used for P2P social media dApps. You can do:

    Here are some links that show demos, and other resources, that might be helpful in building your app:

    And of course, a super friendly chat room of Open Source developers helping each other out build these kind of stuff, https://github.com/amark/gun ! :)

    You'll have to ask OrbitDB for their examples/use case for P2P social networking dApps, maybe they know what makes gun different.

    Note: A GUN+IPFS adapter will be out soon.


    Ethereum is great, but your social network might not scale up if it is implemented primarily as an ethereum smart contract, just as a warning.

    We recommend you use Ethereum for any cryptocurrency payments or transactions for your user (not GUN or Orbit).

    But we do not recommend building basic social network features (profile info, posts, messages, etc.) using Ethereum.

    Likely, 90 to 95% of your app will be GUN or Orbit, and possibly only 3 to 5% smart contracts.