[Neo4j] Unrolled Linked List
Hi all, I have added an in graph representation of an unrolled linked list to the graph collections code, currently just in my githug repo: https://github.com/brycenz/graph-collections See this in particular: https://github.com/brycenz/graph-collections/blob/master/src/main/java/org/neo4j/collections/list/UnrolledLinkedList.java The name comes from: http://en.wikipedia.org/wiki/Unrolled_linked_list And it works roughly in the same manner, though I had the idea prior to reading the wiki article. As the UnrolledLinkedList class implements the NodeCollection interface it can be used as the backing of an IndexedRelationship, which is done in tests here: https://github.com/brycenz/graph-collections/blob/master/src/test/java/org/neo4j/collections/indexedrelationship/TestUnrolledLinkedListIndexedRelationship.java The main reason for me being interested in this, and an example of where this is (probably) really useful is in the following case: - you have a number of tag (or category, folder etc.) nodes - they each link to a large number of document (or article, comments, post etc.) nodes - using a single relationship type - you generally only are interested in showing the newest documents in descending date order (showing the head, in a paged ui) - documents are generally added in ascending date order (added to the head) The benefits come from being able to iterate over a small percentage of a collection of nodes in a fixed order without having to first load all the nodes and sort them. This reduces the amount of data read in from disk, reduces the turnover of data in memory, and therefore aids with reduction in garbage collection. In my case I have a large number of tags with a large number of items against them, I might read the first 100-200 items out of a collection of 30,000 and therefore by not reading in the other 29800 relationships / nodes (per tag) I should be saving 90% or more. here's hoping. >From the java doc: The structure is broken into "pages" of links to nodes where the size of the page can be controlled at initial construction time. Page size is not fixed but instead can float between a lower bound, and an upper bound. The bounds are at a fixed margin from the page size of M. When a page drops below the lower bound it will be joined onto the an adjacent page, and when the page goes above the upper bound it will be split in half. I am about to do some tests with this based on my use case and will report back on the performance impacts. Cheers Bryce P.S. still thinking about how to make this thread safe, any suggestions would be appreciated (presently only one thread will be able to write at a time, I am worried about a thread reading while another is writing, especially when it joins / splits pages or changes the head). ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] List all indexed key/values for an entity
OED and Merriam Webster both say it can be either: http://www.merriam-webster.com/dictionary/index I have no technical reasoning one way or the other which it should be called. (A quick search shows that "indices" is slightly more favored in maths and science, while "indexes" is the more common form) And I promise this is the last I will comment about it. :) -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3357630.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Error in performance docs - Stack Size
AAh, excellent, thank for that, I guess stack sizes should be in the 1024k range though not 1024m on 64 bit machines? -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Linan Wang Sent: Thursday, 22 September 2011 11:37 AM To: Neo4j user discussions Subject: Re: [Neo4j] Error in performance docs - Stack Size k/m/g all work. just tried on 1.6. On Thu, Sep 22, 2011 at 2:22 AM, Romiko Derbynew wrote: > Sorry, clicked wrong button: > http://wiki.neo4j.org/content/Configuration_Settings > > The stack size is set by specifying the -Xss???m parameter to hotspot, where > ??? is the stack size in megabytes. > > As far as I am aware, according to this document: > http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp#stack-size > The stack size in in kilobytes, which kind a makes sense. > -Xss determines the size of the stack: -Xss1024k > > Please confirm? > > From: Romiko Derbynew > Sent: Thursday, 22 September 2011 11:19 AM > To: 'user@lists.neo4j.org' > Subject: Error in performance docs - Stack Size > > Hi Guys, > > I think there is an error in the performance docs. I am currently tuning the > stack size as we use multiple threads, however, I see this in the docs: > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Best regards Linan Wang ___ 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] Turning Off or Configuring log rotation
Hi, I am using Neo4j on a Windows Server, is there any way I can configure log rotation via the configuration files? I would like to turn it off or try a different log rotation size. Since I am on windows, I am not sure how I would do it at runtime. Thanks! ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Error in performance docs - Stack Size
k/m/g all work. just tried on 1.6. On Thu, Sep 22, 2011 at 2:22 AM, Romiko Derbynew wrote: > Sorry, clicked wrong button: > http://wiki.neo4j.org/content/Configuration_Settings > > The stack size is set by specifying the -Xss???m parameter to hotspot, where > ??? is the stack size in megabytes. > > As far as I am aware, according to this document: > http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp#stack-size > The stack size in in kilobytes, which kind a makes sense. > -Xss determines the size of the stack: -Xss1024k > > Please confirm? > > From: Romiko Derbynew > Sent: Thursday, 22 September 2011 11:19 AM > To: 'user@lists.neo4j.org' > Subject: Error in performance docs - Stack Size > > Hi Guys, > > I think there is an error in the performance docs. I am currently tuning the > stack size as we use multiple threads, however, I see this in the docs: > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Best regards Linan Wang ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Error in performance docs - Stack Size
Sorry, clicked wrong button: http://wiki.neo4j.org/content/Configuration_Settings The stack size is set by specifying the -Xss???m parameter to hotspot, where ??? is the stack size in megabytes. As far as I am aware, according to this document: http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp#stack-size The stack size in in kilobytes, which kind a makes sense. -Xss determines the size of the stack: -Xss1024k Please confirm? From: Romiko Derbynew Sent: Thursday, 22 September 2011 11:19 AM To: 'user@lists.neo4j.org' Subject: Error in performance docs - Stack Size Hi Guys, I think there is an error in the performance docs. I am currently tuning the stack size as we use multiple threads, however, I see this in the docs: ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Error in performance docs - Stack Size
Hi Guys, I think there is an error in the performance docs. I am currently tuning the stack size as we use multiple threads, however, I see this in the docs: ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] List all indexed key/values for an entity
+1 But the plural of index is indices. On 22/09/2011 1:56 AM, "Peter Neubauer" wrote: > Josh, > very reasonable request. Could you please put that into an issue? I > suspect this is in line with better auto indexing support, I am not > sure how much of it there already is, so let's keep track of it in the > issue. > > Thanks! > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Mon, Sep 19, 2011 at 4:15 PM, jadell wrote: >> Is there any way via the REST API to list all the indexes and keys/values >> that a given entity is indexed on? Something like: >> >> GET http://0.0.0.0:7474/db/data/node/123/indexes >> >> returns: >> >> [ >> "http://0.0.0.0:7474/db/data/index/node/favorites/color/blue";, >> "http://0.0.0.0:7474/db/data/index/node/favorites/food/pizza";, >> "http://0.0.0.0:7474/db/data/index/node/users/name/josh";, >> "http://0.0.0.0:7474/db/data/index/node/authors/post/456";, >> ] >> >> Does anything exist that gives this functionality or similar? >> >> -- Josh Adell >> >> -- >> View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3348997.html >> Sent from the Neo4j Community Discussions mailing list archive at Nabble.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
Re: [Neo4j] neo4jphp and some cypher question
Could you execute the query in the cypher console? Could you also try to pass in the value "Antwerpen" as a literal to check? START n=(1) match a--n WHERE a.name= 'Antwerpen' RETURN a // try to add the order by after the query suceeded, might be that you have to use a.name? for that ORDER by a.name It could be that an error is consumed by the php client. Cheers Michael Am 21.09.2011 um 21:18 schrieb Peter Neubauer: > Filip, > yes, the where clause right now is filtering on the results of the > MATCH clauses results. As such, if the property is not on the node, it > will not be found, but you can of course use it is a starting lookup > query. However, I think Andres is working towards being able to detect > that properties are indexed and thus find it. For that, we need index > introspection (knowing what properties of a node are indexed, in what > indexes) which is features to add to the index framework. If you have > the property even on the node, the query should work as expected. > > Does that help? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Wed, Sep 21, 2011 at 6:44 PM, Filip De Haes wrote: >> Hi all, >> >> I've got a question about a cypher query. >> >> $queryText = "START n=(1) match a--n WHERE a.Gemeente return a"; >> >> This query returns the two locations (Gemeente) I have entered as a >> property of our buildings in the database. Hundred other buildings don't >> have that property yet. >> >> So far so good. >> >> $queryText = "START n=(1) match a--n WHERE a.Gemeente= ? RETURN a ORDER >> by a.name"; >> >> I would expect this query to return one result (? = "Antwerpen" passed >> through a variable as shown in the php examples). But it doesn't. >> However when I look this up with Luke in the lucene index, I can find it. >> >> When I search with ->query() it works: >> $theindex->query("Gemeente:Antwerpen") works as expected. >> >> $queryText = "START n=(1) match a--n WHERE a.name= ? RETURN a ORDER by >> a.name"; >> >> When I search for a building name property (all these buildings have a >> name) it does work as expected. >> >> So it seems putting properties in the WHERE-clause that are not >> generally available result in zero results. Or is it because I added >> Gemeente property later on the index... I don't know. >> >> Greetings and thanks, >> Filip >> ___ >> 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
Re: [Neo4j] Querying multivalued properties
Got it! Thx! Cheers, Alexandre. On Wed, 21 Sep 2011 13:27:07 +, Peter Neubauer wrote > Alexandre, > this I think is a Lucene question, maybe something like > http://lucene.472066.n3.nabble.com/Searching-a-group-of-associated-multi-value- > fileds-td2789957.html could help? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/ - Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > On Wed, Sep 21, 2011 at 3:08 AM, Alexandre de Assis Bento Lima > wrote: > > Hi, > > > > I need multivalued properties in my application. However, I don't know how > > to make queries > > based on them using indexes. I need to search nodes that have a certain > > value inside their > > multivalued properties (arrays). Does anybody know how can I do that? I > > couldn't find > > anything in the documentation. > > > > Thanks in advance! > > > > Alexandre. > > ___ > > 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 Alexandre A. B. Lima. COPPE/UFRJ. Tel.: +55-21-2562-8690. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4jphp and some cypher question
Filip, yes, the where clause right now is filtering on the results of the MATCH clauses results. As such, if the property is not on the node, it will not be found, but you can of course use it is a starting lookup query. However, I think Andres is working towards being able to detect that properties are indexed and thus find it. For that, we need index introspection (knowing what properties of a node are indexed, in what indexes) which is features to add to the index framework. If you have the property even on the node, the query should work as expected. Does that help? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Sep 21, 2011 at 6:44 PM, Filip De Haes wrote: > Hi all, > > I've got a question about a cypher query. > > $queryText = "START n=(1) match a--n WHERE a.Gemeente return a"; > > This query returns the two locations (Gemeente) I have entered as a > property of our buildings in the database. Hundred other buildings don't > have that property yet. > > So far so good. > > $queryText = "START n=(1) match a--n WHERE a.Gemeente= ? RETURN a ORDER > by a.name"; > > I would expect this query to return one result (? = "Antwerpen" passed > through a variable as shown in the php examples). But it doesn't. > However when I look this up with Luke in the lucene index, I can find it. > > When I search with ->query() it works: > $theindex->query("Gemeente:Antwerpen") works as expected. > > $queryText = "START n=(1) match a--n WHERE a.name= ? RETURN a ORDER by > a.name"; > > When I search for a building name property (all these buildings have a > name) it does work as expected. > > So it seems putting properties in the WHERE-clause that are not > generally available result in zero results. Or is it because I added > Gemeente property later on the index... I don't know. > > Greetings and thanks, > Filip > ___ > 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
Re: [Neo4j] REST API Base URI
Limiting access to certain URIs or IPs is great, but ideally at this moment I also need something like a key-based authentication so I can send a private key in the headers from my restclient and neo4j would authenticate and only take authenticated requests. Does the authentication extension support key-based authentication? If not, what forms of authentication does it currently support (user/password, token-based, shared-secret)? Thanks, Nuo On Wed, Sep 21, 2011 at 11:24 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Nuo, > Thomas Baum has been working on an authentication extension for Neo4j > Server, see https://github.com/neo4j/authentication-extension. He > could help you set it up and test it - it's used in hosting scenarios > and should do what you want in terms of limiting access to certain > URIs if that is what you want? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Wed, Sep 21, 2011 at 6:14 PM, Nuo Yan wrote: > > For my scenario, I currently only use the LB for request authentication, > so > > that not everyone on the network can access the neo4j server. In my use > > case, I think making the base uri configurable (including the protocol, > e.g. > > https://foobar.com/) is enough. > > > > There are a couple other approaches that may also solve my problem. For > > example, having a configurable option to make the REST APIs return only > > relative paths in the result. Or, if neo4j could have a built-in request > > authentication mechanism for the REST interface, I may be able to get rid > of > > the lb completely. > > > > > > On Wed, Sep 21, 2011 at 7:04 AM, Peter Neubauer < > > peter.neuba...@neotechnology.com> wrote: > > > >> Nuo, > >> right now the server is discovering its own IP upon startup. However, > >> it sounds reasonable to return configurable base URL. I am just > >> wondering if that really is enough to support a LB scenario? Do you > >> need more stuff there? > >> > >> Cheers, > >> > >> /peter neubauer > >> > >> GTalk: neubauer.peter > >> Skype peter.neubauer > >> Phone +46 704 106975 > >> LinkedIn http://www.linkedin.com/in/neubauer > >> Twitter http://twitter.com/peterneubauer > >> > >> http://www.neo4j.org - Your high performance graph > database. > >> http://startupbootcamp.org/- Öresund - Innovation happens HERE. > >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > >> > >> > >> > >> On Tue, Sep 20, 2011 at 6:57 PM, Nuo Yan wrote: > >> > I access my neo4j server through the REST API. For security purpose, I > >> put > >> > the neo4j server behind a nginx lb. I'm wondering if there is config > >> entry > >> > somewhere that I can set the neo4j server to return a customized base > uri > >> > that I can set to my LB's uri. > >> > > >> > For example, currently creating a node by POSTing to the lb (say > >> > https://10.0.0.1/db/data) returns > >> > > >> > { > >> > "outgoing_relationships" : " > >> > http://neo4j/db/data/node/160/relationships/out";, > >> > "data" : { > >> > }, > >> > "traverse" : "http://neo4j/db/data/node/160/traverse/{returnType}";, > >> > "all_typed_relationships" : " > >> > http://neo4j/db/data/node/160/relationships/all/{-list|&|types}", > >> > "property" : "http://neo4j/db/data/node/160/properties/{key}";, > >> > "self" : "http://neo4j/db/data/node/160";, > >> > "properties" : "http://neo4j/db/data/node/160/properties";, > >> > "outgoing_typed_relationships" : " > >> > http://neo4j/db/data/node/160/relationships/out/{-list|&|types}", > >> > "incoming_relationships" : " > >> http://neo4j/db/data/node/160/relationships/in > >> > ", > >> > "extensions" : { > >> > }, > >> > "create_relationship" : "http://neo4j/db/data/node/160/relationships > ", > >> > "paged_traverse" : " > >> > > >> > http://neo4j/db/data/node/160/paged/traverse/{returnType}{?pageSize,leaseTime} > >> > ", > >> > "all_relationships" : " > http://neo4j/db/data/node/160/relationships/all > >> ", > >> > "incoming_typed_relationships" : " > >> > http://neo4j/db/data/node/160/relationships/in/{-list|&|types}" > >> > > >> > > >> > Is there a config on the neo4j server that I can set to make it either > >> > return the lb URI "https://10.0.0.1"; as the base uri or return > relative > >> path > >> > in the result? > >> > ___ > >> > Neo4j mailing list > >> > User@lists.neo4j.org > >> > https://lists.neo4j.org/mailman/listinfo/user > >> > > >> ___ > >> Neo4j mailing list > >> User@lists.neo4j.org > >> https://lists.n
[Neo4j] neo4jphp and some cypher question
Hi all, I've got a question about a cypher query. $queryText = "START n=(1) match a--n WHERE a.Gemeente return a"; This query returns the two locations (Gemeente) I have entered as a property of our buildings in the database. Hundred other buildings don't have that property yet. So far so good. $queryText = "START n=(1) match a--n WHERE a.Gemeente= ? RETURN a ORDER by a.name"; I would expect this query to return one result (? = "Antwerpen" passed through a variable as shown in the php examples). But it doesn't. However when I look this up with Luke in the lucene index, I can find it. When I search with ->query() it works: $theindex->query("Gemeente:Antwerpen") works as expected. $queryText = "START n=(1) match a--n WHERE a.name= ? RETURN a ORDER by a.name"; When I search for a building name property (all these buildings have a name) it does work as expected. So it seems putting properties in the WHERE-clause that are not generally available result in zero results. Or is it because I added Gemeente property later on the index... I don't know. Greetings and thanks, Filip ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] REST API Base URI
you can see the usage with an embedded Neo4j Server instance in the test at https://github.com/neo4j/authentication-extension/blob/master/src/test/java/org/neo4j/server/extension/auth/TestAuthentification.java HTH Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Sep 21, 2011 at 6:24 PM, Peter Neubauer wrote: > Nuo, > Thomas Baum has been working on an authentication extension for Neo4j > Server, see https://github.com/neo4j/authentication-extension. He > could help you set it up and test it - it's used in hosting scenarios > and should do what you want in terms of limiting access to certain > URIs if that is what you want? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/ - Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Wed, Sep 21, 2011 at 6:14 PM, Nuo Yan wrote: >> For my scenario, I currently only use the LB for request authentication, so >> that not everyone on the network can access the neo4j server. In my use >> case, I think making the base uri configurable (including the protocol, e.g. >> https://foobar.com/) is enough. >> >> There are a couple other approaches that may also solve my problem. For >> example, having a configurable option to make the REST APIs return only >> relative paths in the result. Or, if neo4j could have a built-in request >> authentication mechanism for the REST interface, I may be able to get rid of >> the lb completely. >> >> >> On Wed, Sep 21, 2011 at 7:04 AM, Peter Neubauer < >> peter.neuba...@neotechnology.com> wrote: >> >>> Nuo, >>> right now the server is discovering its own IP upon startup. However, >>> it sounds reasonable to return configurable base URL. I am just >>> wondering if that really is enough to support a LB scenario? Do you >>> need more stuff there? >>> >>> Cheers, >>> >>> /peter neubauer >>> >>> GTalk: neubauer.peter >>> Skype peter.neubauer >>> Phone +46 704 106975 >>> LinkedIn http://www.linkedin.com/in/neubauer >>> Twitter http://twitter.com/peterneubauer >>> >>> http://www.neo4j.org - Your high performance graph database. >>> http://startupbootcamp.org/ - Öresund - Innovation happens HERE. >>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. >>> >>> >>> >>> On Tue, Sep 20, 2011 at 6:57 PM, Nuo Yan wrote: >>> > I access my neo4j server through the REST API. For security purpose, I >>> put >>> > the neo4j server behind a nginx lb. I'm wondering if there is config >>> entry >>> > somewhere that I can set the neo4j server to return a customized base uri >>> > that I can set to my LB's uri. >>> > >>> > For example, currently creating a node by POSTing to the lb (say >>> > https://10.0.0.1/db/data) returns >>> > >>> > { >>> > "outgoing_relationships" : " >>> > http://neo4j/db/data/node/160/relationships/out";, >>> > "data" : { >>> > }, >>> > "traverse" : "http://neo4j/db/data/node/160/traverse/{returnType}";, >>> > "all_typed_relationships" : " >>> > http://neo4j/db/data/node/160/relationships/all/{-list|&|types}", >>> > "property" : "http://neo4j/db/data/node/160/properties/{key}";, >>> > "self" : "http://neo4j/db/data/node/160";, >>> > "properties" : "http://neo4j/db/data/node/160/properties";, >>> > "outgoing_typed_relationships" : " >>> > http://neo4j/db/data/node/160/relationships/out/{-list|&|types}", >>> > "incoming_relationships" : " >>> http://neo4j/db/data/node/160/relationships/in >>> > ", >>> > "extensions" : { >>> > }, >>> > "create_relationship" : "http://neo4j/db/data/node/160/relationships";, >>> > "paged_traverse" : " >>> > >>> http://neo4j/db/data/node/160/paged/traverse/{returnType}{?pageSize,leaseTime} >>> > ", >>> > "all_relationships" : "http://neo4j/db/data/node/160/relationships/all >>> ", >>> > "incoming_typed_relationships" : " >>> > http://neo4j/db/data/node/160/relationships/in/{-list|&|types}" >>> > >>> > >>> > Is there a config on the neo4j server that I can set to make it either >>> > return the lb URI "https://10.0.0.1"; as the base uri or return relative >>> path >>> > in the result? >>> > ___ >>> > Neo4j mailing list >>> > User@lists.neo4j.org >>> > https://lists.neo4j.org/mailman/listinfo/user >>> > >>> ___ >>> Neo4j mailing list >>>
Re: [Neo4j] REST API Base URI
Nuo, Thomas Baum has been working on an authentication extension for Neo4j Server, see https://github.com/neo4j/authentication-extension. He could help you set it up and test it - it's used in hosting scenarios and should do what you want in terms of limiting access to certain URIs if that is what you want? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Sep 21, 2011 at 6:14 PM, Nuo Yan wrote: > For my scenario, I currently only use the LB for request authentication, so > that not everyone on the network can access the neo4j server. In my use > case, I think making the base uri configurable (including the protocol, e.g. > https://foobar.com/) is enough. > > There are a couple other approaches that may also solve my problem. For > example, having a configurable option to make the REST APIs return only > relative paths in the result. Or, if neo4j could have a built-in request > authentication mechanism for the REST interface, I may be able to get rid of > the lb completely. > > > On Wed, Sep 21, 2011 at 7:04 AM, Peter Neubauer < > peter.neuba...@neotechnology.com> wrote: > >> Nuo, >> right now the server is discovering its own IP upon startup. However, >> it sounds reasonable to return configurable base URL. I am just >> wondering if that really is enough to support a LB scenario? Do you >> need more stuff there? >> >> Cheers, >> >> /peter neubauer >> >> GTalk: neubauer.peter >> Skype peter.neubauer >> Phone +46 704 106975 >> LinkedIn http://www.linkedin.com/in/neubauer >> Twitter http://twitter.com/peterneubauer >> >> http://www.neo4j.org - Your high performance graph database. >> http://startupbootcamp.org/ - Öresund - Innovation happens HERE. >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. >> >> >> >> On Tue, Sep 20, 2011 at 6:57 PM, Nuo Yan wrote: >> > I access my neo4j server through the REST API. For security purpose, I >> put >> > the neo4j server behind a nginx lb. I'm wondering if there is config >> entry >> > somewhere that I can set the neo4j server to return a customized base uri >> > that I can set to my LB's uri. >> > >> > For example, currently creating a node by POSTing to the lb (say >> > https://10.0.0.1/db/data) returns >> > >> > { >> > "outgoing_relationships" : " >> > http://neo4j/db/data/node/160/relationships/out";, >> > "data" : { >> > }, >> > "traverse" : "http://neo4j/db/data/node/160/traverse/{returnType}";, >> > "all_typed_relationships" : " >> > http://neo4j/db/data/node/160/relationships/all/{-list|&|types}", >> > "property" : "http://neo4j/db/data/node/160/properties/{key}";, >> > "self" : "http://neo4j/db/data/node/160";, >> > "properties" : "http://neo4j/db/data/node/160/properties";, >> > "outgoing_typed_relationships" : " >> > http://neo4j/db/data/node/160/relationships/out/{-list|&|types}", >> > "incoming_relationships" : " >> http://neo4j/db/data/node/160/relationships/in >> > ", >> > "extensions" : { >> > }, >> > "create_relationship" : "http://neo4j/db/data/node/160/relationships";, >> > "paged_traverse" : " >> > >> http://neo4j/db/data/node/160/paged/traverse/{returnType}{?pageSize,leaseTime} >> > ", >> > "all_relationships" : "http://neo4j/db/data/node/160/relationships/all >> ", >> > "incoming_typed_relationships" : " >> > http://neo4j/db/data/node/160/relationships/in/{-list|&|types}" >> > >> > >> > Is there a config on the neo4j server that I can set to make it either >> > return the lb URI "https://10.0.0.1"; as the base uri or return relative >> path >> > in the result? >> > ___ >> > 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
[Neo4j] How to use RelationshipIndex'es in a Cypher Query?
Hi, I've got a Cypher query with some 10k possible source nodes and some 10k intended target nodes out of some 1M possible target nodes which looks something like the following: START source = (indexSourceNodes,"*"), target = (indexTargetNodes,"propertyTwo:*.txt") MATCH (source)-[:needsThisRelationshipType]->(target) WHERE (target.needsThisProperty) RETURN source,target Now, how can I convince this query to speed up using a relationship-index which I already constructed containing all the neccessary relationships? How can I use regular expressions for an index-subquery like this "propertyTwo:http(s)://.*\.txt" and how and what needs to be escaped inside that subquery. Thanks in advance for your answers. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] REST API Base URI
For my scenario, I currently only use the LB for request authentication, so that not everyone on the network can access the neo4j server. In my use case, I think making the base uri configurable (including the protocol, e.g. https://foobar.com/) is enough. There are a couple other approaches that may also solve my problem. For example, having a configurable option to make the REST APIs return only relative paths in the result. Or, if neo4j could have a built-in request authentication mechanism for the REST interface, I may be able to get rid of the lb completely. On Wed, Sep 21, 2011 at 7:04 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Nuo, > right now the server is discovering its own IP upon startup. However, > it sounds reasonable to return configurable base URL. I am just > wondering if that really is enough to support a LB scenario? Do you > need more stuff there? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Tue, Sep 20, 2011 at 6:57 PM, Nuo Yan wrote: > > I access my neo4j server through the REST API. For security purpose, I > put > > the neo4j server behind a nginx lb. I'm wondering if there is config > entry > > somewhere that I can set the neo4j server to return a customized base uri > > that I can set to my LB's uri. > > > > For example, currently creating a node by POSTing to the lb (say > > https://10.0.0.1/db/data) returns > > > > { > > "outgoing_relationships" : " > > http://neo4j/db/data/node/160/relationships/out";, > > "data" : { > > }, > > "traverse" : "http://neo4j/db/data/node/160/traverse/{returnType}";, > > "all_typed_relationships" : " > > http://neo4j/db/data/node/160/relationships/all/{-list|&|types}", > > "property" : "http://neo4j/db/data/node/160/properties/{key}";, > > "self" : "http://neo4j/db/data/node/160";, > > "properties" : "http://neo4j/db/data/node/160/properties";, > > "outgoing_typed_relationships" : " > > http://neo4j/db/data/node/160/relationships/out/{-list|&|types}", > > "incoming_relationships" : " > http://neo4j/db/data/node/160/relationships/in > > ", > > "extensions" : { > > }, > > "create_relationship" : "http://neo4j/db/data/node/160/relationships";, > > "paged_traverse" : " > > > http://neo4j/db/data/node/160/paged/traverse/{returnType}{?pageSize,leaseTime} > > ", > > "all_relationships" : "http://neo4j/db/data/node/160/relationships/all > ", > > "incoming_typed_relationships" : " > > http://neo4j/db/data/node/160/relationships/in/{-list|&|types}" > > > > > > Is there a config on the neo4j server that I can set to make it either > > return the lb URI "https://10.0.0.1"; as the base uri or return relative > path > > in the result? > > ___ > > 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
Re: [Neo4j] How to backup with neo4j community?
If on Linux, you could use DRBD, I suppose. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of McKinley Sent: Wednesday, September 21, 2011 11:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] How to backup with neo4j community? This came up recently on the list in August http://neo4j.org/forums/#nabble-td3274919. The last message in the thread has contact info and sounds like there is room for hearing your specific requirements. Cheers, McKinley On Wed, Sep 21, 2011 at 8:03 AM, Rugal wrote: > Hi, I'm starting a little side project in a startup which will use neo4j. > How > can I set the server to backup the data without stopping the neo4j server > and > without going with the enterprise version? as mush as I'd like to, but > really, > 2000 usd/month are too much for a bootstrapping startup (I can't neither > release the source code) > Thank you > > ___ 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
Re: [Neo4j] How to backup with neo4j community?
This came up recently on the list in August http://neo4j.org/forums/#nabble-td3274919. The last message in the thread has contact info and sounds like there is room for hearing your specific requirements. Cheers, McKinley On Wed, Sep 21, 2011 at 8:03 AM, Rugal wrote: > Hi, I'm starting a little side project in a startup which will use neo4j. > How > can I set the server to backup the data without stopping the neo4j server > and > without going with the enterprise version? as mush as I'd like to, but > really, > 2000 usd/month are too much for a bootstrapping startup (I can't neither > release the source code) > Thank you > > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] How to backup with neo4j community?
Hi, I'm starting a little side project in a startup which will use neo4j. How can I set the server to backup the data without stopping the neo4j server and without going with the enterprise version? as mush as I'd like to, but really, 2000 usd/month are too much for a bootstrapping startup (I can't neither release the source code) Thank you -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f Sponsor: Peluche Originali Disney, Simpson, Bugs Bunny, Spongebob... a partire da soli Euro 9.90! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11654&d=21-9 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j-scala improvements
Hi all I did... - Split it up to Neo4j Scala, which is mainly the old available neo4j-scala version. A little refactored and enhanced with "Case Class" to "Node properties" marshaling and some Traits for graph service provider handling (-> https://github.com/FaKod/neo4j-scala) - Neo4j Spatial Scala with some spatial convenience methods (-> https://github.com/FaKod/neo4j-spatial-scala) - I updated both READMEs to reflect the current state - lowered both version numbers to 0.1.0-SNAPSHOT (the old where 0.9.9... too high I think) - Updated Scala to 2.9.1 and Neo4j to the last available Neo4j Spatial compatible version (1.4.1) - started to add some more Specs2 test cases (still far away from enough) Should be a good starting point for playing, testing and discussing various design and DSL decisions :-) Cheers Christopher On Mon, Sep 12, 2011 at 9:17 PM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Awesome Christopher, > let us know when things are stabilizing, so we can start to put the > scala bindings onto the build server and run regular tests against > Neo4j master! > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Mon, Sep 12, 2011 at 9:03 PM, Christopher Schmidt > wrote: > > OK. I will > > - use my forked neo4j-scala repository for the Neo4j part > > - push the spatial part into my neo4j-spatial-scala repository which will > > have a dependancy to neo4j-scala. > > > > On Mon, Sep 12, 2011 at 9:58 AM, Anders Nawroth < > and...@neotechnology.com>wrote: > > > >> Hi! > >> > >> So far Neo4j and Neo4j Spatial don't share the same release cycle, so it > >> makes sense to split the scala wrapper in two projects. > >> > >> /anders > >> > >> On 09/12/2011 06:14 AM, Christopher Schmidt wrote: > >> > Yes - thats possible. I think to have a repo would ease the usage of > >> > neo4j-scala. > >> > The next days (hope there is enough time) I will clean up and document > >> the > >> > sources so that they are easier to understand. > >> > Next would be to update to the current versions of Neo4j, Neo4j > Spatial > >> and > >> > Scala. > >> > > >> > Actual, neo4j-scala includes the spatial wrapper as well, do you think > it > >> > is necessary to split it into two projects (neo4j-scala and > >> > neo4j-spatial-scala)? > >> > > >> > On Fri, Sep 9, 2011 at 3:21 PM, Peter Neubauer< > >> > peter.neuba...@neotechnology.com> wrote: > >> > > >> >> Very cool Christopher! > >> >> > >> >> We are testing to pull in some of the bindings for Neo4j into the > >> >> manual - would it be possible, when things stabilize, to pull in the > >> >> Scala bindings to the Neo4j repo. build them and start documenting > >> >> some test cases so we can put them into there, too? > >> >> > >> >> Cheers, > >> >> > >> >> /peter neubauer > >> >> > >> >> GTalk: neubauer.peter > >> >> Skype peter.neubauer > >> >> Phone +46 704 106975 > >> >> LinkedIn http://www.linkedin.com/in/neubauer > >> >> Twitter http://twitter.com/peterneubauer > >> >> > >> >> http://www.neo4j.org - Your high performance graph > >> database. > >> >> http://startupbootcamp.org/- Öresund - Innovation happens HERE. > >> >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing > party. > >> >> > >> >> > >> >> > >> >> On Fri, Sep 9, 2011 at 8:10 AM, Christopher Schmidt > >> >> wrote: > >> >>> Neo4j Scala (https://github.com/FaKod/neo4j-scala) has got some > >> >> improvements > >> >>> - Scala (non nested) Case Class de- serialization to or from a Neo4j > >> Node > >> >>> (see example) > >> >>> - index convenience methods (see example) > >> >>> - create and get Relation Objects, like val relation = start --> > "foo" > >> >> --> > >> >>> end<; > >> >>> > >> >>> It's still alpha, but worth to look at :-) > >> >>> > >> >>> case class Test(s: String, i: Int, ji: java.lang.Integer, d: Double, > l: > >> >>> Long, b: Boolean) > >> >>> > >> >>> object DeSerializingSpec extends Specification with Neo4jWrapper > with > >> >>> EmbeddedGraphDatabaseServiceProvider { > >> >>> > >> >>> def neo4jStoreDir = "/tmp/temp-neo-test" > >> >>> > >> >>> "Node" should { > >> >>> "be serializable" in { > >> >>> var o = Test("This is a String", 1, 2, 3.3, 10, true) > >> >>> var node: Node = null > >> >>> withTx { > >> >>> implicit neo => > >> >>> node = createNode(o) > >> >>> } > >> >>> > >> >>> var oo = deSerialize[Test](node) > >> >>> oo must beEqual(o) > >> >>> } > >> >>> } > >> >>> } > >> >>> > >> >>> > >> >>> object IndexTestSpec extends Specification with Neo4jWrapper with
Re: [Neo4j] Design help for G+ like app
If you really think your application will grow large, you might want to design your own sharding scheme across multiple servers for the posts, which will represent your largest # of nodes and properties. You can look at some of the QCon presentations from the Twitter team as to how they've attacked the problem. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Antoine Pouch Sent: Wednesday, September 21, 2011 10:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Design help for G+ like app Thanks for the reply Peter. So no direct user-to-user relationship, and each user has a group/circle called "AllMyFriends". Makes sense. Regarding the timeline index(es), should I make a huge one in Lucene with all of users posts and properties associating them to users and circles or is it better to make a lot of small indexes inside Neo4j? Antoine Pouch Architecte chef programmeur Woozworld Inc. Tél : 514-281-8999 #212 Cell : 514-463-1588 On Wed, Sep 21, 2011 at 9:38 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Antoine, > the design sounds good from the initial in-the-head look. The only > thing I see is the modeling of groups. I would imagine something like > > > http://yuml.me/diagram/scruffy/class/[user1]-circle%3E[friendsU1],[user2]-partOf%3E[friendsU1],[user1]-circle%3E[jobU1],[user2]-partOf%3E[jobU1] > > where User2 is part of two of User1 circles. I agree that, if all > relationships are through circles, you probably don't need users-user > relationships at all. > > Does that make sense? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Tue, Sep 20, 2011 at 7:29 PM, ant-1 wrote: > > Hi, > > > > I'm our company software architect, and I'm new to GraphDBs. But as we're > > building a Google+-like, we realized the need for something like Neo4j. > And > > as this community seems the best, we settle for you guys :) > > > > Anyway. Onto the design. Call us fools, but we're trying to redo Google+ > > (except for kids). I need help with the design, for starters. > > > > Here's the Domain: > > - Users > > - Users have friends > > - Users can place friends in one or more group (circle for G+), groups > being > > only visible to the user creating them. > > - Users can create posts, which are visible either by all his friends or > > only one or more groups. > > > > I realize the hardest part is to retrieve feeds. For example, I want the > > posts feed for user X for his group G. > > > > Here's what I envision: > > - User are nodes > > - Users have FRIEND_WITH relationships (direction being the initial > > requester to the other) > > - Groups are nodes. > > - Group has a CREATED_BY relationship to user > > - Group has BELONGS_TO relationships to multiple users > > - Post are nodes > > - Post has CREATED_BY relationship to the user > > - Post has VISIBLE_TO relationship to one or more groups > > - PostingEvent is a node with a timestamp property > > - PostingEvent has a RELATED_TO relationship to the user and the post > > > > And we would have a timeline index (Lucene or B-tree, I have no idea) for > > feeds retrieval. > > > > 1. Do you see issues with my design? > > 2. What to do with postings to "All my friends", do I create a "All > friends" > > group? In that case do I still need the user-to-user relationships? > > 3. I never worked with timeline indexes and such, so I could use some > > readings on the subject, even theorical ones, even dead-tree books. > Please > > don't hesitate to make recommendations. > > > > Thanks ! > > > > Antoine > > > > -- > > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html > > Sent from the Neo4j Community Discussions mailing list archive at > Nabble.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
Re: [Neo4j] Design help for G+ like app
Thanks for the reply Peter. So no direct user-to-user relationship, and each user has a group/circle called "AllMyFriends". Makes sense. Regarding the timeline index(es), should I make a huge one in Lucene with all of users posts and properties associating them to users and circles or is it better to make a lot of small indexes inside Neo4j? Antoine Pouch Architecte chef programmeur Woozworld Inc. Tél : 514-281-8999 #212 Cell : 514-463-1588 On Wed, Sep 21, 2011 at 9:38 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Antoine, > the design sounds good from the initial in-the-head look. The only > thing I see is the modeling of groups. I would imagine something like > > > http://yuml.me/diagram/scruffy/class/[user1]-circle%3E[friendsU1],[user2]-partOf%3E[friendsU1],[user1]-circle%3E[jobU1],[user2]-partOf%3E[jobU1] > > where User2 is part of two of User1 circles. I agree that, if all > relationships are through circles, you probably don't need users-user > relationships at all. > > Does that make sense? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Tue, Sep 20, 2011 at 7:29 PM, ant-1 wrote: > > Hi, > > > > I'm our company software architect, and I'm new to GraphDBs. But as we're > > building a Google+-like, we realized the need for something like Neo4j. > And > > as this community seems the best, we settle for you guys :) > > > > Anyway. Onto the design. Call us fools, but we're trying to redo Google+ > > (except for kids). I need help with the design, for starters. > > > > Here's the Domain: > > - Users > > - Users have friends > > - Users can place friends in one or more group (circle for G+), groups > being > > only visible to the user creating them. > > - Users can create posts, which are visible either by all his friends or > > only one or more groups. > > > > I realize the hardest part is to retrieve feeds. For example, I want the > > posts feed for user X for his group G. > > > > Here's what I envision: > > - User are nodes > > - Users have FRIEND_WITH relationships (direction being the initial > > requester to the other) > > - Groups are nodes. > > - Group has a CREATED_BY relationship to user > > - Group has BELONGS_TO relationships to multiple users > > - Post are nodes > > - Post has CREATED_BY relationship to the user > > - Post has VISIBLE_TO relationship to one or more groups > > - PostingEvent is a node with a timestamp property > > - PostingEvent has a RELATED_TO relationship to the user and the post > > > > And we would have a timeline index (Lucene or B-tree, I have no idea) for > > feeds retrieval. > > > > 1. Do you see issues with my design? > > 2. What to do with postings to "All my friends", do I create a "All > friends" > > group? In that case do I still need the user-to-user relationships? > > 3. I never worked with timeline indexes and such, so I could use some > > readings on the subject, even theorical ones, even dead-tree books. > Please > > don't hesitate to make recommendations. > > > > Thanks ! > > > > Antoine > > > > -- > > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html > > Sent from the Neo4j Community Discussions mailing list archive at > Nabble.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
Re: [Neo4j] List all indexed key/values for an entity
Done. http://github.com/neo4j/community/issues/26 Thanks! -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3355537.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node
Hi Stephan, You could try lower the heap size to -Xmx2G and cache_type=weak with 10G memory mapped for relationships. The machine only has 16G RAM and will not be able to process such a large dataset at in-memory speeds. Another option is to calculate degree at insertion time and store it as a property on each node. Regards, Johan On Wed, Sep 21, 2011 at 12:44 PM, st3ven wrote: > Hi Linan, > > I just tried it with the outgoing relationships, but unfortunately that > didn't speed things up. > > The size of my db is around 140GB and so it is not possible for me to dumb > the full directory into a ramfs. > My files on the hard disk have the following size: > neostore.nodestore.db = 31MB > neostore.relationshipstore.db = 85GB > neostore.propertystore.db = 65GB > neostore.propertystore.db.strings = 180MB > Is there maybe a chance of reducing the size of my database? > > Cheers, > Stephan > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Creating-a-graph-database-with-BatchInserter-and-getting-the-node-degree-of-every-node-tp3351599p3355074.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] REST API Base URI
Nuo, right now the server is discovering its own IP upon startup. However, it sounds reasonable to return configurable base URL. I am just wondering if that really is enough to support a LB scenario? Do you need more stuff there? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Sep 20, 2011 at 6:57 PM, Nuo Yan wrote: > I access my neo4j server through the REST API. For security purpose, I put > the neo4j server behind a nginx lb. I'm wondering if there is config entry > somewhere that I can set the neo4j server to return a customized base uri > that I can set to my LB's uri. > > For example, currently creating a node by POSTing to the lb (say > https://10.0.0.1/db/data) returns > > { > "outgoing_relationships" : " > http://neo4j/db/data/node/160/relationships/out";, > "data" : { > }, > "traverse" : "http://neo4j/db/data/node/160/traverse/{returnType}";, > "all_typed_relationships" : " > http://neo4j/db/data/node/160/relationships/all/{-list|&|types}", > "property" : "http://neo4j/db/data/node/160/properties/{key}";, > "self" : "http://neo4j/db/data/node/160";, > "properties" : "http://neo4j/db/data/node/160/properties";, > "outgoing_typed_relationships" : " > http://neo4j/db/data/node/160/relationships/out/{-list|&|types}", > "incoming_relationships" : "http://neo4j/db/data/node/160/relationships/in > ", > "extensions" : { > }, > "create_relationship" : "http://neo4j/db/data/node/160/relationships";, > "paged_traverse" : " > http://neo4j/db/data/node/160/paged/traverse/{returnType}{?pageSize,leaseTime} > ", > "all_relationships" : "http://neo4j/db/data/node/160/relationships/all";, > "incoming_typed_relationships" : " > http://neo4j/db/data/node/160/relationships/in/{-list|&|types}" > > > Is there a config on the neo4j server that I can set to make it either > return the lb URI "https://10.0.0.1"; as the base uri or return relative path > in the result? > ___ > 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
Re: [Neo4j] List all indexed key/values for an entity
Josh, very reasonable request. Could you please put that into an issue? I suspect this is in line with better auto indexing support, I am not sure how much of it there already is, so let's keep track of it in the issue. Thanks! /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Mon, Sep 19, 2011 at 4:15 PM, jadell wrote: > Is there any way via the REST API to list all the indexes and keys/values > that a given entity is indexed on? Something like: > > GET http://0.0.0.0:7474/db/data/node/123/indexes > > returns: > > [ > "http://0.0.0.0:7474/db/data/index/node/favorites/color/blue";, > "http://0.0.0.0:7474/db/data/index/node/favorites/food/pizza";, > "http://0.0.0.0:7474/db/data/index/node/users/name/josh";, > "http://0.0.0.0:7474/db/data/index/node/authors/post/456";, > ] > > Does anything exist that gives this functionality or similar? > > -- Josh Adell > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/List-all-indexed-key-values-for-an-entity-tp3348997p3348997.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.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
Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node
Hi stephan, I mis-calculated the size of relationshipstore.db. i thought it was around 8G instead of 85G. the only option left i think is to build index. something like this: idx = db.index().forNode("knows"); idx.add(thisguy, "knows", thatguy.getId()); idx.add(thatguy, "known_by", thisguy.getId()); the benefit is that when querying, the return size is pre-calculated so it would save some iteration time. the problem is the index files size, should around 85G. On Wed, Sep 21, 2011 at 11:44 AM, st3ven wrote: > Hi Linan, > > I just tried it with the outgoing relationships, but unfortunately that > didn't speed things up. > > The size of my db is around 140GB and so it is not possible for me to dumb > the full directory into a ramfs. > My files on the hard disk have the following size: > neostore.nodestore.db = 31MB > neostore.relationshipstore.db = 85GB > neostore.propertystore.db = 65GB > neostore.propertystore.db.strings = 180MB > Is there maybe a chance of reducing the size of my database? > > Cheers, > Stephan > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Creating-a-graph-database-with-BatchInserter-and-getting-the-node-degree-of-every-node-tp3351599p3355074.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Best regards Linan Wang ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Design help for G+ like app
Antoine, the design sounds good from the initial in-the-head look. The only thing I see is the modeling of groups. I would imagine something like http://yuml.me/diagram/scruffy/class/[user1]-circle%3E[friendsU1],[user2]-partOf%3E[friendsU1],[user1]-circle%3E[jobU1],[user2]-partOf%3E[jobU1] where User2 is part of two of User1 circles. I agree that, if all relationships are through circles, you probably don't need users-user relationships at all. Does that make sense? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Sep 20, 2011 at 7:29 PM, ant-1 wrote: > Hi, > > I'm our company software architect, and I'm new to GraphDBs. But as we're > building a Google+-like, we realized the need for something like Neo4j. And > as this community seems the best, we settle for you guys :) > > Anyway. Onto the design. Call us fools, but we're trying to redo Google+ > (except for kids). I need help with the design, for starters. > > Here's the Domain: > - Users > - Users have friends > - Users can place friends in one or more group (circle for G+), groups being > only visible to the user creating them. > - Users can create posts, which are visible either by all his friends or > only one or more groups. > > I realize the hardest part is to retrieve feeds. For example, I want the > posts feed for user X for his group G. > > Here's what I envision: > - User are nodes > - Users have FRIEND_WITH relationships (direction being the initial > requester to the other) > - Groups are nodes. > - Group has a CREATED_BY relationship to user > - Group has BELONGS_TO relationships to multiple users > - Post are nodes > - Post has CREATED_BY relationship to the user > - Post has VISIBLE_TO relationship to one or more groups > - PostingEvent is a node with a timestamp property > - PostingEvent has a RELATED_TO relationship to the user and the post > > And we would have a timeline index (Lucene or B-tree, I have no idea) for > feeds retrieval. > > 1. Do you see issues with my design? > 2. What to do with postings to "All my friends", do I create a "All friends" > group? In that case do I still need the user-to-user relationships? > 3. I never worked with timeline indexes and such, so I could use some > readings on the subject, even theorical ones, even dead-tree books. Please > don't hesitate to make recommendations. > > Thanks ! > > Antoine > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.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
Re: [Neo4j] Querying multivalued properties
Alexandre, this I think is a Lucene question, maybe something like http://lucene.472066.n3.nabble.com/Searching-a-group-of-associated-multi-value-fileds-td2789957.html could help? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Sep 21, 2011 at 3:08 AM, Alexandre de Assis Bento Lima wrote: > Hi, > > I need multivalued properties in my application. However, I don't know how to > make queries > based on them using indexes. I need to search nodes that have a certain value > inside their > multivalued properties (arrays). Does anybody know how can I do that? I > couldn't find > anything in the documentation. > > Thanks in advance! > > Alexandre. > ___ > 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
Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node
Hi Linan, I just tried it with the outgoing relationships, but unfortunately that didn't speed things up. The size of my db is around 140GB and so it is not possible for me to dumb the full directory into a ramfs. My files on the hard disk have the following size: neostore.nodestore.db = 31MB neostore.relationshipstore.db = 85GB neostore.propertystore.db = 65GB neostore.propertystore.db.strings = 180MB Is there maybe a chance of reducing the size of my database? Cheers, Stephan -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Creating-a-graph-database-with-BatchInserter-and-getting-the-node-degree-of-every-node-tp3351599p3355074.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node
Peter, I don't think that this would help me, because I wouldn't use the graph to get the node degree and to get the node degree I could also just use my file with all relationships, but I want to use the graph database to get that. The problem for me is that I don't just want to get the node degree, I also want to check some other metrics on the graph database like clustering coefficient and than I would also have the same problem that I can't read up the entire database. Creating an index for the node degree would just fit for that scenario, but than I can't go on. Maybe you have another tip for me ;-). Thanks for your help! Cheers, Stephan -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Creating-a-graph-database-with-BatchInserter-and-getting-the-node-degree-of-every-node-tp3351599p3355067.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node
Unfortunately the SSD is not an option, because I would need a SSD with around 150GB as my database is 140GB big. Yesterday I already tried to configure Neo4j to use more memory for mapping, but it seems that Neo4j does't allocate the whole memory I configured. I noticed that my system just uses 4GB after Neo4j is running for a while, but I got 16GB to use. I downloaded the following configuration file http://dist.neo4j.org/neo_default.props http://dist.neo4j.org/neo_default.props and changed the entries like this: neostore.nodestore.db.mapped_memory=31M neostore.relationshipstore.db.mapped_memory=8G neostore.propertystore.db.mapped_memory=90M neostore.propertystore.db.index.mapped_memory=1M neostore.propertystore.db.index.keys.mapped_memory=1M neostore.propertystore.db.strings.mapped_memory=180M neostore.propertystore.db.arrays.mapped_memory=130M My files on the hard disk have the following size: neostore.nodestore.db = 31MB neostore.relationshipstore.db = 85GB neostore.propertystore.db = 65GB neostore.propertystore.db.strings = 180MB Shall I maybe also change something at the Cache Settings in that file? What settings would be good for me? As I already said I am using right now the following Java parameters: -server -Xmx8G -XX:+UseParallelGC -XX:+UseNUMA Is there also something I should change? Thanks for your help! Cheers, Stephan -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Creating-a-graph-database-with-BatchInserter-and-getting-the-node-degree-of-every-node-tp3351599p3355044.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] how to get the User who has been B Followed who has Followed Back.
Hi there, Answers inline. On Wed, Sep 21, 2011 at 4:49 AM, iamyuanlong wrote: > hi Peter, > This can get the result.But if I want to contain B's Friends too.Should I > use this? > > http://neo4j-community-discussions.438527.n3.nabble.com/file/n3354221/follow%26friend.jpg > Use: > START b=(node_auto_index,'name:B') MATCH a-[:FOLLOW]->b-[:FOLLOW]->a or > a-[:FRIEND]->b-[:FRIEND]->a RETURN a > Unfortunately, OR is not something you can use in the MATCH clause - it's strictly a WHERE animal. So, this doesn't work. Sorry. > > OR: > START b=(node_auto_index,'name:B') MATCH a-[r]->b-[r]->a RETURN where > r.TYPE="FOLLOW" or r.TYPE="FRIEND" a > This has another problem - you are re-using the 'r'-symbol twice, and that's a no-no. What you can do is START b=(node_auto_index,'name:B') MATCH a-[r1]->b-[r2]->a WHERE (type(r1) ="FOLLOW" or type(r2) = "FRIEND") AND (type(r2) = "FOLLOW" or type(r2)="FRIEND") RETURN a This last query doesn't make me very happy - it's far to verbose. We've thrown around the idea of introducing a limited OR in the match, something like this: MATCH a-[:FOLLOW|FRIEND ]->b WDYT? Would that be helpful, or is it just confusing? HTH, Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user