Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Wolfgang Fahl
@WolfgangFahl
One issue is how to design the access to the credential and database implementation details in a manner that is is user influencable. How does FERMA solve this issue?
Jeffrey Phillips Freeman
@freemo
@allfactsaside_twitter and @WolfgangFahl hi, sorry i was offline for a bit there as i was traveling around. But im back
Brian
@briandilley
Hi guys - is this room active?
I’m looking for some help on a tinkerpop query. I’ve got a graph with edges that contain a “strength” property. I want to find the shortest path between two vertices and because there can be multiple paths that are equally short I want the one with the greatest sum(strength).
Jeffrey Phillips Freeman
@freemo
@briandilley I was in the hospital for a bit, sorry things got inactive. Now that I recovered from my surgery im back and active again
Jeffrey Phillips Freeman
@freemo
@/all A new version of Ferma was just released to Maven Central, version 3.3.1 -> https://git.qoto.org/Ferma/Ferma/-/tags/v3.3.1
Zijad Redzic
@theZiki
Hi how can I save Date type in JanusGraph with Ferma?
Jeffrey Phillips Freeman
@freemo
@theZiki I'm not sure I understand the question. Are you refering to in the sense of a Schema definition?
@theZiki Also sorry for the delay in responding.
Jeffrey Phillips Freeman
@freemo
@/all Version 3.3.2 has just been released to central.
Zijad Redzic
@theZiki
@freemo Yes, I want to save date as Date object. Currently, I convert it to unix epoch (Long). This isn't big issue, but nice to have.
@freemo Another question, is there any way that Ferma generates vertex labels instead of only fermy_type property?
Jeffrey Phillips Freeman
@freemo
@theZiki sorry just getting situated (just flew in).. let me get back to you tomorrow im kinda sleep deprived and just saw this
Zijad Redzic
@theZiki
@freemo do you have time now?
Jeffrey Phillips Freeman
@freemo
@theZiki a bit yes
@theZiki I dont think it current supports vertex labels, im trying to remember if it was a feature of tinkerpop or if it is a database specific feature... I seem to recall that certain databases dont have vertex labels.
Zijad Redzic
@theZiki
@freemo this is feature of tinkerpop, gremlin support's it. So it should be suported.
Jeffrey Phillips Freeman
@freemo
@theZiki agreed it should, I dont think it is. But might be easy to add that feature in.
@theZiki I havent had to add any new features in a while, mostly just keeping dependencies up to date and modernizing code when appropriate.. So could be that labels didnt exist when Ferma was written, But thats no reason I cant add it.
@theZiki id have to think about how to do that though, as users may want to use a label for something else.
Zijad Redzic
@theZiki
@freemo what about index and schema management? could it be auto from annotations?
Jeffrey Phillips Freeman
@freemo
@theZiki just depends if there are mechanisms in TP3 yet to do that, if there are then in theory yes, would need to be a feature to add though. Patches and PR are welcome if its a fearture you'd like to add.
Zijad Redzic
@theZiki
@freemo tommorow we are going to production with our app. We are using JanusGraph on FoudnationDB, and Ferma as ORM. But it's pretty slow. We have been added some indexes but still it's slow. What can we do to make it faster?
Jeffrey Phillips Freeman
@freemo
@theZiki I suspect that the speed is not related to Ferma itself. One thing I did was a lot of speed optimizations. Ferma rewrites its own byte code as a means of speeding things up. I'd be very surprised if you find any significant slowdown coming from the Ferma layer.
Toto
@totolook

Hi guys, I would like to know about the nextOrAdd () function, when it does not find the vertex, it creates it with the label 'vertex' instead a custom one of mine.
For example:

 Document doc = fg.traverse(g -> g.V().hasLabel("Document").has("idDocument", id)
                .has("code", code)).nextOrAdd(Document.class);

I create the vertex with custom label in this way:

fg.addFramedVertex(Document.class, T.label, "Document");

Is there any way to change the vertex with the new updated label?

