Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

question: can I use DHT for generic LWW record store? #1489

Closed
pgte opened this issue Aug 6, 2018 · 3 comments
Closed

question: can I use DHT for generic LWW record store? #1489

pgte opened this issue Aug 6, 2018 · 3 comments
Labels
kind/support A question or request for support

Comments

@pgte
Copy link
Contributor

pgte commented Aug 6, 2018

I want to be able to save random key->value entries in the DHT.
I'm ok with not having any consistency guarantees (writes to the same key not being linearisable).
Is there any way I can use the current DHT implementation for this?

@pgte
Copy link
Contributor Author

pgte commented Aug 6, 2018

The main reason I'm asking this is that apparently I can save a record (at least ipfs.dht.put(k, v) returns), but when I do a ipfs.dht.get(k) with the same key, I get:

Uncaught Error: Record key does not have a selector function
      at Object.bestRecord (node_modules/libp2p-record/src/selection.js:21:11)
      at waterfall (node_modules/libp2p-kad-dht/src/private.js:298:42)
      at nextTask (node_modules/async/waterfall.js:16:14)
      at next (node_modules/async/waterfall.js:23:9)
      at node_modules/async/internal/onlyOnce.js:12:16
      at waterfall (node_modules/libp2p-kad-dht/src/index.js:284:9)
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at waterfall (node_modules/libp2p-kad-dht/src/index.js:244:20)
      at nextTask (node_modules/async/waterfall.js:16:14)
      at next (node_modules/async/waterfall.js:23:9)
      at node_modules/async/internal/onlyOnce.js:12:16
      at setImmediate (node_modules/multihashing-async/src/utils.js:8:7)
      at Immediate.<anonymous> (node_modules/async/internal/setImmediate.js:27:16)

(where the key is a random string with no "/" characters)

@alanshaw alanshaw added kind/support A question or request for support status/ready Ready to be worked labels Aug 7, 2018
@alanshaw
Copy link
Member

alanshaw commented Aug 7, 2018

@diasdavid I can't speak to this - are you able to shed some light?

@alanshaw
Copy link
Member

alanshaw commented Nov 1, 2018

If you still need an answer to this @pgte I think @vasco-santos is working on this so might be able to help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

2 participants