Anyone using Tinkerpop docker as a local Cosmos replacement

Running into some random issues. Looking for tips and tricks.
Solution:
One thing to consider in trying to do this is that you would likely use TinkerGraph and Gremlin Server for this local replacement. CosmosDB has a number of limitations and differences that this local environment would not catch, so it's possible that you could write some Gremlin that works locally but then fails when you try the same query on CosmosDB. That said, if you stay aware of those differences, stick to sending scripts and prefer the 3.4.x server release it could give you a basic but not...
Solution
spmallette
spmallette82d ago
One thing to consider in trying to do this is that you would likely use TinkerGraph and Gremlin Server for this local replacement. CosmosDB has a number of limitations and differences that this local environment would not catch, so it's possible that you could write some Gremlin that works locally but then fails when you try the same query on CosmosDB. That said, if you stay aware of those differences, stick to sending scripts and prefer the 3.4.x server release it could give you a basic but not perfect replacement.
mpsharp#415
mpsharp#41580d ago
So ran into one quirk, curious if there's a work around. On Cosmos, if you order().by on a non-existing field, you get all the items in a random order. On Tinkerpop, you don't get any items. The order().by acts as a "where" which is unexpected.
spmallette
spmallette79d ago
Usage of by() was incredibly inconsistent prior to 3.6.0. It behaved a lot of different ways for different steps that surprised people. At 3.6.0 the behavior settled on:
If the by() produces a result then it is said to be "productive" and its value is propagated to the step for use. If the by() does not produce a result then the traverser to which it was to be applied is filtered.
At the time, we offered g.withStrategies(ProductiveByStrategy) to force by() to be productive even when it wasn't, but that wouldn't be available to CosmosDB which to the best of my knowledge is still on 3.4.x behavior. Since it's on some form of 3.4.x, i'm not even sure null production for failed by() modulators was available. You might try something like:
g.V().order().by(coalesce(values('age'), constant("")))
g.V().order().by(coalesce(values('age'), constant("")))
you can read more here if interested: https://tinkerpop.apache.org/docs/current/upgrade/#_consistent_by_behavior
mpsharp#415
mpsharp#41579d ago
Thanks, it turns out the easiest answer for us is to just shove a default value on those objects, but I was surprised by that behavior.
Want results from more Discord servers?
Add your server
More Posts
Configuring Websockets connection to pass through a proxy serverHey, I'm working on making G.V() fully proxy aware, but I can't seem to get websockets connection tpython goblin vs spring-data-goblin for interactions with gremlin serverI want an OGM to interact with my gremlin server. What would be a good choice?Is there any open source version of data visualizer for aws neptune?Is there any open source version of data visualizer for aws neptune. I'll need it since it essentialDynamic select within query not working.Any insights or help would be greatly appreciated. I have to pass a list of lists in the format beAdding multiple properties to a vertex using gremlin-goHello Community, I have a question regarding how multiple properties can be added to a vertex using Is it possible to walk 2 different graphs using custom TraversalStrategy in Gremlin?I have 2 different graphs in 2 different Neptune cluster. Both of them can have few reference verticSideEffect a variable, Use it later after BarrierStep?I seek a query that builds a list and then needs to both sum the list's mapped values and divide theMemory issue on repeatI am traversing all nodes occuring in the same cluster given one of the nodes in that cluster. SurpWhich database should i use for my DJ set planning software?Hi, i want to develop a software that lets DJs plan a set (i.e. playlist) and i'm wondering if graphHow will i add unique values to the vertices or edge properties in NeptuneI can't get a doc regarding adding unique data through gremlin. Is there any way to do it, other thaNot getting result in hasId() but id().is() worksI don't get any response using g.V().hasId(48). But when i use g.V().id().is(48). it shows output. Sdotnet `Enumeration has not started. Call MoveNext` if I try to enumerate over a resultI recently try to use gremlin to created a graph and query this graph. Currently I get it working toI can't create an edge in aws neptune using gremlin. I can create vertices. but not edge.import { driver, process as gremlinProcess, structure } from "gremlin"; async function checkOut() {Iterating over responsesI've got a query akin to this in a python application using `gremlin-python`: ``` t = traversal().w