Database locking, does it exist in TinkerPop, Gremlin or specific Graph Databases?

174 views
Skip to first unread message

Jeffrey Freeman

unread,
Dec 7, 2014, 9:10:28 PM12/7/14
to gremli...@googlegroups.com
I have been trying to find out if there is some sort of locking support. Some way you can lock a portion of a graph so other queries cant read/write to it until you are done with your own operation. This is sometimes necessary for consistency. I have yet to find a mechnism like this with TinkerPop though, am I missing something?

Stephen Mallette

unread,
Dec 8, 2014, 6:46:04 AM12/8/14
to gremli...@googlegroups.com
TinkerPop doesn't do much to enforce locking/consistency.  Basically, you need to consider the semantics of the underlying graph database to understand the expected consistency at the TinkerPop level.  

This does create some problems if you are trying to write completely graph agnostic code.  Rexster has had all kinds of problems over the years in relation to that, so I would assume that other applications have hit the same problems.  I tried to to go down the path of generalizing "consistency" in TinkerPop3 and ended up in the same mess that we had with indices, where the disparity of operations in the underlying stores created few commonalities.  We might yet see this capability in TinkerPop3, as graph vendors seemed interested in the concept, but it will not be a part of GA for sure.

On Sun, Dec 7, 2014 at 9:10 PM, Jeffrey Freeman <jeffrey...@syncleus.com> wrote:
I have been trying to find out if there is some sort of locking support. Some way you can lock a portion of a graph so other queries cant read/write to it until you are done with your own operation. This is sometimes necessary for consistency. I have yet to find a mechnism like this with TinkerPop though, am I missing something?

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/cde91217-eb36-4b04-ad59-95842cab7bfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeffrey Freeman

unread,
Dec 8, 2014, 7:01:29 AM12/8/14
to gremli...@googlegroups.com
So right now, if the underlieing database allows for locking then in tinkerpop is this most likely going to automatically engaged via transactions? And that is pretty much the only way to cause locking and there is no way to really know if locking is taking place or not (without talking to the native API of the graph database itself of course).

Stephen Mallette

unread,
Dec 8, 2014, 7:14:34 AM12/8/14
to gremli...@googlegroups.com
That's correct - if you understand how the underlying store treats consistency via TinkerPop transactions, then you know what kind you will get.  If you need more control and the underlying graph provides it, then you will have to drop down to db native code.

Jeffrey Freeman

unread,
Dec 8, 2014, 4:45:39 PM12/8/14
to gremli...@googlegroups.com
Thanks, that is helpful.
Reply all
Reply to author
Forward
0 new messages