Live data from Hacker News

OrbitDB: Peer-to-peer databases for the decentralized web

github.com

31–40 of 119 posts

Re: OrbitDB: Peer-to-peer databases for the decentralized web

#33
post #27
post #17

Earlier quoted context omitted.

Can you elaborate? Source code to GUN is right here: https://github.com/amark/gun/tree/master/src

Yes sorry for not doing this. In the source code folder, please open any random file and try to understand what the code does. I once tried to fix a bug that I found in GUN but I gave up after just trying to figure out what the code is supposed to do.

That is very readable javascript.

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.

Re: OrbitDB: Peer-to-peer databases for the decentralized web

#35
post #27
post #17

Earlier quoted context omitted.

Can you elaborate? Source code to GUN is right here: https://github.com/amark/gun/tree/master/src

Yes sorry for not doing this. In the source code folder, please open any random file and try to understand what the code does. I once tried to fix a bug that I found in GUN but I gave up after just trying to figure out what the code is supposed to do.

That's not an issue with the source code linked above which is just basic javascript.

Re: OrbitDB: Peer-to-peer databases for the decentralized web

#36
post #25

p2p DB in JS using CRDT. That sounds a lot like GUN. How does OrbitDB compare to GUN?

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

Re: OrbitDB: Peer-to-peer databases for the decentralized web

#38

It looks like they have an identity provider, so this must support authentication. Link: https://github.com/orbitdb/orbit-db-identity-provider What I'd like to know is do they support authorization?

Yup. You can actually extend the Access Control to create your own custom authentication/authorization methods.

So, basically you can have any sort of Web 2.0 or Web 3,0 based authentication/authorization methods. Oauth, JWT, DIDs...anything you can imagine.

Link to Access Controller: https://github.com/orbitdb/orbit-db-access-controllers#creat...

Re: OrbitDB: Peer-to-peer databases for the decentralized web

#40

It looks like they have an identity provider, so this must support authentication. Link: https://github.com/orbitdb/orbit-db-identity-provider What I'd like to know is do they support authorization?

Hey thanks for taking a look at this. We support identity providers (the one you linked), and access controllers.[1]

Identity providers work by cross-signing an external keypair with the generated OrbitDB key-pairs, and access controllers generally work by exposing a `canAppend` function that facilitates any kind of auth you want to perform. There's support for Metamask for example. OrbitDB is also used _in_ Metamask under the hood by our good friends at 3box.[2]

TallyLab, my application project, uses these in its IAM system and you can see the repos here.[3]

1. https://github.com/orbitdb/orbit-db-access-controllers 2. https://3box.io/ 3. https://github.com/tallylab

Post reply on HN