Comments (13)
- 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
- if you want to replicate with another machine, you first have to connect / dial a multi address.
- 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
- if you have a repo, I could have a look...
from orbitdb.
yes, this seems outdated:
see:
- https://github.com/orbitdb/orbitdb/tree/helia/docs and
- https://github.com/orbitdb/orbitdb/tree/helia/test
from orbitdb.
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.
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.
I even delete the orbitdb and node_modules folders for the project and re-ran npm install
from orbitdb.
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.
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.
I would like to just delete that db and start again
from orbitdb.
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.
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.
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.
ok,
the usage section shows it using ipfs-core though!?
from orbitdb.
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)
- getAccessController is not exported HOT 1
- Custom AccessController is not immutable HOT 19
- orbit-db-nextgen or this? HOT 1
- can we link data? HOT 1
- Error: No native build was found for platform=darwin arch=arm64 runtime=node abi=108 uv=1 armv=8 libc=glibc node=18.12.0 HOT 2
- Orbitdb does not work on Nest.js. HOT 5
- db.address wont open and opening a new db gives me the same address HOT 2
- In React, Uncaught Error: Cannot find module 'interface-datastore/key' HOT 2
- Database stalls on traverseAndVerify() HOT 2
- a priori knowledge of database address HOT 12
- TimeoutError: request timed out when syncing between databases HOT 5
- Local network only IPFS HOT 14
- How to sync with several databases HOT 5
- Remove malicious node HOT 3
- Restarted orbitdb is not informed in update listener about all new added documents HOT 10
- why node 20? HOT 3
- Recover from [AggregateError: All promises were rejected] Error: Want for xyz aborted HOT 4
- Uncaught Error: Could not append entry: although write access is granted HOT 7
- Error: fetching raw block for CID HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbitdb.