-
-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using OrbitDB offline? #367
Comments
In general, we don't have great primitives yet for going offline/online manually at the moment. We've talked about them in the past but so far none had the need for such functionality. Having functionality to get a db go offline/online at will shouldn't be hard to build but afaik none's looked at what exactly would be required. As for your particular example and error, sounds to me that something happened with the dev server infrastructure or code as it's giving you an actual error at connect. Hopefully ppl in the issue you opened (thank you!) will be able to give some insight to what happened. Meanwhile, you can try to run a local signal-sever with https://github.com/libp2p/js-libp2p-websocket-star-rendezvous (this is afaik the same as what's running on the libp2p dev server) and see if that's any different. If not, it may be a code bug (and nothing to do with the dev server infrastructure). As for how to start offline and then connect: iirc we currently always start pubsub internally in OrbitDB, so it may not be possible to strictly "start offline" with IPFS (tbh I haven't tried this in a very long time). It may be possible to workaround that by starting the IPFS node "online" as you do now, leave the Swarm array empty (don't connect to anyone at start), run OrbitDB normally and then in your app-level code call That said, it'd be great to add this to the backlog of features and functionality so that we some day can provide something simple like |
Thanks a lot for your quick response! This helps me a lot. I tried looking for a repo with the dev signal server setup, but there are just so many repos under libp2p and I didn't come across this one. I would love to hear that this functionality made it into the backlog 👍 . With this information, it shouldn't be too difficult to add this to my code. I'll tell you if its working. |
Hi @maxkerp! Just wanted to let you know that thanks to your issue and thoughtful question, we were able to address this in the new OrbitDB Field Manual! Check out that chapter for more info and feel free to open a ticket there if you have more questions. |
Hi there,
I don't know if this is a
orbit-db
question or ajs-ipfs
question, but I came across an error which prohibits me from usingorbit-db
offline. When creating theipfs
node configured to use the dev signal server, I get an error an the node is never created, thus making it impossible to useorbit-db
. This is the config:I created an issue here libp2p/js-libp2p-websockets#74
This is the error: WebSocket Error wss://ws-star.discovery.libp2p.io/socket.io
So my question is:
How would I go about creating a node and instantiating
orbit-db
using it offline, and connecting to the rest of the network at a later time?With an empty
Swarm: []
array, working offline is working just fine Catching the error isn't the problem, but connecting to the network at a later time seems to be.The text was updated successfully, but these errors were encountered: