Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Transactions, Cypher Queries and the REST API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Leidegren  
View profile  
 More options Aug 1 2012, 4:14 pm
From: John Leidegren <john.leideg...@gmail.com>
Date: Wed, 1 Aug 2012 13:14:08 -0700 (PDT)
Local: Wed, Aug 1 2012 4:14 pm
Subject: Transactions, Cypher Queries and the REST API

I was wondering if there was anyway via the REST API to run multiple Cypher
queries in a single transaction. I haven't be able to find anything
on multiple statements Cypher queries nor anyway to manage transactions via
the REST API.

I do have an idea of how something like this could work though.

   - For each request there's a single transaction in play.
   - Cypher queries are streamed in the form of a JSON objects. As results
   become available they are streamed back to the client.
   - If the client wants to run multiple Cypher queries it simply streams
   multiple JSON objects (not necessarily in the form of an array is the upper
   bound is unknown).
   - If the client wants to abort the transaction it sends a "TRANSACTION
   ABORT" Cypher query (this would be an extension to the Cypher
   query language).
   - Otherwise, when the connection is closed the transaction is committed.
   Ideally, all the data/status information should have arrived at the client
   so the transaction should commit fine, if this is a problem then a similar
   "TRANSACTION COMMIT" might be useful.

The point is that it creates a comet programming like way for any client
via the REST API to stream Cypher queries work on the results and then
maybe stream some more, all within the same transaction.

I'm unsure as to what the cost is for having significantly longer
transactions in play, as well as keeping additional HTTP sockets occupied
but I do believe that something like this is useful to fully leverage
transactions via Cypher and the REST API and more efficient than issuing
multiple HTTP requests for creating, running and committing mutating
queries.

I'm I completely mad suggesting something like this?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Aug 2 2012, 4:55 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Thu, 2 Aug 2012 10:55:36 +0200
Local: Thurs, Aug 2 2012 4:55 am
Subject: Re: [Neo4j] Transactions, Cypher Queries and the REST API

Something like this is planned in the future but outside the scope of cypher probably.

Right now you can use the REST batch operations to send multiple cypher queries in a single transaction/request.

With the header X-Stream:true both inputs and outputs will be streamed.

With an invalid cypher query (like 'ABORT') you can cause an exception to be thrown which will roll back the server. (Kind of a poison pill)

HTH

Michael

Am 01.08.2012 um 22:14 schrieb John Leidegren:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Leidegren  
View profile  
 More options Aug 2 2012, 12:53 pm
From: John Leidegren <john.leideg...@gmail.com>
Date: Thu, 2 Aug 2012 09:53:26 -0700 (PDT)
Local: Thurs, Aug 2 2012 12:53 pm
Subject: Re: [Neo4j] Transactions, Cypher Queries and the REST API

Is there anyway one might expedite something like this? Like writing some
code?

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ibs Devs  
View profile  
 More options Oct 30 2012, 6:48 am
From: Ibs Devs <ibsd...@googlemail.com>
Date: Tue, 30 Oct 2012 03:48:38 -0700 (PDT)
Local: Tues, Oct 30 2012 6:48 am
Subject: Re: [Neo4j] Transactions, Cypher Queries and the REST API

Is there a Batch Operation example with Cypher? I want to group multiple
Cypher Queries as a transaction.

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 30 2012, 7:40 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Tue, 30 Oct 2012 12:40:26 +0100
Local: Tues, Oct 30 2012 7:40 am
Subject: Re: [Neo4j] Transactions, Cypher Queries and the REST API

I have one using ruby :)

https://github.com/jexp/app-net-graph/blob/master/lib/appnet.rb#L35
calling
https://github.com/jexp/app-net-graph/blob/master/lib/cypher.rb#L14

Michael
Am 30.10.2012 um 11:48 schrieb Ibs Devs:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »