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

Reply via email to