orbit-db | Peer-to-Peer Databases for the Decentralized Web | Storage library
kandi X-RAY | orbit-db Summary
kandi X-RAY | orbit-db Summary
OrbitDB is a serverless, distributed, peer-to-peer database. OrbitDB uses IPFS as its data storage and IPFS Pubsub to automatically sync databases with peers. It's an eventually consistent database that uses CRDTs for conflict-free database merges making OrbitDB an excellent choice for decentralized apps (dApps), blockchain applications and local-first web applications.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main entry point .
- Handle error message
orbit-db Key Features
orbit-db Examples and Code Snippets
Community Discussions
Trending Discussions on orbit-db
QUESTION
i'm only trying to launch the exemple of the app kit OrbitDB which is :
...ANSWER
Answered 2021-Sep-15 at 15:11This error clearly points to an incompatibility between IPFS and OrbitDB.
The latest version of js-ipfs
that OrbitDB v0.26.1 supports is 0.55.4
.
You should change the ipfs
(or ipfs-core
) version in your package.json
to ^0.55.4
.
Note: The upcoming OrbitDB v0.27, will support the latest IPFS version.
QUESTION
Is it possible to implement a WebService over a WebRTC Data Channel ?
The idea is:
- The client makes one https request to the server for signaling and session establishment
- The client and the server start to communicate via a WebRTC DataChannel bidirectionally
Benefits?:
- Performance ?
- Requests goes over one connection and the standard allows for multiple datachannels over the same connection ( ports )
- Flexible networking topologies
- UDP
- End to end encryption
- The server can send events over the same connection
- Load balancing could be implemented from a pool of servers client side without a load balancer , or all kinds of different solutions
- Currently being debated the addition of DataChannels to Workers/Service Workers/ etc https://github.com/w3c/webrtc-extensions/issues/64
Drawbacks:
- Application specific code for implementing request fragmentation and control over buffer limits
- [EDIT 3] I don't know how much of a difference in terms of performance and cpu/memory usage will it be against HTTP/2 Stream
Ideas:
- Clients could be read replicas of the data for sync, or any other applications that are suitable for orbit-db https://github.com/orbitdb/orbit-db in the public IPFS network, the benefit of using orbit-db is that only allows to the owner to make writes, then the server could additionally sign with his key all the data so that the clients could verify and trust it's from the server, that could offload the main server for reads, just an idea.
[EDIT]
I've found this repo: https://github.com/jsmouret/grpc-over-webrtc amazing!
[EDIT2]
Changed Orbit-db idea and removed cluster IPFS after investigating a bit
[EDIT3]
After searching Fetch PROS for HTTP/2 i've found Fetch upload streaming with ReadableStreams, i don't know how much of a difference will it be to run GRPC (bidi) over a WebRTC DataChannel or a HTTP/2 Stream
Very cool video explaining the feature: https://www.youtube.com/watch?v=G9PpImUEeUA
...ANSWER
Answered 2021-Apr-22 at 22:08Lots of different points here, will try to address them all.
The idea is 100% feasible. Check out Pion WebRTC's data-channels example. All it takes a single request/response to establish a connection.
PerformanceData channels are a much better fit if you are doing latency sensitive work.
With data channels you can measure backpressure. You can tell how much data has been delivered, and how much has has been queued. If the queue is getting full you know you are sending too much data. Other APIs in the browser don't give you this. There are some future APIs (WebTransport) but they aren't available yet.
Data channels allow unordered/unreliable delivery. With TCP everything you send will be delivered and in order, this issue is known as head-of-line blocking. That means if you lose a packet all subsequent packets must be delayed. An example would be if you sent 0 1 2 3
, if packet 1 hasn't arrived yet 2 and 3 can't be processed yet. Data channels can be configured to give you packets as soon as they arrive.
I can't give you specific numbers on the CPU/Memory costs of running DTLS+SCTP vs TLS+WebSocket server. It depends on hardware/network you have, what the workload is etc...
MultiplexingYou can serve multiple DataChannel streams over a single WebRTC Connection (PeerConnection). You can also serve multiple PeerConnections over a single port.
Network TransportWebRTC can be run over UDP or TCP
Load BalancingThis is harder (but not intractable) moving DTLS and SCTP sessions between servers isn't easy with existing libraries. With pion/dtls it has the support to export/resume a session. I don't know support in other libraries however.
TLS/Websocket is much easier to load balance.
End to end encryptionWebRTC has mandatory encryption. This is nice over HTTP 1.1 which might accidentally fall back to non-TLS if configured incorrectly.
If you want to route a message through the server (and not have the server see it) I don't think what protocol you use matters.
TopologiesWebRTC can be run in many different topologies. You can do P2P or Client/Server, and lots of things in between. Depending on what you are building you could build a hybrid mesh. You could create a graph of connections, and deploy servers as needed. This flexibility lets you do some interesting things.
Hopefully addressed all your points! Happy to discuss further in the comments/will keep editing the question.
QUESTION
In README on github i see this example
...ANSWER
Answered 2021-Mar-21 at 20:06To build this example run the following commands
QUESTION
I am trying to use orbit-db along with the IPFS and I am going through the official documentation of OrbitDB. ATM, I am simply trying to create a db(specifically key-value store) and I have the following code uptil now
...ANSWER
Answered 2020-Jun-24 at 08:17I think there's a small issue with your accessController
.
The presence of the admin
property indicates that you want to use the orbitdb
type like this:
QUESTION
I'm trying to use Orbit-DB, So I follow the guide. But at the Create a database step, I get an error:
...ANSWER
Answered 2020-May-13 at 09:18IPFS has changed the way you construct an IPFS node, can you try this code:
QUESTION
I'm trying to build a Dapp with Nodejs and IPFS/OrbitDB every time, I try to start my App I get the error:
this.node = new IPFS({ ^
TypeError: IPFS is not a constructor
This is my basic code without a specific Swarm:
...ANSWER
Answered 2020-Apr-21 at 15:09I did it now like that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install orbit-db
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page