Giter Club home page Giter Club logo

Comments (13)

silkroadnomad avatar silkroadnomad commented on June 11, 2024 1
  1. probably you ran your db twice and second time you can not write. This is if your identity is another one then the first time. But since it is writable to all it, it should actually write. Check https://github.com/orbitdb/orbitdb/blob/main/test/orbitdb-write-access.test.js
  2. if you want to replicate with another machine, you first have to connect / dial a multi address.
  3. there are replication tests and other tests in the directory. In case they work for you, it should be possible to adapt for a nodejs or browser app
  4. if you have a repo, I could have a look...

from orbitdb.

silkroadnomad avatar silkroadnomad commented on June 11, 2024 1

yes, this seems outdated:
see:

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

If I run the same code on another ubuntu machine then it times out at opening the db here: db.u = await orbitdb.open(net.u, {

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

im running node v20.9.0 on both machines and the are both ubuntu but they are both being weird with the same code on both!

machine A) opens the db but does not allow the user who created it to write to it

machine B) does not open it, hangs and times out with UnhandledPromiseRejectionWarning

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

I even delete the orbitdb and node_modules folders for the project and re-ran npm install

from orbitdb.

silkroadnomad avatar silkroadnomad commented on June 11, 2024

Imho, replication should work without manually connecting peers, afaik OrbitDB already connects them via libp2p pubsub. You can check this by having a look at the p2plib peers. You can also ping the peers with libp2p ping function.
databases only replicate, if both db's identities have write permission.

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

I don't have a repo. I'm just on the 2 computers. I think what I did was first run I created the db without write: ['*'] an so on next run i could not write. how do I just start again?

if you want to replicate with another machine, you first have to connect / dial a multi address

Is there an example? I am pretty overwhelmed with the way the docs are all over the place and some of it is outdated. I literally have a million tabs open and a tone of notes and snippets collected

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

I would like to just delete that db and start again

from orbitdb.

silkroadnomad avatar silkroadnomad commented on June 11, 2024

You can just create a new db. As soon as you have a new address, you can forget about the old one.

I am more focused on the browser-to-browser (local first) and not so much on the replication between orbitdb's (js-ipfs) nodes. But what helped me last year (it's an even older version) was https://github.com/orbitdb/web3-workshop.
I don't know if that would still work, but it explains everything step by step. I am not sure if it does the replication correctly right now since the browser peers need to be connected via an WebRTC star node.

In my opinion, right now, the older versions are not worth looking at anymore since js-ipfs became Helia and OrbitDB is getting ported to Helia. (see helia branch) Helia is more or less "everything" different and re-written. And so is the helia branch of OrbitDB too.

In order to understand everything better, I had to step back and focus on the basics of libp2p and Helia first.This is what I am doing right now. I am currently writing my own examples (for Svelte) to understand everything better. I start with libp2p!
You can check this out for example: https://github.com/libp2p/universal-connectivity

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

thanks for your help,

About the Orbitdb helia; that's what I want to use but it said that it's not ready or at least If I did find the helia repo it looks the same like it's not ready there ether!?!?

NOTE! js-ipfs and related packages are now superseded by IPFS's Helia project and are no longer being maintained. As part of this migration, OrbitDB will be soon switching to Helia.

that link (switching to Helia) just takes me to https://github.com/ipfs/helia

I'm not sure where to go to use the helia version of orbit

Also: universal-connectivity does not show how to use orbit with it. I think your team needs to delete all of the old code because it is incredibly crazy to navigate though and find out what to look at. Plus I know it's all modular but, I need tutorials on putting it all together.

from orbitdb.

silkroadnomad avatar silkroadnomad commented on June 11, 2024

you can add orbitdb helia to your project like so:
npm install "https://github.com/orbitdb/orbitdb.git#helia"
(that's how I am doing it)

from orbitdb.

benzmuircroft avatar benzmuircroft commented on June 11, 2024

ok,

the usage section shows it using ipfs-core though!?

from orbitdb.

haydenyoung avatar haydenyoung commented on June 11, 2024

The version 1.0 release of OrbitDB uses js-ipfs. The reason for this has been well documented. OrbitDB is moving to Helia but without funding the project relies on volunteers. The OrbitDB Helia upgrade has also been well documented.

If your issues are related to IPFS and Helia. I would recommend directing questions to the Helia and libp2p projects especially if you are having explicit issues with them (bugs, config issues, etc).

Lastly, Libp2p, Helia and js-ipfs are new technologies solving a very complex problem. Therefore, a good understanding of those projects is required in order to use OrbitDB to its full capacity. There is, however, a quick way to become familiar with P2P integrations using OrbitDB and js-ipfs/Helia. You can leverage the extensive number of unit tests that are bundled with OrbitDB. I would recommend using these as a first step.

I suggest starting here. If you can get this working, expand the examples using this. If you are still experiencing issues due to a limitation or bug within OrbitDB please feel free to re-open this issue or start a new one.

from orbitdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.