Perhaps then it is sensible to introduce a second layer of nodes, so that you 
split down your "supernodes" and distribute the write contention?

Would be interesting if putting a round robin on that second level of color 
nodes would be enough to spread lock contention?

This is what peter talks about in his activity stream update scenario.

And in general perhaps a step to a more performant in-graph index.

When thinking about in-graph indexes I thought it might perhaps be interesting 
to re-use the HashMap approach of declaring x (2^n) bucket-nodes then having 
from the index-root node relationships with the (re-distributed) hashcode & 
(x-1) relationship-types to the bucket nodes and below the bucket node rels 
with the concrete value as an relationship attribute to the concrete nodes.

I think this will be addressed even better with Craig's indexes or the 
Collection abstractions that Andreas Kollegger is working on.

Cheers

Michael

Am 02.05.2011 um 12:16 schrieb Rick Bullotta:

> Hi, Niels.
> 
> That's what we're doing now, but it has performance issues with large #'s of 
> relationships when "cars" are constantly being added, since the "color" nodes 
> become synchronization bottlenecks for updates.
> 
> Rick
> 
> ________________________________________
> From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf 
> Of Niels Hoogeveen [pd_aficion...@hotmail.com]
> Sent: Sunday, May 01, 2011 9:41 AM
> To: user@lists.neo4j.org
> Subject: Re: [Neo4j] Lucene/Neo Indexing Question
> 
> One option would be to create a unique value node for each distinct color and 
> create a relationship from car to that value node. The value nodes can be 
> grouped together with relationships to some reference node.
> 
> This gives the opportunity of finding all distinct colors, and it allows you 
> to find all cars with that particular color.
>> Date: Sun, 1 May 2011 14:41:40 +0200
>> From: matt...@neotechnology.com
>> To: user@lists.neo4j.org
>> Subject: Re: [Neo4j] Lucene/Neo Indexing Question
>> 
>> 2011/4/26 Rick Bullotta <rick.bullo...@thingworx.com>:
>>> Hi, Mattias.
>>> 
>>> Here's a use case:
>>> 
>>> I have a million nodes representing cars, and those nodes are all "tagged" 
>>> with some value, let's say a color name, as a property.  I have indexed 
>>> those nodes on the color property value.  Now I'd like to present a list of 
>>> the distinct color values with which nodes (cars) have been tagged.  At 
>>> present, I'd need to iterate through all million, read the property, and 
>>> maintain a "distinct" HashSet as I iterate through them.
>>> 
>>> I've tried using relationships from the "car" node(s) to a set of "color" 
>>> node(s), but had scalability/performance issues when there are lots of car 
>>> nodes being added/deleted (the "color" node quickly becomes a hot 
>>> spot/synchronization choke point).
>> 
>> Allright, yeah such nodes can become bottlenecks, so I see your
>> problem for sure.
>>> 
>>> Rick
>>> 
>>> 
>>> -----Original Message-----
>>> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
>>> Behalf Of Mattias Persson
>>> Sent: Tuesday, April 26, 2011 2:17 PM
>>> To: Neo4j user discussions
>>> Subject: Re: [Neo4j] Lucene/Neo Indexing Question
>>> 
>>> Hi Rick,
>>> 
>>> No, not really. What the use case for having such a method?
>>> 
>>> 2011/4/26 Rick Bullotta <rick.bullo...@thingworx.com>:
>>>> Hi, all.
>>>> 
>>>> Is there a method or suggested approach for obtaining a list of all of the 
>>>> distinct key values in a given index?  I don't care about the indexed 
>>>> nodes or relationships themselves, just the value(s) of the key.
>>>> 
>>>> Thanks,
>>>> 
>>>> Rick
>>>> 
>>>> _______________________________________________
>>>> Neo4j mailing list
>>>> User@lists.neo4j.org
>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Mattias Persson, [matt...@neotechnology.com]
>>> Hacker, Neo Technology
>>> www.neotechnology.com
>>> _______________________________________________
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>> _______________________________________________
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>> 
>> 
>> 
>> 
>> --
>> Mattias Persson, [matt...@neotechnology.com]
>> Hacker, Neo Technology
>> www.neotechnology.com
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
> 
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to