How to use the `discoveryKey` to query values from remote instance?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 748
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Trying to achieve this below scenario, which for some reason is turning out to be complex than is necessary - any help is highly appreciated:
- I have a db setup locally with the following example code
````
const db = hyperdb('./my.db', {valueEncoding: 'utf-8'})
db.put('foo/bar/baz', 'hi')
````
- Now, from the docs it is clear that with `db.discoveryKey` this local data should become accessible remotely
- What is not clear is, how to use this `db.discoveryKey` to query the value of `foo/bar/baz` ?
In other words, I have a `db.discoveryKey` and I have a field `key` - I am just interested in getting the latest value for that field key (and possibly its history, if required), without worrying about keeping the data in sync at the remote.
Is there some API call or some simple way to do this? Setting up replication, sockets, network sync seems to be overkill for such simple task. There must be a simpler way that I seem to be missing.
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
No files or tests are named in the issue. Start with the discoveryKey documentation and the replication or network API; done means establishing whether direct remote queries are supported and documenting the required usage or clarifying that replication is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- databases, distributed-systems
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100