290 points · by ouzb64ty · 6y ago · 109 comments
If you try to go with just OrbitDb you will have to handle manage the ipfs nodes and pin data so it stays persistent and loads faster but also handle the permissions too.
But with 3Box makes it easier to do all of the permissions and loading all data faster + always persistent and/or public or private data, and you know what's amazing? the way you can store data? for example if you want to build a chat app you can use Messaging (Threads) to make quickly a chat app! https://docs.3box.io/api/messaging
Enjoy!
CRDTs usually work as last-write-wins, meaning that if you have a key-value store, the last update to update a key 'wins' the value via the way oplog reduction works.
If you reverse that to a FIRST-write-wins log, you can grant permissions and ownership on a first-come, first-serve basis. Revocation, then, becomes the issue. What do you do with the records they already have? Questions like that are plentiful.
The approach most people take is to find workarounds or "good enough" solutions here, either by using encryption and allowing the encrypted data to be public, or by using some sort of other OrbitDB store as their ACL and management, and only giving select keys access to write to said ACL store in the first place.
Adding encryption into the mix though, particularly multi-writer, becomes exponentially harder.
Um.
3Box also has support for members only OrbitDB threads which can restrict posting to members, and encrypted OrbitDB threads to make posts private to the group. To Mark's point above.
Examples: content about Tiananmen Square 1989.
More advanced moderation tools can be built on top, too.
Some basic questions, as I am still struggling to see the use case of this project.
* How did this project get started? What problem is it trying to solve?
* Are there any real world examples of where this project is used?
OrbitDB got started because we wanted to build serverless applications, especially for the web (ie. applications that run in the browser.) Serverless meaning "no server" and no central authority, ie. something that can't be shut down.
OrbitDB gives tools to build systems and applications where the user owns their data, that is, the data that is not controlled by a service. As a way of simple example, imagine Twitter that doesn't have one massive database for all tweets, but rather you'd have one database for each user.
I wasn't there at the beginning but I believe the project came out of trying to achieve said mutable state within IPFS (which, for other readers is content-addressed and therefore append-only)
http://orbitdb.org lists all of our current users, the biggest one is Metamask by way of https://3box.io. https://tallylab.com is building with it for remote encrypted backup and shared tallies. https://github.com/dappkit/aviondb is a MongoDB-like interface for it.
What I'd like to know is do they support authorization?
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
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...
Security is easy in some cases. Sign your log appends. Security around transactions without a central authority is pretty complex. Whats the solution there? Block-chain type things? It would have to be application specific I suppose.
I never gave FirebaseDB a shot because it felt like too much vendor lock in but this might be interesting to try one day.
HOWEVER! Our latest release, 0.23.0, mitigated this by using a power-of-2 skiplist to load things in parallel, which gave us a nice 4-5x boost there.
(Is there a design doc for OrbitDB anywhere?)
You'd be surprised how well JS does on both fronts, in addition to being able to run across platforms :)
Define robust:
1. Strong and healthy; vigorous
- (of a process, system, organization, etc.) able to withstand or overcome adverse conditions.
JS is the most robust language we have according to the main definition, however you measure it. What other language is as alive as JS right now? What other language has as much programmer attention?
JS is also easily robust according to the noted sub-definition. What other language would survive the web? The web, an environment that could easily be described as "very adverse"... What other language is ready to run in a browser where it will be dynamically and continuously mixed with modules from many different sources, without breaking? JS was built for this.
What other popular language is so easily runnable cross platform? What other popular language lets you program with both OOP and functional paradigms while also being as popular as JS? What other popular language lets you monkey patch things to fit a piece of code into any situtation?
Robust means all of these things to me. What does robust mean to you and what is your example of the most robust programming language? You didn't say...
None of these fit the bill: Python, Ruby, C, C++, Golang, Rust, C#.
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, 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
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.
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.
(which also seems to be putting https://ipfs.io under strain. Sorry, ipfs.io!
And if you want to operate over a distributed network, which means you WILL have network partitions, then you are subject to CAP and will need eventual consistency mechanisms.
This is a false. None of the things you listed preclude consistency.
> And if you want to operate over a distributed network, which means you WILL have network partitions, then you are subject to CAP and will need eventual consistency mechanisms.
That's not how CAP works. Plenty of distributed CP databases exist.