mafintosh / hyperdb

Distributed scalable database
MIT License
753 stars 75 forks source link

Expose underlying feeds #44

Closed hackergrrl closed 6 years ago

hackergrrl commented 6 years ago

In p2p-db-osm I've been using pubkey + seq to reference unique nodes in a hyperdb. However, it means having to reach into db._writers to

  1. convert node.feed from an integer to a writer, so I can get its public key
  2. iterate over _writers so I can later match a pubkey to a writer object
  3. use writer.get() to get that node from the stored seq

Maybe the real problem is that there isn't a durable way to refer to a specific node in the database? The nodes mapped to by a key changes often, and a db.version checkout captures too much data (all writers' pubkeys and sequence numbers).

mafintosh commented 6 years ago

fixed in master using db.feeds