red
ATApache TinkerPop
•Created by red on 10/22/2024 in #questions
Profiling Neptune from javascript
Hi, I'm looking to profile some existing gremlin queries via Neptune so I can understand the current performance and then optimise.
Looking at the documentation, there isa http endpoint at "<endpoint>:<port>/gremlin/profile.
I've been able to access this through curl, sending a serialised string.
I would like to know what options I have to do this in javascript.
I am currently using a wss connection, but noticed that swapping to https, I could still run my queries.
I'd hoped that I could just add a '/profile' to my host url, but it wasn't so simple.
I can see in the docs that I can also send in bytecode to the endpoint, and I've inspected the query object and found a bytecode object, which I assume is sent when I await the query.
Is there a connection setup that will allow me to simply run my query as usual to get a profile out? If not, what options do I have available to me to profile my queries in Neptune?
Thanks :gremlin_smile:
5 replies
ATApache TinkerPop
•Created by red on 10/14/2024 in #questions
Naming multiple vertices
I've got a list of vertices and a list of unique names. I'm looking to apply one name to each node, but struggling with the syntax.
I think I should be using some sort of query builder where I can do:
names.forEach(index, name)
I'm expecting each query to involve select() where() has() index(), but have been having some difficulties in figuring out how to piece these together in gremlin js
9 replies
ATApache TinkerPop
•Created by red on 9/27/2024 in #questions
Vertex hashmaps
Hi, I'm looking to copy subgraphs, if there are better practices for this in general, please let me know
I'm currently looking at emitting a subtree, then creating new vertices, storing a mapping of the original to the copy, and reusing this mapping to build out the relationships for the copied vertices.
I'm not sure how I should be doing this, currently I'm trying to use the aggregate step to store the original/copy pairs, but I'm not sure how to select nodes from this in future steps.
I'd appreciate any suggestions or help around these kind of operations, thanks
I've been able to do this by building edges between the original nodes and the copies and traversing them, but I'm not sure if this is a typical pattern or there may be better approaches
7 replies