GenosDB (GDB) – Decentralized P2P Graph Database

25 estebanrfp 4 7/31/2025, 1:22:22 PM npmjs.com ↗

Comments (4)

mttpwll · 4h ago
This seems like an impressive amount of work and an interesting way to combine RBAC + [realtime] Sync/Conflict Resolution + [local] Document Storage/Querying (and I'm personally interested in the geo module and am intrigued by the AI module to help with some async data pipelines); however, I'm having trouble seeing how this is graph database? Maybe I'm misunderstanding, but I don't see ways for traversing the graph.

I understand that you can create and store a node and then link that node to another node, but how could I query for nodes based on that link/relationship?

E.g.,

```

  const alice = await db.put({ name: "Alice", age: 30 });
  const bob = await db.put({ name: "Bob", age: 31 });
  const cooper = await db.put({ name: "Cooper", age: 29 });
  const dwight = await db.put({ name: "Dwight", age: 33 });
  
  await db.link(alice, bob);
  await db.link(alice, cooper);
  await db.link(cooper, dwight);
  
  const { results } = await db.map({
    query: {
      'edges.age': { $gt: 30 } // pseudo code
    },
  });
  
  console.log(results[0].name); // 'Alice'
```

I see that an `edges` property is added on result nodes from one of the examples[1] and I'm not familiar with Mongo-style queries[2] to know if there's a better operator, but the query above is meant to find nodes that have connected/edge nodes that have an age greater than 30 (e.g., Bob).

(Also, I'm not sure what it'd look like to check against direct AND indirect edges? e.g., Bob and Dwight)

Anyways, my question/point is, is there support (or plans to support) querying and traverse a directed graph?

[1] https://github.com/estebanrfp/gdb/wiki/.map()#b-query-langua... [2] https://estebanrfp.github.io/gdb/examples/testlinks.html

catoAppreciator · 6h ago
Looks very promising. Do you have a vision for how we should build p2p apps more generally? I have recently found the holepunch libraries / pear runtime and am curious if you have any thoughts on those projects or how hypercore(?) compares to genosDB.
splintercell · 6h ago
How does it relate to in comparison to gunDB?
r14c · 5h ago
I haven't heard about gun in a long time. Did they ever figure out their conflict resolution algorithm? I recall their hypothetical amnesia machine or whatever didn't have well defined behavior.