Florian Hockmann
Explore posts from serversJJanusGraph
•Created by karthikraju on 9/13/2024 in #questions
Indexes are not being used even after enabling
https://docs.janusgraph.org/schema/index-management/index-performance/#composite-index
Note, that all keys of a composite graph index must be found in the query’s equality conditions for this index to be used. For example, the following query cannot be answered with either of the indexes because it only contains a constraint on age but not name.
g.V().has('age', 30)
9 replies
JJanusGraph
•Created by karthikraju on 9/13/2024 in #questions
Indexes are not being used even after enabling
Your index
byIdTypeAndName
includes 3 property keys: _id
, type
, and name
. In that case, you also have to use all 3 property keys in your traversal for the index to work9 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
However in this case, since it's just a short addition to the docs, you could probably also skip that if you want to.
The idea generally is that it means that the change will be included in the CHANGELOG and it allows others to provide feedback, ideally before you put in any effort
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
Under Gremlin-Python > Submitting Scripts ? Sounds good to me.
Ideally, you first create an issue with the TinkerPop project: https://issues.apache.org/jira/browse/TINKERPOP/
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
Sure, that definitely makes sense. Schema management is specific to JanusGraph so we should document how that can be done which also includes the different languages
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
Just wanted to clarify, the script that I pass can be anything that groovy allows right? I can define functions and variables inside that script and pass that?Yes We're also doing the same at my company. We have a big auto generated schema creation script which contains functions for things like creating a vertex label with properties, creating an edge label, and so on
I will be able to see the indices in the opensearch dashboard if they are created right?I haven't used opensearch myself, but in general yes, you can see mixed indices created by JanusGraph also directly in your index backend. (Note the "mixed" here as composite indices are not backed by the index backend)
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
You can of course also return something else if you want to use that to determine whether your script was executed successfully. Just make sure that it's a type that the server can serialize and your client deserialize, like any primitive data type (int, string, etc.)
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
Oh, yes, this is a bit confusing. So, types like the
ManagementSystem
cannot be serialized and therefore not be returned from the server to the client. However, that is also not necessary.
So, you just need to make sure that the server won't try to return such a type. The server will simply try to return the result of the last line of your Groovy script. If that's mgmt = graph.openManagement()
, then it will try to return mgmt
.
The easiest workaround is to end your script in []
to let the server just return an empty array which you can then ignore on the client29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
So my recommendation is to stay in Python if that's the programming language that you typically use and have most experience in.
Gremlin Console is still a helpful tool to work interactively with your graph and for example try out new traversals before you implement them in Python where it's a bit harder to debug them if something doesn't directly work
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
The general recommendation nowadays is mostly to stay away from these graph APIs you are mentioning and instead only use Gremlin to traverse the graph.
The graph API is mostly meant to be used by JanusGraph internally
29 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
You'll get automatic transaction management from JanusGraph Server if you just submit your traversals (= graph queries) from any language. JanusGraph Server will execute each traversal then in its own transaction.
So, manually managing transactions shouldn't be necessary
29 replies
JJanusGraph
•Created by skywalker_101010 on 2/6/2024 in #questions
Best configuration for a single server
No, sorry, I would have responded there if I could help.
Connection reset by peer
is something that I also see from time to time in our logs, but I never investigated further as it's not unusual in a setup with pods restarting regularly.
In the linked question, it's also related to some SSL error and I can't say anything about that11 replies
JJanusGraph
•Created by b4lls4ck on 8/23/2024 in #questions
Speeding up Queries Made to JanusGraph
You can also write a Groovy script and send that to the server for evaluation. That's of course also possible from Python
29 replies
JJanusGraph
•Created by NeO on 8/1/2024 in #questions
How does remote gremlin server reacts to credential rotation.
storage.username
and storage.password
have the mutability level LOCAL
. This means that they changing them in general is not an issue as they are just taken from the config file of that specific Gremlin Server.
This means that you can change the credentials for different Gremlin Server instances one after another, leaving you always with some instances that are up and running to server Gremlin queries4 replies
JJanusGraph
•Created by skywalker_101010 on 2/6/2024 in #questions
Best configuration for a single server
We actually separate JanusGraph servers between writing / reading, but that's not because of resources but for security reasons. It allows us to use different credentials for apps that can only read data vs apps that can also write.
So, yes, we are also using JanusGraph Server instances in Docker for writing.
I am not sure though whether that has performance improvements vs embedded JanusGraph. Maybe it helps because it makes it easier to scale JanusGraph independently of your app?
I personally prefer dedicated JanusGraph Server instances because of the scaling issue and because it also makes it easier to monitor JanusGraph, like its resource usage
11 replies
JJanusGraph
•Created by b4lls4ck on 7/18/2024 in #questions
Is there a suitable JanusGraph visualizer where you can see your created graphs?
Some visualization tools for JanusGraph are also listed directly on the homepage: https://janusgraph.org/
Some of these are stand-alone software applications like gdotv, but some are also just a Javascript library that you can use to build your own visualization
8 replies
ATApache TinkerPop
•Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
What's the output of
docker logs [container-id-of-the-janusgraph-container]
?42 replies
ATApache TinkerPop
•Created by b4lls4ck on 7/9/2024 in #questions
I am unsure on how to use Python to add graphs to JanusGraph
The traversal source [g] for alias [g] is not configured on the serverThis means that an error occurred while starting the server. You need to inspect the server logs to investigate deeper While it's in general possible to run JanusGraph on Windows, it's not really officially supported and also not tested during the development process. So, I'd suggest against doing that and instead to use the Docker container
42 replies
JJanusGraph
•Created by paull8147 on 6/25/2024 in #questions
Text predicate not serializable (containsPhrase, notContainsX, etc)
For reference, this the the related issue: https://github.com/JanusGraph/janusgraph/issues/4275
5 replies
JJanusGraph
•Created by criminosis on 5/24/2024 in #questions
Comma Separated Config Options Values Via Environment Variable?
It first tries to open the graph locally in the Gremlin Console via
JanusGraphFactory.open()
with your config and only if that works, it will start JanusGraph Server with the same config33 replies