You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been testing voyager for my needs and want to give some feedback and maybe propose some changes or alternatives.
I have added @orbitdb/voyager to my web app in browser A, where I created a voyager instance via a multi address. When creating or opening a db via voyager.orbitdb.open(..) I always added the resulting db afterwards to voyager (voyager.add(db)) the db was synced to voyager.
So all browser peers did like that and nothing seemed wrong, when I was adding the orbitdb.id to voyager instance via the command line with voyager auth add did
Today, I tried a different approach
I created a libp2p relay + Helia + OrbitDB
When ever a peer connects to the relay it sends all OrbitDB addresses to the relay, so my thought was: "Why not read those OrbitDB addresses and sync them on the relay? Like that I could still filter only db's from those identities for pinning.
libp2p.addEventListener('connection:open', async (event) => {
const connection = event.detail
try {
// Run identify on the connection
const identifyResult = await libp2p.services.identify.identify(connection)
const orbitDBProtocols = identifyResult.protocols.filter(protocol =>
protocol.startsWith('/orbitdb/heads')
).map(protocol =>
protocol.replace('/orbitdb/heads', '')
);
log('Found OrbitDB protocols:', orbitDBProtocols);
// Get records from all discovered databases
const recordCounts = await syncAllOrbitDBRecords(orbitDBProtocols);
} catch (err) {
console.error('Error during identify triggered by connection:open', err)
}
})
Like this I wouldn't need to add voyager to he browser app as dependency and everything seems more straight forward.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been testing voyager for my needs and want to give some feedback and maybe propose some changes or alternatives.
I have added @orbitdb/voyager to my web app in browser A, where I created a voyager instance via a multi address. When creating or opening a db via voyager.orbitdb.open(..) I always added the resulting db afterwards to voyager (voyager.add(db)) the db was synced to voyager.
So all browser peers did like that and nothing seemed wrong, when I was adding the orbitdb.id to voyager instance via the command line with
voyager auth add didToday, I tried a different approach
Like this I wouldn't need to add voyager to he browser app as dependency and everything seems more straight forward.
Beta Was this translation helpful? Give feedback.
All reactions