Re: [Neo4j] py2neo - GEOFF enhancements
Having played around with some ASCII art (quite good fun actually!) it is starting to feel more natural to re-order the index entries, so that the key:value part is both consistent with existing syntax and adjacent to the index reference. I have ended up with: # ADD ENTRY: # ensure node bert has an entry in index Scientists # where name = Einstein (bert)=|Scientists| {name: Einstein} Here I have altered the - arrow to = - these arrows have a different meaning to those used for relationships so it is fair to differentiate them visually. The reversal of order of the components not only feels more natural but also allows us to also produce things like: # REMOVE ENTRY: # ensure node bert does not have an entry in index Scientists # where tidy_hair = true (bert)!=|Scientists| {tidy_hair: true} # LOOKUP ENTRY: # define node bert as the (first?) entry in index Scientists # where name = Einstein (bert):=|Scientists| {name: Einstein} On a side note, I've also been pondering some built-in hook syntax which is slightly borrowed from XPath: # Built-in hook for reference node: {/}-[:THINGS]-(foo) # Built-in hooks for sub-reference nodes: {/THINGS}-[:THING]-(thing) WDYT? Nige *Nigel Small* Phone: +44 7814 638 246 Blog: http://nigelsmall.name/ GTalk: ni...@nigelsmall.name MSN: nasm...@live.co.uk Skype: technige Twitter: @technige https://twitter.com/#%21/technige LinkedIn: http://uk.linkedin.com/in/nigelsmall On 2 December 2011 01:02, Michael Hunger michael.hun...@neotechnology.comwrote: Peter and I have been discussing what interchange format we'd like to have for applications feeding data into a graph. And geoff seems to be quite a good choice. Modifying and accessing indexes (much like in-file-hooks) would be a part of that. So what I imagine is a set of connectors to outside services which are producing geoff which is then consumed by a server plugin (e.g. for hosted neo4j services on heroku). Much like STDIN and STDOUT between unix command line tools. Having a declarative format that aligns more with cypher is preferable to a imperative format like the REST API or Gremlin. That's why I would also like to look into aligning the syntax with the cypher syntax, actually I'm more fond of the iconographic syntax but there are some drawbacks on readability for people. That's some of the reasoning behind it. Cheers Michael Am 02.12.2011 um 01:49 schrieb Nigel Small: Hi Michael GEOFF was originally conceived as a graph serialisation format and, as such, was intended to represent a snapshot of entities at a particular point in time instead of, as you are discussing, a programmatic set of actions (add, replace, remove, etc). That said, these ideas are still worth exploring... First off, since hooks are the variables of GEOFF, it would seem consistent to use those for assigning the return values of index lookups and queries. Something like the following could be used to perform an index query, assign the result to a hook and use that hook to build a relationship: {foo} := |index| @ {key: value} {foo}-[:KNOWS]-(bar) Actually, since the index query may result in multiple returned entities, we might want to limit to the first item returned: {foo} := |index| @ {key:value} {foo.1}-[:KNOWS]-(bar) Using the other operators for adding, removing and replacing index entries, this would make... # add node bert to index at foo:bar |index| @ {foo: bar} += (bert) # remove node bert from index at foo:bar |index| @ {foo: bar} -= (bert) # replace node with bert in index at foo:bar |index| @ {foo: bar} := (bert) So essentially, we would be looking at at least the following requirements: 1. Allow hooks to hold multiple entities instead of just a single entity 2. Allow assignment to hooks 3. Implement an @ operator to allow inline index queries 4. Implement assignment, addition and removal operators to indexes These ideas would turn GEOFF into much more of a programming language than a notation for serialisation: a big change and one which would potentially require another significant rewrite. I'm not against doing this but I'm wondering if this is a valuable direction to go in and whether, if we were to do this, it would be better to start from first principles instead. Would this fill a gap that none of the other current options can? Cheers Nige *Nigel Small* Phone: +44 7814 638 246 Blog: http://nigelsmall.name/ GTalk: ni...@nigelsmall.name MSN: nasm...@live.co.uk Skype: technige Twitter: @technige https://twitter.com/#%21/technige LinkedIn: http://uk.linkedin.com/in/nigelsmall On 1 December 2011 21:47, Michael Hunger michael.hun...@neotechnology.comwrote: Nigel, is it possible to also do index-lookups in geoff? and use those as nodes or rels or even as hooks for later on? I'm also toying with two other ideas: #1 using indexes as the third
Re: [Neo4j] Standalone server and transactions
Michael Hunger wrote No, the alternative there is to provide a server-side extension that encapsulates your business logic as an endpoint running inside of a tx. Yes, this is 3rd solution. But this is the worst one because I have to create custom layer which will work ONLY with my app. This means that I cut the rope that allows me to use Neo4j server simultaneously with other tools (like Neoclipse or some other which appear in the future). -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554027.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] Standalone server and transactions
Michael Hunger wrote Am I missing something? I hope I do, because in this situation, Neo4j isn't actually interesting DB server/solution...but I want it to be. I would like to know some more detailed reasons for that, so far we haven't received this kind of response. Do You know ANY (mature) RDBMS which is: provides many connection at the same time, transaction-less and is still popular? I don't know any (even SQLite has transactions). And now, somebody (not meaning You) want to convince me that transactions are not needed. At least there strange silent that Neo4j has full transactions (not batch mode) ONLY in embedded mode and in embedded mode there is allowed only 1 connection. Additional case here is that I read about this after some days of testing the Neo4j in my app. No info in tutorial about this 2 cases what are very important. I didn't even think about it when I have started with Neo4j. I just assume that Neo4j is for sure able to work as standalone server, allows many connections and provides full transactions. Now I know that this is not so obvious if we call something DBMS. Actually other NoSQL DBMS have the same problem - they don't inform on the first page about transactions and standalone modes at all. You have to read some tutorials or forum threads to get to know...after few days. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554061.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] Standalone server and transactions
Good point. Yes, that certainly is an alternative. But unfortunately in practice I hardly can imagine .NET, Nodejs, MRI Ruby (non Java basically) guys to start duplicating the logic for the plugin. Not even taking into account additional complexity, including unit testing. Similar thing ships with SQL Server. But it was used only by .NET people and extremely rarely. On Dec 2, 2011 6:57 PM, Michael Hunger michael.hun...@neotechnology.com wrote: No, the alternative there is to provide a server-side extension that encapsulates your business logic as an endpoint running inside of a tx. Cheers Michael Am 02.12.2011 um 08:30 schrieb Dmytrii Nagirniak: On 02/12/2011, at 4:48 PM, Jim Webber wrote: 1. Neo4j works as a standalone (or clustered) server which is accessible through the REST API. That's the point. There is not standalone version with native bindings. You either run embedded and lock the whole database to the particular app, or you go with REST that doesn't support transactions (batch != transaction)... 2. Neo4j is ACID transactional with each HTTP request to the server being internally scoped in a single transaction. Unfortunately it is not always enough, even when using batch API. Here is the use-case: 1. Query for a nodes/rels. 2. Run some custom logic on the client. 3. Update nodes/rels appropriately. This is the most common way of using databases. And currently it is not possible to wrap it in a transaction. So the only alternative in this case is to use native binding, which may not be available to all. And means we are back at point 1. Do you see what I mean here? It's a trade-off: ACID vs DB with multiple clients. A way of doing transactions over REST would be nice. But it will be extremely hard to implement due to the stateless nature of HTTP. I can see something like this in API: POST /transaction?timeout=2 # Returns the ID of the transaction for the future # then use the normal API... PUT /transactions/1234/commit # or PUT /transactions/1234/rollback # or DESTROY /transactions/1234 # or automatically rollback after 2 secs But I am not sure this can work reliably and performant enough with HTTP. Cheers. ___ 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] Standalone server and transactions
That's why we've enable the - ruby-extensions for the server. - and want to provide the same functionality for other dynamic languages it is not about duplicating functionality but about moving persistence related code closer to the db. Michael Am 02.12.2011 um 09:43 schrieb Dmytrii Nagirniak: Good point. Yes, that certainly is an alternative. But unfortunately in practice I hardly can imagine .NET, Nodejs, MRI Ruby (non Java basically) guys to start duplicating the logic for the plugin. Not even taking into account additional complexity, including unit testing. Similar thing ships with SQL Server. But it was used only by .NET people and extremely rarely. On Dec 2, 2011 6:57 PM, Michael Hunger michael.hun...@neotechnology.com wrote: No, the alternative there is to provide a server-side extension that encapsulates your business logic as an endpoint running inside of a tx. Cheers Michael Am 02.12.2011 um 08:30 schrieb Dmytrii Nagirniak: On 02/12/2011, at 4:48 PM, Jim Webber wrote: 1. Neo4j works as a standalone (or clustered) server which is accessible through the REST API. That's the point. There is not standalone version with native bindings. You either run embedded and lock the whole database to the particular app, or you go with REST that doesn't support transactions (batch != transaction)... 2. Neo4j is ACID transactional with each HTTP request to the server being internally scoped in a single transaction. Unfortunately it is not always enough, even when using batch API. Here is the use-case: 1. Query for a nodes/rels. 2. Run some custom logic on the client. 3. Update nodes/rels appropriately. This is the most common way of using databases. And currently it is not possible to wrap it in a transaction. So the only alternative in this case is to use native binding, which may not be available to all. And means we are back at point 1. Do you see what I mean here? It's a trade-off: ACID vs DB with multiple clients. A way of doing transactions over REST would be nice. But it will be extremely hard to implement due to the stateless nature of HTTP. I can see something like this in API: POST /transaction?timeout=2 # Returns the ID of the transaction for the future # then use the normal API... PUT /transactions/1234/commit # or PUT /transactions/1234/rollback # or DESTROY /transactions/1234 # or automatically rollback after 2 secs But I am not sure this can work reliably and performant enough with HTTP. Cheers. ___ 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] Neo4j Öresund meetup next Tuesday
Everyone, the next Neo4j Öresund meetup is coming up next Tuesday. I think we might be able to show off some nice Heroku-Sinatra-GoogleCalc integration, too, along with some NOSQL war stories and beer, so be there or be [] ! http://www.meetup.com/Neo4j-Oresund/events/42155032/ 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 brew install neo4j neo4j start heroku addons:add neo4j ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
That's why we've enable the - ruby-extensions for the server. Haven't seen anything about it. Could you please give some more info on that (links maybe)? it is not about duplicating functionality but about moving persistence related code closer to the db. It is a long topic on itself: Where the business logic belongs to - the server or the client. But the point is that far the most common use-case is to write the business logic on the client, not on the server. The business logic on the server has already failed multiple times in the history (think of stored procedures on the RDBMS). Server side logic works well when the DB is part of the app (e.g. embedded) and server/client code is often indistinguishable. Am 02.12.2011 um 09:43 schrieb Dmytrii Nagirniak: Good point. Yes, that certainly is an alternative. But unfortunately in practice I hardly can imagine .NET, Nodejs, MRI Ruby (non Java basically) guys to start duplicating the logic for the plugin. Not even taking into account additional complexity, including unit testing. Similar thing ships with SQL Server. But it was used only by .NET people and extremely rarely. On Dec 2, 2011 6:57 PM, Michael Hunger michael.hun...@neotechnology.com wrote: No, the alternative there is to provide a server-side extension that encapsulates your business logic as an endpoint running inside of a tx. Cheers Michael Am 02.12.2011 um 08:30 schrieb Dmytrii Nagirniak: On 02/12/2011, at 4:48 PM, Jim Webber wrote: 1. Neo4j works as a standalone (or clustered) server which is accessible through the REST API. That's the point. There is not standalone version with native bindings. You either run embedded and lock the whole database to the particular app, or you go with REST that doesn't support transactions (batch != transaction)... 2. Neo4j is ACID transactional with each HTTP request to the server being internally scoped in a single transaction. Unfortunately it is not always enough, even when using batch API. Here is the use-case: 1. Query for a nodes/rels. 2. Run some custom logic on the client. 3. Update nodes/rels appropriately. This is the most common way of using databases. And currently it is not possible to wrap it in a transaction. So the only alternative in this case is to use native binding, which may not be available to all. And means we are back at point 1. Do you see what I mean here? It's a trade-off: ACID vs DB with multiple clients. A way of doing transactions over REST would be nice. But it will be extremely hard to implement due to the stateless nature of HTTP. I can see something like this in API: POST /transaction?timeout=2 # Returns the ID of the transaction for the future # then use the normal API... PUT /transactions/1234/commit # or PUT /transactions/1234/rollback # or DESTROY /transactions/1234 # or automatically rollback after 2 secs But I am not sure this can work reliably and performant enough with HTTP. Cheers. ___ 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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
Anyway, You are talking now about things that doesn't exist and I have to implement them on my own. I can't imagine RDBMS server that doesn't give me JDBC driver in the box. Unfortunately Neo4j is like this. There is no native transaction-full support so Neo4j can work as standalone server with many connections to it. And that's the point. Now I have to choose one of the: - Neo4j as standalone server with REST without transactions or - Neo4j embedded with only 1 connection with transactions. I can't imagine the situation where DB server is embedded in application (really big application) which allows 1 connection (not 2, not many, but 1!). There is no possibility to have separated machine for DB because then there is no transactions. Transactions in meaning the core of persisting data doesn't exist in DBMS...I'm amazed that nobody has thought about these as a bottleneck problem. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554188.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] Standalone server and transactions
Radoslaw, if you need transactions, embedded and multiple machines, you can always use HA to let the DB replicate between your servers. More to the point, we have shun away from a low level API binary protocol because of serialization overhead reasons when you do for instance traversals transparently on the client side with the Java API. All this is changing with Cypher, that lets you transfer declarative statements to the server. The missing piece now is the support for modifying operations - either via mutating diff statements or in-Cypher mutating support. Then, the binary protocol will be feasible. Got any input on how you would prefer this? 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 brew install neo4j neo4j start heroku addons:add neo4j On Fri, Dec 2, 2011 at 10:38 AM, zolv z...@o2.pl wrote: Anyway, You are talking now about things that doesn't exist and I have to implement them on my own. I can't imagine RDBMS server that doesn't give me JDBC driver in the box. Unfortunately Neo4j is like this. There is no native transaction-full support so Neo4j can work as standalone server with many connections to it. And that's the point. Now I have to choose one of the: - Neo4j as standalone server with REST without transactions or - Neo4j embedded with only 1 connection with transactions. I can't imagine the situation where DB server is embedded in application (really big application) which allows 1 connection (not 2, not many, but 1!). There is no possibility to have separated machine for DB because then there is no transactions. Transactions in meaning the core of persisting data doesn't exist in DBMS...I'm amazed that nobody has thought about these as a bottleneck problem. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554188.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] Neo4j Öresund meetup next Tuesday
Be there or be an empty array? I may start saying that just to confuse people :-) On 2 Dec 2011 09:30, Peter Neubauer peter.neuba...@neotechnology.com wrote: Everyone, the next Neo4j Öresund meetup is coming up next Tuesday. I think we might be able to show off some nice Heroku-Sinatra-GoogleCalc integration, too, along with some NOSQL war stories and beer, so be there or be [] ! http://www.meetup.com/Neo4j-Oresund/events/42155032/ 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 brew install neo4j neo4j start heroku addons:add neo4j ___ 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] Neo4j Öresund meetup next Tuesday
My ASCII art skills suck. I mean square :) 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 brew install neo4j neo4j start heroku addons:add neo4j On Fri, Dec 2, 2011 at 10:53 AM, Nigel Small ni...@nigelsmall.name wrote: Be there or be an empty array? I may start saying that just to confuse people :-) On 2 Dec 2011 09:30, Peter Neubauer peter.neuba...@neotechnology.com wrote: Everyone, the next Neo4j Öresund meetup is coming up next Tuesday. I think we might be able to show off some nice Heroku-Sinatra-GoogleCalc integration, too, along with some NOSQL war stories and beer, so be there or be [] ! http://www.meetup.com/Neo4j-Oresund/events/42155032/ 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 brew install neo4j neo4j start heroku addons:add neo4j ___ 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] Named matched with depth gives error
Great. Let us know if that is working for you. 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 brew install neo4j neo4j start heroku addons:add neo4j On Fri, Dec 2, 2011 at 8:08 AM, dnagir dna...@gmail.com wrote: Thank Michael, I didn't realise there's snapshot version available from the download page. I prefer downloading the whole package instead of one particular thing, as Jim suggested. But glad to know there's such an option. Cheers. On 02/12/2011, at 5:20 PM, Michael Hunger [via Neo4j Community Discussions] wrote: download the 1.6 SNAPSHOT from neo4j.org/downloads mobile mail please excuse brevity and typos Am 02.12.2011 um 01:27 schrieb dnagir [hidden email]: I fixed this yesterdayhttps://github.com/neo4j/community/commit/37c2867871c7d953c2021177d0b72cd8ba825be0. Thanks a lot for that. How can I get the build that includes the fix? (Sorry for the question, but just starting with noe4j). Sorry you ran into it... NP. Cheers. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553337.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list [hidden email] https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list [hidden email] https://lists.neo4j.org/mailman/listinfo/user If you reply to this email, your message will be added to the discussion below: http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553894.html To unsubscribe from Named matched with depth gives error, click here. NAML -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553941.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] WADL specification is the complete reference for all HTTP interactions with Neo4j?
Johnny, at which URI si the WADL hosted? Would like to look at the code, or you could dig into the code yourself if you don't want to wait. 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 brew install neo4j neo4j start heroku addons:add neo4j On Thu, Dec 1, 2011 at 1:28 AM, yobi johnny@yobistore.com wrote: I have noticed that you provide a runtime generated WADL specification for the HTTP API. I'm going to create a WADL to Node.js SDK converter so I don't have to create the functionality and change things manually each time you have a new release with changes to the HTTP API. a But before I do that I wanna be sure that this WADL specification is always an _up to date_ spec for _all_ HTTP interactions. Could someone confirm this? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/WADL-specification-is-the-complete-reference-for-all-HTTP-interactions-with-Neo4j-tp3550226p3550226.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] OSMImporter: Is there a way to do incremental imports?
Not sure, Craig, do you have the code somewhere? /peter On Tue, Nov 22, 2011 at 4:17 PM, grimace macegh...@gmail.com wrote: thanks for the response(s)! The hardware I'm testing on is not the best and only 4G of ram so I'm limited, but this seems the best opportunity for me to learn this...that being said... For incremental imports, stitching osm files together, we re-activate the old code that tests the lucene index before adding nodes and relations. There might be some subtle edge cases to consider, but a set of tests with overlapping and non-overlapping osm files should flush them out. I'd love to play with this. Is the old code there for me to re-enable in testing? Or can you point me to where this might be put in? Thx, Greg -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/OSMImporter-Is-there-a-way-to-do-incremental-imports-tp3526941p3527995.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] WADL specification is the complete reference for all HTTP interactions with Neo4j?
The WADL is generated by Jersey which uses the metadata that it generates from the annotated REST-Endpoints. So it is always up to date: http://localhost:7474/db/data/application.wadl The Neo4j REST API is designed with discoverability in mind, so that you can start with a GET / and from there discover URIs to do other stuff. Examples below uses URIs for examples; they are subject to change in the future, so for future-proofness discover URIs where possible, instead of relying on current layout. The default representation is json, both for responses and for data sent with POST/PUT requests. Below follows a listing of ways to interact with the REST API. You can also see a (at runtime) generated description of the API be pointing your browser to the (exact URI may vary)http://localhost:7474/db/data/application.wadl To interact with the JSON interface you must explicitly set request header Accept:application/json for those requests that responds with data. You should also set header Content-Type:application/json if your request sends data, for example when you're creating a relationship. Am 02.12.2011 um 11:49 schrieb Peter Neubauer: Johnny, at which URI si the WADL hosted? Would like to look at the code, or you could dig into the code yourself if you don't want to wait. 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 brew install neo4j neo4j start heroku addons:add neo4j On Thu, Dec 1, 2011 at 1:28 AM, yobi johnny@yobistore.com wrote: I have noticed that you provide a runtime generated WADL specification for the HTTP API. I'm going to create a WADL to Node.js SDK converter so I don't have to create the functionality and change things manually each time you have a new release with changes to the HTTP API. a But before I do that I wanna be sure that this WADL specification is always an _up to date_ spec for _all_ HTTP interactions. Could someone confirm this? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/WADL-specification-is-the-complete-reference-for-all-HTTP-interactions-with-Neo4j-tp3550226p3550226.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] WADL specification is the complete reference for all HTTP interactions with Neo4j?
How about extensions and plugins? Are these discovered by Jetty also? 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 brew install neo4j neo4j start heroku addons:add neo4j On Fri, Dec 2, 2011 at 11:55 AM, Michael Hunger michael.hun...@neotechnology.com wrote: http://localhost:7474/db/data/application.wadl ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
Hello, Do You know ANY (mature) RDBMS which is: provides many connection at the same time, transaction-less and is still popular? I don't know any (even SQLite has transactions). And now, somebody (not meaning You) want to convince me that transactions are not needed. At least there strange silent that Neo4j has full transactions (not batch mode) ONLY in embedded mode and in embedded mode there is allowed only 1 connection. Neo4j has transactions in both server and embedded mode. As Michael points out, if the default REST API behaviour isn't what you need out of the box, you can readily extend it. When you embed Neo4j in your code, then it supports as many connections as your code does. Neo4j is fully thread safe. If you think this isn't clear, could you help by pointing out weaknesses in the documentation - that way we can fix them and other users in future won't be inconvenienced in the same way. Cheers, Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
It is a long topic on itself: Where the business logic belongs to - the server or the client. But the point is that far the most common use-case is to write the business logic on the client, not on the server. The business logic on the server has already failed multiple times in the history (think of stored procedures on the RDBMS). Server side logic works well when the DB is part of the app (e.g. embedded) and server/client code is often indistinguishable. I don't believe that we are talking about business logic on the server - we're talking about data access logic (queries). Business logic binds to that data over the network - that the data is sourced through a plugin is an implementation detail. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
...though there are perfectly good reasons to include business logic on the server as well (e.g. stored procedures, which Neo4J can support in its own way via server-side extensions). -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Jim Webber Sent: Friday, December 02, 2011 6:36 AM To: Neo4j user discussions Subject: Re: [Neo4j] Standalone server and transactions It is a long topic on itself: Where the business logic belongs to - the server or the client. But the point is that far the most common use-case is to write the business logic on the client, not on the server. The business logic on the server has already failed multiple times in the history (think of stored procedures on the RDBMS). Server side logic works well when the DB is part of the app (e.g. embedded) and server/client code is often indistinguishable. I don't believe that we are talking about business logic on the server - we're talking about data access logic (queries). Business logic binds to that data over the network - that the data is sourced through a plugin is an implementation detail. Jim ___ 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] Standalone server and transactions
At the risk of re-iterating this: Neo4j in embedded mode supports as many connections as the application where you embed it. Jim On 2 Dec 2011, at 20:38, zolv wrote: Anyway, You are talking now about things that doesn't exist and I have to implement them on my own. I can't imagine RDBMS server that doesn't give me JDBC driver in the box. Unfortunately Neo4j is like this. There is no native transaction-full support so Neo4j can work as standalone server with many connections to it. And that's the point. Now I have to choose one of the: - Neo4j as standalone server with REST without transactions or - Neo4j embedded with only 1 connection with transactions. I can't imagine the situation where DB server is embedded in application (really big application) which allows 1 connection (not 2, not many, but 1!). There is no possibility to have separated machine for DB because then there is no transactions. Transactions in meaning the core of persisting data doesn't exist in DBMS...I'm amazed that nobody has thought about these as a bottleneck problem. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554188.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] possibility to merge some neo4j databases?
Sure the limitations apply, but as only the target database would be corrupted and none of the ones being used for the import that should be ok. That is actually like a nice lab-day project. I'll add it to the list. Michael Am 29.11.2011 um 15:18 schrieb Craig Taverner: There are two approaches I can think of: - use a better index for mapping ids. Lucent is too slow. Memory hashtables are memory bound.Peter has been investigating alternative dbs like bdb. I tried, but did not finish a hashmap of cached arrays, and Chris wrote his big data import project on github, which is a hashmap of cached hashmaps. Many promising solutions, but none yet complete. All Target the general case of id mapping. - for this specific case, merging small databases, I had an idea a couple of years ago which I still think will work. Bulk appending entire databases, by offsetting all internal ids by the current max id. I remember the reason Johan did not like this idea was that it suffered from the same flaws as the batch inserter, locking the entire db, no rollback and risk of entire db corruption. For people happy with the batch inserter, perhaps this is still an option, but unlikely to get prioritized by the neo team because if the corruption risks. It would, however, perform spectacularly well since the id map is a trivial function. Personally I hope someone completes Chris persistent hashmap or a similar solution. Id maps are a recurring theme and would be very valuable. On Nov 29, 2011 12:07 PM, osallou olivier.sal...@gmail.com wrote: Hi, I need to batch insert millions of data in neo4j. It is quite difficult to keep all in a Map to get node ids, so it needs frequent lookups in index to get some node ids for relationships, and result is quite low. Is there any way to build several neo4j databases (independantly) then to merge them? (I could build many small db in parallel) Thanks Olivier -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/possibility-to-merge-some-neo4j-databases-tp3544694p3544694.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] Standalone server and transactions
On 02/12/2011, at 10:36 PM, Jim Webber wrote: I don't believe that we are talking about business logic on the server - we're talking about data access logic (queries). Business logic binds to that data over the network - that the data is sourced through a plugin is an implementation detail. Well, this scenario (Reserving a seat) includes a lot of business logic, for example. User enters the details of the reservation and clicks Place reservation. Then the system has to: Find available seat. Validate user details agains that seat (it may include a lot of logic in itself). Place reservation and mark the seat as unavailable. No double reservations allowed. Now, how can you do it with REST API in a transaction if you keep the logic on the client? The only way to do this, is to move the whole logic over to the server. And this leads to the points from my previous post. We just have to accept that some scenarios can't be handled over REST with *reasonable* effort. In theory, you can write the whole app on the server (it would be embedded). But this defeats the purpose. This is about trade-off: need transactions - use embedded DB, need multiple clients for the DB - use REST. If you need both, reevaluate. If still you do. Then either pay for Enterprise or implement your own locking system. Cheers. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
...or you can re-think the definition of client. As you know, it is very common in an SOA model to have actors functioning as both clients and servers. For example, to the client making a reservation, the server might be the airline's reservation site. That site might have server-side logic to manage the complexity of the reservations process, which is interacting with external billing sites as well as one or more external data stores or other services (in this case, perhaps a Neo4J database via the REST API). In that scenario, the reservations server is the client to the database server. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Dmytrii Nagirniak Sent: Friday, December 02, 2011 7:04 AM To: Neo4j user discussions Subject: Re: [Neo4j] Standalone server and transactions On 02/12/2011, at 10:36 PM, Jim Webber wrote: I don't believe that we are talking about business logic on the server - we're talking about data access logic (queries). Business logic binds to that data over the network - that the data is sourced through a plugin is an implementation detail. Well, this scenario (Reserving a seat) includes a lot of business logic, for example. User enters the details of the reservation and clicks Place reservation. Then the system has to: Find available seat. Validate user details agains that seat (it may include a lot of logic in itself). Place reservation and mark the seat as unavailable. No double reservations allowed. Now, how can you do it with REST API in a transaction if you keep the logic on the client? The only way to do this, is to move the whole logic over to the server. And this leads to the points from my previous post. We just have to accept that some scenarios can't be handled over REST with *reasonable* effort. In theory, you can write the whole app on the server (it would be embedded). But this defeats the purpose. This is about trade-off: need transactions - use embedded DB, need multiple clients for the DB - use REST. If you need both, reevaluate. If still you do. Then either pay for Enterprise or implement your own locking system. Cheers. ___ 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] Standalone server and transactions
I may be missing something, but it can't see exactly how to link up your code with the server. Should the extension be packaged as a gem and published publicly? That Wiki entry is a little bit poorly written IMO. Sorry for saying that :-( On 02/12/2011, at 8:42 PM, Michael Hunger wrote: http://wiki.neo4j.org/content/Ruby-script_extension Am 02.12.2011 um 10:32 schrieb Dmytrii Nagirniak: That's why we've enable the - ruby-extensions for the server. Haven't seen anything about it. Could you please give some more info on that (links maybe)? it is not about duplicating functionality but about moving persistence related code closer to the db. It is a long topic on itself: Where the business logic belongs to - the server or the client. But the point is that far the most common use-case is to write the business logic on the client, not on the server. The business logic on the server has already failed multiple times in the history (think of stored procedures on the RDBMS). Server side logic works well when the DB is part of the app (e.g. embedded) and server/client code is often indistinguishable. OTOH it is about keeping the database primitives at the database level and exposing domain level data and operations. (which makes your protocol smaller, faster, less diluted, better understandable and focused). After all with NOSQL you have much more often that you move code to the data (think map-reduce - no one complains there). Am 02.12.2011 um 09:43 schrieb Dmytrii Nagirniak: Good point. Yes, that certainly is an alternative. But unfortunately in practice I hardly can imagine .NET, Nodejs, MRI Ruby (non Java basically) guys to start duplicating the logic for the plugin. Not even taking into account additional complexity, including unit testing. Similar thing ships with SQL Server. But it was used only by .NET people and extremely rarely. On Dec 2, 2011 6:57 PM, Michael Hunger michael.hun...@neotechnology.com wrote: No, the alternative there is to provide a server-side extension that encapsulates your business logic as an endpoint running inside of a tx. Cheers Michael Am 02.12.2011 um 08:30 schrieb Dmytrii Nagirniak: On 02/12/2011, at 4:48 PM, Jim Webber wrote: 1. Neo4j works as a standalone (or clustered) server which is accessible through the REST API. That's the point. There is not standalone version with native bindings. You either run embedded and lock the whole database to the particular app, or you go with REST that doesn't support transactions (batch != transaction)... 2. Neo4j is ACID transactional with each HTTP request to the server being internally scoped in a single transaction. Unfortunately it is not always enough, even when using batch API. Here is the use-case: 1. Query for a nodes/rels. 2. Run some custom logic on the client. 3. Update nodes/rels appropriately. This is the most common way of using databases. And currently it is not possible to wrap it in a transaction. So the only alternative in this case is to use native binding, which may not be available to all. And means we are back at point 1. Do you see what I mean here? It's a trade-off: ACID vs DB with multiple clients. A way of doing transactions over REST would be nice. But it will be extremely hard to implement due to the stateless nature of HTTP. I can see something like this in API: POST /transaction?timeout=2 # Returns the ID of the transaction for the future # then use the normal API... PUT /transactions/1234/commit # or PUT /transactions/1234/rollback # or DESTROY /transactions/1234 # or automatically rollback after 2 secs But I am not sure this can work reliably and performant enough with HTTP. Cheers. ___ 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 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] Standalone server and transactions
What should be improved. You can also print the page as pdf and annotate what should be better / different. Yes packaged as gem and published to the server with a Gemfile. Thanks a lot Michael Am 02.12.2011 um 13:36 schrieb Dmytrii Nagirniak: I may be missing something, but it can't see exactly how to link up your code with the server. Should the extension be packaged as a gem and published publicly? That Wiki entry is a little bit poorly written IMO. Sorry for saying that :-( On 02/12/2011, at 8:42 PM, Michael Hunger wrote: http://wiki.neo4j.org/content/Ruby-script_extension Am 02.12.2011 um 10:32 schrieb Dmytrii Nagirniak: That's why we've enable the - ruby-extensions for the server. Haven't seen anything about it. Could you please give some more info on that (links maybe)? it is not about duplicating functionality but about moving persistence related code closer to the db. It is a long topic on itself: Where the business logic belongs to - the server or the client. But the point is that far the most common use-case is to write the business logic on the client, not on the server. The business logic on the server has already failed multiple times in the history (think of stored procedures on the RDBMS). Server side logic works well when the DB is part of the app (e.g. embedded) and server/client code is often indistinguishable. OTOH it is about keeping the database primitives at the database level and exposing domain level data and operations. (which makes your protocol smaller, faster, less diluted, better understandable and focused). After all with NOSQL you have much more often that you move code to the data (think map-reduce - no one complains there). Am 02.12.2011 um 09:43 schrieb Dmytrii Nagirniak: Good point. Yes, that certainly is an alternative. But unfortunately in practice I hardly can imagine .NET, Nodejs, MRI Ruby (non Java basically) guys to start duplicating the logic for the plugin. Not even taking into account additional complexity, including unit testing. Similar thing ships with SQL Server. But it was used only by .NET people and extremely rarely. On Dec 2, 2011 6:57 PM, Michael Hunger michael.hun...@neotechnology.com wrote: No, the alternative there is to provide a server-side extension that encapsulates your business logic as an endpoint running inside of a tx. Cheers Michael Am 02.12.2011 um 08:30 schrieb Dmytrii Nagirniak: On 02/12/2011, at 4:48 PM, Jim Webber wrote: 1. Neo4j works as a standalone (or clustered) server which is accessible through the REST API. That's the point. There is not standalone version with native bindings. You either run embedded and lock the whole database to the particular app, or you go with REST that doesn't support transactions (batch != transaction)... 2. Neo4j is ACID transactional with each HTTP request to the server being internally scoped in a single transaction. Unfortunately it is not always enough, even when using batch API. Here is the use-case: 1. Query for a nodes/rels. 2. Run some custom logic on the client. 3. Update nodes/rels appropriately. This is the most common way of using databases. And currently it is not possible to wrap it in a transaction. So the only alternative in this case is to use native binding, which may not be available to all. And means we are back at point 1. Do you see what I mean here? It's a trade-off: ACID vs DB with multiple clients. A way of doing transactions over REST would be nice. But it will be extremely hard to implement due to the stateless nature of HTTP. I can see something like this in API: POST /transaction?timeout=2 # Returns the ID of the transaction for the future # then use the normal API... PUT /transactions/1234/commit # or PUT /transactions/1234/rollback # or DESTROY /transactions/1234 # or automatically rollback after 2 secs But I am not sure this can work reliably and performant enough with HTTP. Cheers. ___ 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 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
Re: [Neo4j] Lab day: Cypher queries in embedded python bindings
On 2011-11-18 17:12, Jacob Hansson wrote: Hey all, Like we've mentioned before, we have lab-day fridays at Neo4j, and today I hacked some stuff together that landed directly in trunk for the embedded python bindings. As of 1 minute ago, the following operations are now possible with the embedded python API: from neo4j import GraphDatabase db = GraphDatabase(/home/jake/db) # Plain query result = db.query(START n=node(0) RETURN n) # Parameterized query result = db.query(START n=node({id}) RETURN n, id=0) # Pre-parsed query get_node_by_id = db.prepare_query(START n=node({id}) RETURN n) result = db.query(get_node_by_id, id=0) # Read the result for row in result: print row['n'] for value in result['n']: print value node = db.query(get_node_by_id, id=0)['n'].single Lemme know what you think :) This is not available on Pypi yet (will be when the first 1.6 milestone is released) but you can build it super-easily yourself, instructions are in the readme at github: https://github.com/neo4j/python-embedded Hello Jake and you other pythonistas, I have finally found time to test the Cypher queries in the Python bindings and I just want to say thank you. Great addition for us! Br -- Johan Lundberg NORDUnet A/S lundb...@nordu.net +46730714375 Tulegatan 11 113 53 Stockholm Sweden ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
On 02/12/2011, at 11:28 PM, Rick Bullotta wrote: ...or you can re-think the definition of client. As you know, it is very common in an SOA model to have actors functioning as both clients and servers. For example, to the client making a reservation, the server might be the airline's reservation site. That site might have server-side logic to manage the complexity of the reservations process, which is interacting with external billing sites as well as one or more external data stores or other services (in this case, perhaps a Neo4J database via the REST API). In that scenario, the reservations server is the client to the database server. Doesn't matter how you play the words, you need transactions somewhere. And with REST it is only available as a database plugin. For most people it is just not worth the effort (especially who's not coming from Java background) and they will turn around. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] REST Traversal and prune evaluators
Hello folks, i've been trying to prune based on number of outgoing relationships, but so far i am stumped, since org.neo4j.graphdb.Node interface doesn't expose any way to count outgoing relationships. Traversal is for tree visualisation, and i want to avoid creating too much of a clutter, hence the outgoing relationship limit. My code right now: t = neo4j.TraversalDescription().\ max_depth(3).relationships('rel_type','out').\ prune('javascript','position.endNode().getProperty(some_property) = 192') I would like to prune nodes that have more than 10 outgoing relationships. godspeed, graphistas ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
dnagir wrote On 02/12/2011, at 11:28 PM, Rick Bullotta wrote: Doesn't matter how you play the words, you need transactions somewhere. And with REST it is only available as a database plugin. For most people it is just not worth the effort (especially who's not coming from Java background) and they will turn around. Exactly. Unfortunately I am such person who must find some other NoSQL DB :/ because of these 2 mentioned cases. But I promise to come back later and check if standalone + transactions are ready :) Cheers. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554646.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] Standalone server and transactions
FWIW, at present Neo4J has among the most comprehensive ACID support of the major NoSQL databases. The fact that you might have to write a bit of code or script to run on the server shouldn't necessarily be viewed as a negative - the fact that you *can* do this at all is a big plus! Most NoSQL DB's take a very atomic view of transactions - usually single object additions, deletions, or modifications. Neo4J is one of the few that uses real JTA transactions across multiple database modifications. I also agree with you that it would be nice to have transaction support over a remote API, but that's not a trivial thing to accomplish in a web scenario when there is not any thread affinity or even necessarily server affinity between requests that occur within a transaction. Knowing when to abandon a pending transaction in a scenario where the client(s) do not maintain a persistent connection is also quite challenging. One possibility might be to leverage another RPC mechanism or perhaps even something like Web Sockets in the not too distant future. But I think the goal of a language neutral binding also needs to be preserved if possible. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of zolv Sent: Friday, December 02, 2011 8:33 AM To: user@lists.neo4j.org Subject: Re: [Neo4j] Standalone server and transactions dnagir wrote On 02/12/2011, at 11:28 PM, Rick Bullotta wrote: Doesn't matter how you play the words, you need transactions somewhere. And with REST it is only available as a database plugin. For most people it is just not worth the effort (especially who's not coming from Java background) and they will turn around. Exactly. Unfortunately I am such person who must find some other NoSQL DB :/ because of these 2 mentioned cases. But I promise to come back later and check if standalone + transactions are ready :) Cheers. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3554646.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] SO Question for Pythonistas: ORM for Neo4j ?
Please help answering him, thanks a lot. http://stackoverflow.com/questions/8356626/orm-with-graph-databases-like-neo4j-in-python i wonder wether there is a solution (or a need for) an ORM with Graph-Database (f.e. Neo4j). I'm tracking relationships (A is related to B which is related to A via C etc., thus constructing a large graph) of entities (including additional attributes for those entities) and need to store them in a DB, and i think a graph database would fit this task perfectly. Now, with sql-like DBs, i use sqlalchemyś ORM to store my objects, especially because of the fact that i can retrieve objects from the db and work with them in a pythonic style (use their methods etc.). Is there any object-mapping solution for Neo4j or other Graph-DB, so that i can store and retrieve python objects into and from the Graph-DB and work with them easily? Or would you write some functions or adapters like in the python sqlite documentation (http://docs.python.org/library/sqlite3.html#letting-your-object-adapt-itself) to retrieve and store objects? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] There's already an HA cluster managed by this ZooKeeper cluster
Hi, We are trying to setup neo4j in high-availability mode with 3 nodes in the cluster. When we restart any of the neo4j servers, it fails. We get following exception: == neo4j-zookeeper.log == ERROR main-EventThread org.apache.zookeeper.ClientCnxn - Error while calling watcher java.lang.RuntimeException: There's already an HA cluster managed by this ZooKeeper cluster at org.neo4j.kernel.ha.zookeeper.ZooClient.getRoot(ZooClient.java:370) at org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.getAllMachines(AbstractZooKeeperManager.java:194) at org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.getMasterFromZooKeeper(AbstractZooKeeperManager.java:134) at org.neo4j.kernel.ha.zookeeper.ZooClient.process(ZooClient.java:122) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:506) If we delete the database folder graph.db and then start the server, it starts with no exception and syncs the data. Am I missing any configuration? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/There-s-already-an-HA-cluster-managed-by-this-ZooKeeper-cluster-tp3554731p3554731.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] Standalone server and transactions
On 03/12/2011, at 12:50 AM, Rick Bullotta wrote: I also agree with you that it would be nice to have transaction support over a remote API, but that's not a trivial thing to accomplish in a web scenario when there is not any thread affinity or even necessarily server affinity between requests that occur within a transaction. Knowing when to abandon a pending transaction in a scenario where the client(s) do not maintain a persistent connection is also quite challenging. You just meant to say that HTTP is stateless? :) I proposed one solution in the other thread. Basically: 1. you POST to /transactions?timeout=1000 to request a start of a transaction. 2. The server returns a transaction id for the client to use. 3. Client can PUT /transactions/1234/commit|rollback 4. Otherwise server rolls it back after timeout (which may default to 1 second and can't be longer that configured). It has additional benefit that you can combine transaction with batching: 1. GET /nodes/123 2. POST /transactions/ 3. POST /batch - update everything in a batch, including the transaction itself. Thus additional request to commit/rollback the transaction is not even necessary as in can be batched. One possibility might be to leverage another RPC mechanism or perhaps even something like Web Sockets in the not too distant future. But I think the goal of a language neutral binding also needs to be preserved if possible. HTTP has its advantages. It can be heavily cached by reverse-proxy for example :) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Cypher REST endpoint
Quick question: Just saw this commit from Jake: http://github.com/neo4j/community/commit/f011c51fcbd5f12236fc633f57dcec9fb8cade83 Will the old Cypher plugin endpoint be going away, or will it remain for back-compat? Which release will have the new endpoint? This will be helpful info for library authors. Thanks, -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-REST-endpoint-tp3554828p3554828.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] SO Question for Pythonistas: ORM for Neo4j ?
Put my thoughts in :) -- Matt Luongo Co-Founder, Scholr.ly On Fri, Dec 2, 2011 at 8:56 AM, Michael Hunger michael.hun...@neotechnology.com wrote: Please help answering him, thanks a lot. http://stackoverflow.com/questions/8356626/orm-with-graph-databases-like-neo4j-in-python i wonder wether there is a solution (or a need for) an ORM with Graph-Database (f.e. Neo4j). I'm tracking relationships (A is related to B which is related to A via C etc., thus constructing a large graph) of entities (including additional attributes for those entities) and need to store them in a DB, and i think a graph database would fit this task perfectly. Now, with sql-like DBs, i use sqlalchemyś ORM to store my objects, especially because of the fact that i can retrieve objects from the db and work with them in a pythonic style (use their methods etc.). Is there any object-mapping solution for Neo4j or other Graph-DB, so that i can store and retrieve python objects into and from the Graph-DB and work with them easily? Or would you write some functions or adapters like in the python sqlite documentation ( http://docs.python.org/library/sqlite3.html#letting-your-object-adapt-itself) to retrieve and store objects? ___ 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] Standalone server and transactions
On Fri, Dec 2, 2011 at 3:45 PM, Dmytrii Nagirniak dna...@gmail.com wrote: On 03/12/2011, at 12:50 AM, Rick Bullotta wrote: I also agree with you that it would be nice to have transaction support over a remote API, but that's not a trivial thing to accomplish in a web scenario when there is not any thread affinity or even necessarily server affinity between requests that occur within a transaction. Knowing when to abandon a pending transaction in a scenario where the client(s) do not maintain a persistent connection is also quite challenging. You just meant to say that HTTP is stateless? :) I proposed one solution in the other thread. Basically: 1. you POST to /transactions?timeout=1000 to request a start of a transaction. 2. The server returns a transaction id for the client to use. 3. Client can PUT /transactions/1234/commit|rollback 4. Otherwise server rolls it back after timeout (which may default to 1 second and can't be longer that configured). It has additional benefit that you can combine transaction with batching: 1. GET /nodes/123 2. POST /transactions/ 3. POST /batch - update everything in a batch, including the transaction itself. Thus additional request to commit/rollback the transaction is not even necessary as in can be batched. This is similar to the approach we're looking at, except interaction currently looks like: POST /tx 200: 1 POST /tx/1/node {name:Steven} 201 POST /tx/1/batch [blah blah] 200 PUT /tx/1/state COMMITTED /jake One possibility might be to leverage another RPC mechanism or perhaps even something like Web Sockets in the not too distant future. But I think the goal of a language neutral binding also needs to be preserved if possible. HTTP has its advantages. It can be heavily cached by reverse-proxy for example :) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
On Fri, Dec 2, 2011 at 4:53 PM, Jacob Hansson jacob.hans...@neotechnology.com wrote: On Fri, Dec 2, 2011 at 3:45 PM, Dmytrii Nagirniak dna...@gmail.comwrote: On 03/12/2011, at 12:50 AM, Rick Bullotta wrote: I also agree with you that it would be nice to have transaction support over a remote API, but that's not a trivial thing to accomplish in a web scenario when there is not any thread affinity or even necessarily server affinity between requests that occur within a transaction. Knowing when to abandon a pending transaction in a scenario where the client(s) do not maintain a persistent connection is also quite challenging. You just meant to say that HTTP is stateless? :) I proposed one solution in the other thread. Basically: 1. you POST to /transactions?timeout=1000 to request a start of a transaction. 2. The server returns a transaction id for the client to use. 3. Client can PUT /transactions/1234/commit|rollback 4. Otherwise server rolls it back after timeout (which may default to 1 second and can't be longer that configured). It has additional benefit that you can combine transaction with batching: 1. GET /nodes/123 2. POST /transactions/ 3. POST /batch - update everything in a batch, including the transaction itself. Thus additional request to commit/rollback the transaction is not even necessary as in can be batched. This is similar to the approach we're looking at, except interaction currently looks like: POST /tx 200: 1 Sorry, this should've been 201, of course. POST /tx/1/node {name:Steven} 201 POST /tx/1/batch [blah blah] 200 PUT /tx/1/state COMMITTED /jake One possibility might be to leverage another RPC mechanism or perhaps even something like Web Sockets in the not too distant future. But I think the goal of a language neutral binding also needs to be preserved if possible. HTTP has its advantages. It can be heavily cached by reverse-proxy for example :) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
On 03/12/2011, at 2:53 AM, Jacob Hansson wrote: This is similar to the approach we're looking at, except interaction currently looks like: POST /tx 200: 1 POST /tx/1/node {name:Steven} 201 POST /tx/1/batch [blah blah] 200 PUT /tx/1/state COMMITTED Yeah. Right. We do need the Trn Id for each request. Missed that part. I just wonder maybe there is a way to do it without modifying existing API? (HTTP header is going to be harder). Also I think I'll start to work on a new Ruby REST client (https://github.com/dnagir/morpheus) and it would be good to know the API in advance if possible (or maybe how to discover it). Cheers, Dmytrii. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Heroku, Neo4j and Google Spreadsheet in 10min. Flat.
Hi all, todays lab project: http://vimeo.com/33032604 Thought you might enjoy it. 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 brew install neo4j neo4j start heroku addons:add neo4j ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Gremlin Query - Help
Hi, Scenario 1: I would like to get all Nodes that do not have a relationship to another node. What is the best way to do this Gremlin? Root = NodeA = NodeB Root = NodeC Output should be NodeC I don't understand the problem. Scenario 2: Root = User - Centre I would like to get all centres for userA, and then get all users who are also linked to the same centres of the userA userA.out('hasCentre').in('hasCentre').except([userA]) Scenario 3: User = Centre I would like to get all users that do not have a link to a Centre, and if this is the case, do a projection that returns a fake centre with property Unknown g.V.ifThenElse{it.out('hasCentre').filter{it == aCentre}.hasNext()}{}{println ${it} has center unknown} If you have an index of your Users, then its more efficient to hit that index, then iterate through all vertices (g.V). E.g. g.idx(T.v)[[type:'User']].ifThenElse Scenario 4: REFERRAL = PERSON I would like to combine a query that gets all Referrals that are linked to a person and project a table result (contains referrals and person property values (this is easy to do) However, I then want to do a SPLIT query, that gets referrals without the persons, and then MERGE both back into the table projection? So table projecton might look like this. I guess this is done with .table().it{}cap, but what I am not sure, is how to do a split and merge in parallel and then get that merge projected into the same table. I don't quite understand your problem, but here is an example of splitting and merging. g.v(1).out('knows').copySplit(_().out('knows').name, _().out('created').name).fairMerge This will get all the people that v[1] knows and then generate two parallel pipeline. Each friend of v[1] is copied to each of the 2 parallel pipelines. One pipeline will get their friend's names and one will get their created project's names. It will then merge those two parallel pipelines into a single stream. You can do either fairMerge or exhaustMerge depending on the merging algorithm you want. fairMerge is more memory efficient. I need to write more about split/merge in the Gremlin documentation. https://github.com/tinkerpop/gremlin/wiki/Split-Merge-Pattern -- will work on it :) HTH, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
On Fri, Dec 2, 2011 at 5:12 PM, Dmytrii Nagirniak dna...@gmail.com wrote: On 03/12/2011, at 2:53 AM, Jacob Hansson wrote: This is similar to the approach we're looking at, except interaction currently looks like: POST /tx 200: 1 POST /tx/1/node {name:Steven} 201 POST /tx/1/batch [blah blah] 200 PUT /tx/1/state COMMITTED Yeah. Right. We do need the Trn Id for each request. Missed that part. I just wonder maybe there is a way to do it without modifying existing API? (HTTP header is going to be harder). The idea with this approach is that the current API would remain exactly the way it is (and each request to the old endpoints would be within a single transaction, just like today). We just add this tx resource to do transactional operations across multiple requests. Also I think I'll start to work on a new Ruby REST client ( https://github.com/dnagir/morpheus) and it would be good to know the API in advance if possible (or maybe how to discover it). So none of this is decided on, the approach I posted is one direction we're experimenting in. The reason I can't give you a commitment to some particular direction is that we're still debating and testing approaches. It gets complex, because the issue is not just transactions, but thoughts about throughput and latency as well. Figuring this out is a high-priority issue, but we are currently spread too thin to put a full time developer on it. Me and Michael Hunger are working at it in our spare time, and are making some progress. Hopefully we will be able to assign a full time dev on it before the end of the year, but there are absolutely no promises. I promise though that as soon as we have a workable version to show off, we will post about it on the list to get feedback on it :) /jake Cheers, Dmytrii. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Heroku, Neo4j and Google Spreadsheet in 10min. Flat.
Nice! Show me how to access those services and I'll build you a killer UI for it using ThingWorx - in 10 minutes. ;-) -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Peter Neubauer Sent: Friday, December 02, 2011 11:51 AM To: Neo4j user discussions; neo4jrb Subject: [Neo4j] Heroku, Neo4j and Google Spreadsheet in 10min. Flat. Hi all, todays lab project: http://vimeo.com/33032604 Thought you might enjoy it. 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 brew install neo4j neo4j start heroku addons:add neo4j ___ 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] Heroku, Neo4j and Google Spreadsheet in 10min. Flat.
It's all in there! /peter Sent from my phone, please excuse typos and autocorrection. On Dec 2, 2011 6:37 PM, Rick Bullotta rick.bullo...@thingworx.com wrote: Nice! Show me how to access those services and I'll build you a killer UI for it using ThingWorx - in 10 minutes. ;-) -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Peter Neubauer Sent: Friday, December 02, 2011 11:51 AM To: Neo4j user discussions; neo4jrb Subject: [Neo4j] Heroku, Neo4j and Google Spreadsheet in 10min. Flat. Hi all, todays lab project: http://vimeo.com/33032604 Thought you might enjoy it. 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 brew install neo4j neo4j start heroku addons:add neo4j ___ 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] Cypher REST endpoint
On Fri, Dec 2, 2011 at 3:55 PM, jadell josh.ad...@gmail.com wrote: Quick question: Just saw this commit from Jake: http://github.com/neo4j/community/commit/f011c51fcbd5f12236fc633f57dcec9fb8cade83 Will the old Cypher plugin endpoint be going away, or will it remain for back-compat? Which release will have the new endpoint? This will be helpful info for library authors. Damn Josh, you're quick :) We only talked briefly about how long we will be supporting the old plugin, but it will be *at least* through 1.6, and probably 1.7. The new endpoint will most likely be available as of the next milestone release. We've been told we're bad about making sure changelogs are properly updated, and we had a long talk about that today. We will be making sure that info on this, as well as deprecation plans for the old plugin, are properly included in the changelog for whatever release it becomes a part of. The new endpoint is in fact the same code as the plugin, so it should be reasonably easy to make the switch (should just be the URI change). The only caveat is that it does not currently support google table output like the plugin does. I haven't talked to Peter about if that should be included or not. /jake Thanks, -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-REST-endpoint-tp3554828p3554828.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 -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher REST endpoint
No worries :-) I'm on github all day and just happened to see it on my feed. Good to know that the plugin is staying around for a little while. I'll probably make the switch to the new endpoint for the next milestone, so that it can start seeing some use. This will be a good test of libraries supporting multiple REST API versions! -- Josh -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-REST-endpoint-tp3554828p3555347.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] Relationship indexes
I'm having some trouble understanding relationship indexes. I plan to have nodes with many (hundreds, sometimes thousands) of relationships to other nodes. Give node N, I want to be able to quickly locate one of those relationships given a key. I want to consider only the outgoing relationships of that node, not all nodes. Can this be accomplished? The problem I'm seeing is that when I try to look up a relationship from a RelationshipIndex, I don't see how to limit that lookup to just the outgoing relationships of one node. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.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] Relationship indexes
Frank, Either you could put just some of the rels into the index, or maybe have an additional property in the index for the direction? /peter Sent from my phone, please excuse typos and autocorrection. On Dec 2, 2011 8:28 PM, Frank fr...@studyblue.com wrote: I'm having some trouble understanding relationship indexes. I plan to have nodes with many (hundreds, sometimes thousands) of relationships to other nodes. Give node N, I want to be able to quickly locate one of those relationships given a key. I want to consider only the outgoing relationships of that node, not all nodes. Can this be accomplished? The problem I'm seeing is that when I try to look up a relationship from a RelationshipIndex, I don't see how to limit that lookup to just the outgoing relationships of one node. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.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] Relationship indexes
Thanks for the reply. I *think* that what I need is to do is this: Relationship relationship = relationshipIndex.get(signature, signature, lastNode, null).getSingle(); If I understand the documentation correctly, this should return only the relationships attached to the node lastNode that have the value I'm asking for. Unfortunately, my attempt to use this function results in the following exception: java.lang.UnsupportedOperationException at org.neo4j.rest.graphdb.index.RestRelationshipIndex.get(RestRelationshipIndex.java:42) I'm kind of stuck at this point. Any ideas? Frank On Dec 2, 2011, at 1:59 PM, Peter Neubauer [via Neo4j Community Discussions] wrote: Frank, Either you could put just some of the rels into the index, or maybe have an additional property in the index for the direction? /peter Sent from my phone, please excuse typos and autocorrection. On Dec 2, 2011 8:28 PM, Frank [hidden email] wrote: I'm having some trouble understanding relationship indexes. I plan to have nodes with many (hundreds, sometimes thousands) of relationships to other nodes. Give node N, I want to be able to quickly locate one of those relationships given a key. I want to consider only the outgoing relationships of that node, not all nodes. Can this be accomplished? The problem I'm seeing is that when I try to look up a relationship from a RelationshipIndex, I don't see how to limit that lookup to just the outgoing relationships of one node. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list [hidden email] https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list [hidden email] https://lists.neo4j.org/mailman/listinfo/user If you reply to this email, your message will be added to the discussion below: http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p323.html To unsubscribe from Relationship indexes, click here. NAML -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p347.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] Standalone server and transactions
Doesn't matter how you play the words, you need transactions somewhere. And with REST it is only available as a database plugin. For most people it is just not worth the effort (especially who's not coming from Java background) and they will turn around. If you use the REST API as-is, you will get a single transaction per HTTP request. Neo4j is always transactional. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Standalone server and transactions
And with REST it is only available as a database plugin. And so what if it were? Writing a server plugin isn't hard - I knocked one up in an evening. It's just like writing a stored procedure, only with a different language. Not sure why so many seem to be clinging onto their RDBMS-coloured comfort blankets *Nigel Small* Phone: +44 7814 638 246 Blog: http://nigelsmall.name/ GTalk: ni...@nigelsmall.name MSN: nasm...@live.co.uk Skype: technige Twitter: @technige https://twitter.com/#%21/technige LinkedIn: http://uk.linkedin.com/in/nigelsmall On 2 December 2011 21:58, Jim Webber j...@neotechnology.com wrote: Doesn't matter how you play the words, you need transactions somewhere. And with REST it is only available as a database plugin. For most people it is just not worth the effort (especially who's not coming from Java background) and they will turn around. If you use the REST API as-is, you will get a single transaction per HTTP request. Neo4j is always transactional. Jim ___ 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] Gremlin/Groovy UNIQUE + Closure support
Hi Guys, If I do a query with out.as(xyz)...out.unique()..out.tablecap I find that the table projections for the closure do not work and I lose all AS references. So to get closure support I do this Out.unique._().out..table The above sorts out the closure error, but then I lose my previous as projections, is there a way to ensure _() preserves all my previous pipes and placeholders? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Gremlin Query - Help
Marko, Thank you very much, I really appreciate it, I will start going through your response here. I have also added the copy/split aggregate functionality into our Gremlin Client. I was not aware of the if then else as well, will extend our client to support this. Apologise, will explain Scenario One. I have a User Node that has a relationship LINKED_TO_CENTRE I would like to get a query that can give me all Users that do not have a relationship LINKED_TO_CENTRE. I was thinking of the Except/Retain pattern for this, e.g. get all users as aggregate A then get all users linked as aggregate b - then use except/retain or something along these lines. On Another note, is there a way to get unique()._() to preserve all previous pipes and placeholders, the reason is I want to use unique() before doing a table projection. And unique breaks closures? ( I have a separate post on this in the mail list) Marko, if you interested here is how the .NET code looks like that I am currently trying to write to generate a report. Its not yet finished as I need to take into consideration your feedback, but I am sure I will get their eventually. //ToDo Chained 'As' statements are reversed, bug in gremlin plugin with chained as - https://github.com/neo4j/community/issues/114 var resultSet = graphClient .RootNode .OutAgency(Hosts.TypeKey, a = a.Key == userIdentifier.AgencyKey) .InUser(UserBelongsTo.TypeKey, u = u.Username == userIdentifier.Username) .OutCentre(UserLinkedToCentre.TypeKey) .As(Centre) .InUser(UserLinkedToCentre.TypeKey) //.GremlinDistinct() - breaks pipes for table output .As(UserGivenName) .As(UserFamilyName) .InReferral(CreatedBy.TypeKey, r = r.Completed == false) .As(ReferralId) .OutReferralWhoSection(ReferralHasWhoSection.TypeKey) .As(ReferralDate) .OutReferralParticipant(HasParticipant.TypeKey) .As(ParticipantName) .InReferralWhoSection(HasParticipant.TypeKey) .InReferral(ReferralHasWhoSection.TypeKey) //.GremlinDistinct() - breaks pipes for table output .TableReferralByGroup, Centre, User, User, Referral, Referral, ReferralParticipant( centre = centre.Name, user = user.FamilyName, user = user.GivenName, referral = referral.UniqueId, referral2 = referral2.DateInitiatedUtc, participant = participant.Name ); Thank You Much appreciated -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Marko Rodriguez Sent: Saturday, 3 December 2011 4:10 AM To: Neo4j user discussions Subject: Re: [Neo4j] Gremlin Query - Help Hi, Scenario 1: I would like to get all Nodes that do not have a relationship to another node. What is the best way to do this Gremlin? Root = NodeA = NodeB Root = NodeC Output should be NodeC I don't understand the problem. Scenario 2: Root = User - Centre I would like to get all centres for userA, and then get all users who are also linked to the same centres of the userA userA.out('hasCentre').in('hasCentre').except([userA]) Scenario 3: User = Centre I would like to get all users that do not have a link to a Centre, and if this is the case, do a projection that returns a fake centre with property Unknown g.V.ifThenElse{it.out('hasCentre').filter{it == aCentre}.hasNext()}{}{println ${it} has center unknown} If you have an index of your Users, then its more efficient to hit that index, then iterate through all vertices (g.V). E.g. g.idx(T.v)[[type:'User']].ifThenElse Scenario 4: REFERRAL = PERSON I would like to combine a query that gets all Referrals that are linked to a person and project a table result (contains referrals and person property values (this is easy to do) However, I then want to do a SPLIT query, that gets referrals without the persons, and then MERGE both back into the table projection? So table projecton might look like this. I guess this is done with .table().it{}cap, but what I am not sure, is how to do a split and merge in parallel and then get that merge projected into the same table. I don't quite understand your problem, but here is an example of splitting and merging. g.v(1).out('knows').copySplit(_().out('knows').name, _().out('created').name).fairMerge This will get all the people that v[1] knows and then generate two parallel pipeline. Each friend of v[1] is copied to each of the 2 parallel pipelines. One pipeline will get their friend's names and one will get their created project's names. It will then merge those two