Zijad Redzic
@theZiki
@freemo do you have examples with group() by() operators? I have this code:
HashMap<T, List<ENTITY>> res = (HashMap<T, List<ENTITY>>) getTx().getGraph().traverse(input -> {
            final GraphTraversal<Vertex, Vertex> traversal = getTx().getGraph().getTypeResolver()
                    .hasType(input.V(), type);
            traversal.group().by(groupBy);
            return traversal;
        }).getRawTraversal().next();
the output is map with list on "ENTITIES" but they are just CacheVertex objects and when casting to FramedVertex there are problems, is there any way to get grouped results and that they are framed vertex already, just like with toList(Some.class) ?
Paul Schwarz
@paulschwarz
morning. i notice in com.syncleus.ferma.framefactories.DefaultFrameFactory, it calls kind.newInstance() which is deprecated since java 9. also, the message "Could not instantiate kind: " + kind.getName() wasn't that helpful in establishing that the framework is looking for a default no-args constructor.
Timon Schneider
@Timonsc
Hi all. Is it possible to get a FramedGraph from a JanusGraph instance?
Jeffrey Phillips Freeman
@freemo
@Timonsc yup pretty sure there is an example of that in there somewhere I'd have to dig it up
Timon Schneider
@Timonsc
Great, thanks. No need, I'll find my way
Timon Schneider
@Timonsc
Is it now possible to use gremlin gremlin labels, as mentioned by @theZiki , as well? Or has it not yet been added?
Jeffrey Phillips Freeman
@freemo
hmmm let me see... reading that now
@Timonsc you mean the labels mentioned by toto? ziki seems to mention group and by not labels
@Timonsc but yea uif you mean the hasLabel() and has() methods as Toto mentioned yes those work just fine last i checked
Timon Schneider
@Timonsc
And Person jeff = fg.addFramedVertex(Programmer.class); jeff.setName("Jeff"); is stored as a vertex with label 'Programmer'?
Jeffrey Phillips Freeman
@freemo
@Timonsc in that example jeff has a attribute named "Name".. see the Jeff class
Timon Schneider
@Timonsc
Hi, I'm having some issues building the mkdocs. I get an error jinja2.exceptions.TemplateNotFound: .icons/.svg
Timon Schneider
@Timonsc
I just pulled the newest Ferma repo.
Python version is 3.8.6
mkdocs 1.1.2
mkdocs-material 6.2.4
mkdocs-material-extensions 1.0.1
Jeffrey Phillips Freeman
@freemo
@Timonsc thanks I will review it and see if i can fix that
Timon Schneider
@Timonsc
Does Ferma have functionality for using gremlin meta-properties?
Jeffrey Phillips Freeman
@freemo
@Timonsc im so so sorry about the late response.. i apparently had notifications for this room turned off accidentally (im the main dev).. still need help?
Shaunak Shah
@sshaunak9
Hi. regarding connecting to a remote server (AWS Neptune) is there a way to do that with ferma DelegatingFramedGraph ?
I see it needs a graph object. so can you use a graph object from a remote graph traversal source like below ?
Cluster cluster = Cluster.build()
                .addContactPoint({neptune endpoint})
                .port({neptune port})
                .create();
GraphTraversalSource gts = AnonymousTraversalSource
                .traversal()
                .withRemote(DriverRemoteConnection.using(cluster));
private FramedGraph fg = new DelegatingFramedGraph(gts.getGraph(), true, false);
and then use fg for queries like:
fg.traverse(g -> g.V().has(label, propertyName, propertyValue)).next(VertexFrame.class);
Jeffrey Phillips Freeman
@freemo
@sshaunak9 seems valid to me, does it not work?
Shaunak Shah
@sshaunak9
doesn't seem to work with remote Neptune server. I was exploring other ogm libraries and they don't seem to work with remote graphs as well. So was just curious if that was the case with ferma as well ?
Jeffrey Phillips Freeman
@freemo
@sshaunak9 the DB would need to support a remote graph object as everything ultimately wraps that.