On Fri, Jun 11, 2010 at 12:20 PM, Mattias Persson <matt...@neotechnology.com
> wrote:

> I tried performance of BabuDB recently. I'm not very used to key-value
> stores, but I chose this layout of the keys/values:
>
>   key: key|value|id
>   value: id
>

I might be missing something here, but from my interpretation, what you are
saying here is that:

The key is created by combining the index key, the index value and the id of
the indexed node

i.e. if I do:
    indexService.index( graphdb.getNodeById( 17 ), "name", "Tobias" );
The key in this case would be:
   name|Tobias|17

Then I want to do lookup:
    for (Node node : indexService.getNodes( "name", "Tobias" )) { ... }
How would I construct the key then? The reason I'm doing index lookup is
because I don't know the node id.

So I'm obviously missing some key thing that makes this work.

The way I would design something like this is to let the key be a
combination of index key and index value, then let the value be a list of
ids. But I don't know what the concurrency aspects would be for BaduDB in
this case. Is there a way to lock an entry while modifying it, or are there
CAS operations that could be uses?

Cheers,
-- 
Tobias Ivarsson <tobias.ivars...@neotechnology.com>
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to