ColeGreer
ColeGreer
ATApache TinkerPop
Created by Memo on 10/16/2024 in #questions
Basic vertex querying does not work in Amazon Neptune but it works with local Gremlin Server
@Memo Can I ask how you are constructing and configuring your GraphTraversalSource (gremlinService.readClientSource)? I gave a quick test with the most basic setup (using gremlin 3.7.2 and Neptune 1.3.2.1) and it works as I would expect:
async function main(){
const g = traversal().withRemote(new DriverRemoteConnection('wss://my-neptune.cluster-xxxxxxxxxxxx.region.neptune.amazonaws.com:8182/gremlin'));
const results = await g.V().limit(1).elementMap().next()
console.log(results.value)
}
async function main(){
const g = traversal().withRemote(new DriverRemoteConnection('wss://my-neptune.cluster-xxxxxxxxxxxx.region.neptune.amazonaws.com:8182/gremlin'));
const results = await g.V().limit(1).elementMap().next()
console.log(results.value)
}
Map(4) {
EnumValue { typeName: 'T', elementName: 'id' } => '2',
EnumValue { typeName: 'T', elementName: 'label' } => 'person',
'name' => 'vadas',
'age' => 27
}
Map(4) {
EnumValue { typeName: 'T', elementName: 'id' } => '2',
EnumValue { typeName: 'T', elementName: 'label' } => 'person',
'name' => 'vadas',
'age' => 27
}
9 replies
ATApache TinkerPop
Created by Wolfgang Fahl on 10/16/2024 in #questions
pymogwai
Hey thanks for sharing, that's pretty cool. That's the first time I've seen an embedded graph implementation in python with native support for gremlin. Do you have any future plans for the project?
6 replies
ATApache TinkerPop
Created by Max on 9/28/2024 in #questions
Best practices for local development with Neptune.
To add to Daniel's comment, the String ID manager will be included in the 3.7.3 release which is expected to be published by the end of October.
11 replies
ATApache TinkerPop
Created by Jonathan Fridja on 10/6/2024 in #questions
[Bug] clone query affects original cloned query
Hi @Jonathan Fridja, thanks for reporting the issue, I agree that this appears to be a bug. Unlike the clone() implementation in the java driver which this was based off of, the js clone only creates a shallow copy which does not clone the underlying bytecode. For reference this is how clone is implemented in Java: https://github.com/apache/tinkerpop/blob/76190de1086d8be4e207e69d1cc599c9d036a8b5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java#L267-L290. Would you be willing to submit a PR to the 3.6-dev with a fix to fix to create a deep copy of the bytecode? If you could, that would be great, otherwise I can open up a JIRA to track this bug.
5 replies
ATApache TinkerPop
Created by joshb on 8/29/2024 in #questions
Is it possible to configure SSL with PEM certificate types?
Hi @joshb, am I correct in assuming you are using the Java driver to connect to Aerospike? The java driver uses the JSSE keyStore and trustStore, which as far as I understand does not support the PEM format. You may be able to use a 3rd party tool such as openssl to convert from PEM to PKCS12 (https://docs.openssl.org/1.1.1/man1/pkcs12/). Perhaps @aerospike folks may have more direct recommendations for driver configuration.
6 replies
ATApache TinkerPop
Created by Balan on 8/23/2024 in #questions
How can we extract values only
@Balan Are you trying to calculate the distance between 2 points in gremlin or are you trying to fetch the lat/lon from some point in your graph, and then compute the distance between points in some external language of your choice (python, java, js...)? If you are trying to do the distance calculation in gremlin, could you share an example of your current query? If you are trying to fetch a point and get the results back in some json without the "@type"/"@value" metadata then I believe @Kennh and @triggan's suggestions around using untypped graphson is what you are looking for.
9 replies
ATApache TinkerPop
Created by dracule_redrose on 3/19/2024 in #questions
Design decision related to multiple heterogenous relational graphs
Hosting 100k small graph instances isn't a usage pattern I've seen a whole lot. JanusGraph seems like a reasonable choice to me, although I see you've been running into issues with conflicting vertex/edge id's. I'm unsure if JanusGraph supports non-globally unique id's in multiple graph deployments. My understanding is that JanusGraph generally recommends avoiding using user-defined id's whenever possible, in favour of automatically generated id's from JanusGraph. Perhaps some @janusgraph folks with more familiarity with configuring multiple graphs can give some clearer advice for your setup.
9 replies
ATApache TinkerPop
Created by Dseguy on 12/28/2023 in #questions
Splitting a query with range()
In my opinion using range() like this is the easiest and most flexible method of splitting queries. As long as you are aware of the considerations mentioned above I think it's a good way to go. TinkerGraph works well with this as it produces results in a guaranteed order (g.V() in TinkerGraph will always return vertices in the order they were added to the graph). I believe the same is true for Neo4j and the Neo4j plugin although my experience there is limited and I have not seen it documented anywhere or properly tested. If you need a robust guarantee of ordering with Neo4j that likely warrants further investigation.
9 replies
ATApache TinkerPop
Created by Dseguy on 12/28/2023 in #questions
Splitting a query with range()
I have often used range() steps to break up queries, it can be a useful technique but does come with several caveats. The most important piece is that this will only work if your database guarantees that the common part of your query will always produce results in a consistent order. The default implementation of range(x, x + 1000) will first iterate and discard the first x results, then pass the next 1000. If the result ordering changes on each execution, then you will essentially be taking a random sample of 1000 results each time, instead of progressively going batch by batch. You already mentioned the performance concerns with the common part of the query being executed each time, due to the way this is implemented, this performance penalty is proportional to x (minimal penalty when x is small as almost no results are skipped, larger penalty with large x as many results need to be processed and skipped). Results will depend greatly on your DB and your data but in general, if the left-hand side of the query is fast and efficient in your DB, and the right-hand side is slow and complex, then this technique works quite well. I've mostly used such queries in the form of g.V().range(x, x+1000).foo()... and the results have generally been acceptable for my purposes. Assuming that your database is able to efficiently lookup vertices by label and that there are no ordering concerns there, your proposed solution seems reasonable in my opinion. Other alternatives may be to filter based on vertex id's (depends largely on what type/structure your graph uses for id's), or adding some sort of metadata to your graph to help with partitioning.
9 replies
ATApache TinkerPop
Created by billmanh on 8/26/2023 in #questions
Trying to run a local version for a test, what is the correct serializer?
Platform differences shouldn't matter here. I'm wondering if that server metrics error is somehow related to the server disconnecting. I believe I can reproduce that metrics error to confirm this.
33 replies
ATApache TinkerPop
Created by billmanh on 8/26/2023 in #questions
Trying to run a local version for a test, what is the correct serializer?
@billmanh I'm not sure this is related to your issue here but I wanted to point out that in 3.7.0, the serializers were migrated from a gremlin.driver.ser package to gremlin.util.ser. Therefore the serializer in the config in your original question should be changed to org.apache.tinkerpop.gremlin.util.ser.GraphBinaryMessageSerializerV1
33 replies
ATApache TinkerPop
Created by shivam.choudhary on 7/31/2023 in #questions
User-Agent Metric Not Exposed in Gremlin Server - Need Help Troubleshooting
Hi @shivam.choudhary, Yes unfortunately throughput isn't something which is currently recorded in the metrics. This is something that could be added by extending one of the Channelizers and adding a new handler to the pipeline (let me know if you want any guidance with doing something like this). It would also be good to open up a JIRA for this. It would be useful to have throughput metrics built into the server out of the box, as well as an easier extension point for adding custom handlers.
9 replies
ATApache TinkerPop
Created by shivam.choudhary on 7/31/2023 in #questions
User-Agent Metric Not Exposed in Gremlin Server - Need Help Troubleshooting
Hey @shivam.choudhary, sorry I may have brushed over some details earlier. The server will look for a 'User-Agent' header from the initial connection request on the completion of the web socket handshake. It will not look for that header in subsequent messages sent via the existing connection. How are you currently setting the header? Also a bit of an unrelated question but what sort of insights are you most interested in observing? I've always wanted to come back to this feature at some point to add in additional extensibility on the server side.
9 replies
ATApache TinkerPop
Created by nathimble_07451 on 8/10/2023 in #questions
Can't do explain() traversal step using Gremlin-Python ..
Ahh I just spent half an hour going down the rabbit hole of "discovering" that explain() doesn't work in any remote traversal regardless of the driver. I guess that's what I get for not checking discord earlier. I will update that old issue with some new details.
9 replies
ATApache TinkerPop
Created by shivam.choudhary on 7/31/2023 in #questions
User-Agent Metric Not Exposed in Gremlin Server - Need Help Troubleshooting
Yes, the current user agent capabilities is only for websocket connections. Currently to add any user agent handling from HTTP requests, HTTPChannelizer would need to be extended and a custom netty handler would need to be added to the ChannelPipeline in the configure() method. The server could then be configured to use the extended channelizer with the custom handler.
9 replies
ATApache TinkerPop
Created by ManabuBeach on 6/22/2023 in #questions
Solved: Gremlin Python Exceptions with .property("timeStamp", 0)
That's a bit odd, I would expect this to be the sort of error that is pretty reliable to reproduce. For now I would expect that using statics.long() everywhere will prevent these issues. We do have a pair of tickets to clean this up a bit. Unfortunately I doesn't look like it will be resolved before the next TinkerPop release, I hope we could solve it soon though. https://issues.apache.org/jira/browse/TINKERPOP-2943 https://issues.apache.org/jira/browse/TINKERPOP-2363
8 replies
ATApache TinkerPop
Created by ManabuBeach on 6/22/2023 in #questions
Solved: Gremlin Python Exceptions with .property("timeStamp", 0)
This is an issue that seems to come up quite often. Improvements here is definitely something we should target whether it be some sort of auto-casting or at least clearer exceptions. The range in graphbinaryV1.py:dictify seems ok to me, those are the correct values for the java long type (it would be nice if the types could be decoupled somewhat from Java types but let's save that for a future discussion). It's not immediately obvious to me why you would get the "Value too big, please use bigint Gremlin type" exception if your value is within the correct range.
8 replies
ATApache TinkerPop
Created by pedrobalbino on 6/14/2023 in #questions
Help Needed with Sample Method in Gremlin-Go
How big is qty? The issue appears to be that qty is being mapped to a Java long. If qty can safely be stored in a uint32, your issue should be resolved by changing Sample(qty) to Sample(int32(qty))
7 replies
ATApache TinkerPop
Created by Jim Idle on 6/9/2023 in #questions
Gremlingo with Neptune - Read loop error
Don't worry about noise, there's no bad questions here. I'm sure someone will find this thread helpful down the line. Also just an FYI, Neptune serverless 1.2.1.0 with TinkerPop 3.6 support is available now. It doesn't upgrade automatically. You can upgrade the version selecting the cluster in the Neptune console and hitting the Modify button.
11 replies
ATApache TinkerPop
Created by Joyemang33 on 6/10/2023 in #questions
Are the developers of TinkerPop interested in the Performance difference on the equivalent queries?
Yeah I agree with Lyndon on this one. Would be super cool to have a general way to do these sorts of optimizations but it requires a lot of awareness of what steps will reduce search space the quickest. I'm sure some heuristics could be developed which are reasonably effective at predicting this but it's not a trivial problem by any means. I do like the idea of generating a ton of equivalent queries and profiling them to try and find relationships between different graph structures and which queries are most performant on them. Feels like a good ML problem to me.
40 replies