Re: [Neo4j] update node properties via rest?
Is there a plan to fix this or will updates continue to be overwrites? Many thanks! On Thu, Jul 28, 2011 at 10:43 AM, Boris Kizelshteyn bo...@popcha.comwrote: It is a put right now and the semantics are clear I think, update means add stuff that isn't there and change stuff that's different. Adding an empty value should clear that value and not including means do nothing. When updating is really important in the rest context is in batching, basically, now, there is no way to batch update efficiently. You have to query for the nodes you want to change and send that call and then add to those values in code and then send the values back as an overwrite. Javier's excellent REST lib makes this a little easier code wise, but suffers from being unusably slow for large updates because of this REST limitation. If infact this is the reasoning (what to do with missing values) behind making it a replace and not an update, I vote for changing it to update. Furthermore, I believe that calling a named resource with a PUT and overwriting it violates RESTfull design. i.e. Put to /node/0 should overwrite, while /node/0/properties should update. See this link: http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services (I know wikipedia references are not that strong, but this is straight out of an o'rielly design patterns book which is a little stronger :)) I don't mean to start a holy war about standards (rest isn't really a standard anyway), I'm just saying that currently this feature doesn't work as advertised and makes it hard to update large datasets quickly via rest. Thanks! On Thu, Jul 28, 2011 at 8:21 AM, Jim Webber j...@neotechnology.comwrote: Feature (though perhaps PUT) would be a better choice of method. POSTing a new set of properties can't update, because the semantics aren't clear - what would it mean if a property was missing, is that an effective DELETE, or an indication it should be left alone. 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] update node properties via rest?
I don't see this as a bug. The implemented behaviour is congruent to what I expect from a REST interface. -- Tatham -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Boris Kizelshteyn Sent: Tuesday, 9 August 2011 1:04 AM To: Neo4j user discussions Subject: Re: [Neo4j] update node properties via rest? Is there a plan to fix this or will updates continue to be overwrites? Many thanks! On Thu, Jul 28, 2011 at 10:43 AM, Boris Kizelshteyn bo...@popcha.comwrote: It is a put right now and the semantics are clear I think, update means add stuff that isn't there and change stuff that's different. Adding an empty value should clear that value and not including means do nothing. When updating is really important in the rest context is in batching, basically, now, there is no way to batch update efficiently. You have to query for the nodes you want to change and send that call and then add to those values in code and then send the values back as an overwrite. Javier's excellent REST lib makes this a little easier code wise, but suffers from being unusably slow for large updates because of this REST limitation. If infact this is the reasoning (what to do with missing values) behind making it a replace and not an update, I vote for changing it to update. Furthermore, I believe that calling a named resource with a PUT and overwriting it violates RESTfull design. i.e. Put to /node/0 should overwrite, while /node/0/properties should update. See this link: http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_ web_services (I know wikipedia references are not that strong, but this is straight out of an o'rielly design patterns book which is a little stronger :)) I don't mean to start a holy war about standards (rest isn't really a standard anyway), I'm just saying that currently this feature doesn't work as advertised and makes it hard to update large datasets quickly via rest. Thanks! On Thu, Jul 28, 2011 at 8:21 AM, Jim Webber j...@neotechnology.comwrote: Feature (though perhaps PUT) would be a better choice of method. POSTing a new set of properties can't update, because the semantics aren't clear - what would it mean if a property was missing, is that an effective DELETE, or an indication it should be left alone. 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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] update node properties via rest?
Feature (though perhaps PUT) would be a better choice of method. POSTing a new set of properties can't update, because the semantics aren't clear - what would it mean if a property was missing, is that an effective DELETE, or an indication it should be left alone. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] update node properties via rest?
It does not infact update, it overwrites. Feature or bug? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] update node properties via rest?
Boris, do you have the http requests to recreate 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 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, Jul 27, 2011 at 11:57 AM, Boris Kizelshteyn bo...@popcha.com wrote: It does not infact update, it overwrites. Feature or bug? ___ 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] update node properties via rest?
It's the basic documented update form the manual post to /properties. You can even do it in the console and it will exhibit the behaviour. I you need it I will send you my query later on ... Thanks! On Wed, Jul 27, 2011 at 2:59 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Boris, do you have the http requests to recreate 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 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, Jul 27, 2011 at 11:57 AM, Boris Kizelshteyn bo...@popcha.com wrote: It does not infact update, it overwrites. Feature or bug? ___ 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] update node properties via rest?
On Wed, Jul 27, 2011 at 14:57, Boris Kizelshteyn bo...@popcha.com wrote: It does not infact update, it overwrites. Feature or bug? I asked me the same question and I decided it was a feature... -- Javier de la Rosa http://versae.es ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user