Date 1 - 1 of 1
[DISCUSS] Finalizing the look and feel of Schema Management APIs from JanusGraph clients(Py/.NET/JS)
Debasish Kanhar <d.k...@...>
Per my understanding, TinkerPop expects all GLVs across all variants to be aligned as much as possible. But since the same holds true for TinkerPop, doesn't mean it has to hold true for JanusGraph clients too. We can try to align as much as possible, but having a 100% match is always going to be difficult.
This post is to try to reach a common point regarding the same, so that we can have a standard framework when Florian adds the same feature to his .NET lib or else if someone like Chris adds it to JS lib.
Before we start discussion how the current APIs are build, and if modifications are needed, let me give everyone a background.
Based on DISCUSS THREAD it looks more or less like we are going to start with Client version as 0.1.0
PR#4 is in final stages of review for Python clients.
PR#1 addresses addition of .Net drivers.
Once those are released, the above mentioned PRs, the following generic features will still be missing:
This post is regarding how we should develop our APIs for Schema management.I've a branch under my personal repository where I've developed those APIs for Schema management. You can also follow issues on that repo if needed. The APIs are developed, and arent unittested yet, so unit testing will follow once we have finalized the API structure.
As part of next major release, the following APIs have been developed:
Connect to JanusGraph running & creating management and traversal objects on it like in Java.
graph = JanusGraph().connect(url="18.104.22.168", port="8182", bindings="g", graph="graph")
Add Property Keys:
nameBuilder = management.propertyKeyBuilder()
Build Composite Index:
nameIndexBuilder = management.buildCompositeIndex("name", "Vertex")
Build Mixed Index:
ageBuilder = management.propertyKeyBuilder()
Build Edge Label:
battled = management.edgeLabelBuilder().makeEdgeLabel("battled").signature("time").make()
Build Vertex centric index (Expects that the property key time is already added using PropertyKeyBuilder API and EdgeLabel is created using EdgeLabel APIs)
battledIdxBuilder = management.buildVertexCentricIndex("battlesByTime")
Build Vertex Label:
demigod = management.vertexLabelBuilder().makeVertexLabel("demigod").make()
Similarly, we also have end point APIs for awaitGraphIndex, reIndex, getOpenInstances and forceCloseInstance and commit.
Let me know your comments for the same.
|1 - 1 of 1|