ipfs-shipyard / ipfs-shipyard/tevere
Persist data across page reloads / multiple browsers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Hello Pedro, thanks again for building this. I was wondering if it's possible to use this as an actual database to persist data across sessions. I might be confused about the inner workings of this or I am mistaking it for something different entirely. Currently I'm using Memdown as the log storage and levelup to access the leveldown API like this:
const Tevere = require('tevere');
const Memdown = require('memdown');
const levelup = require('levelup');
const db = Tevere('coolpartition', {
log: Memdown('coolpartition'),
});
const tevere = levelup(db);
tevere.put('boo', 'foo', (err) => {
console.log(err);
});
// This is being done after a page reload
tevere.get('boo', (err, val) => {
console.log(err);
console.log(val);
});
but I'm getting a Not Found error when getting the key after a page refresh.
Is it possible to persist the data across sessions and browsers? How's the log db actually used?
Furthermore I'm getting this error when running the above script:
Uncaught Error: no protocol with name: p2p-webrtc-star
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Tevere initialization using the log option and the levelup get/put example, then trace how Memdown behaves after a page reload and how p2p-webrtc-star is registered. Done should establish whether cross-session and cross-browser persistence is supported, document the required storage and protocol setup, and account for the reported Not Found and protocol errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100