Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph widget not working #171

Open
slygren opened this issue Nov 28, 2019 · 8 comments
Open

Graph widget not working #171

slygren opened this issue Nov 28, 2019 · 8 comments
Assignees

Comments

@slygren
Copy link

slygren commented Nov 28, 2019

I'm trying to get the app-single.yml docker instance to work here - only modifications being advertising the host ip address and specifying the arcadeanalytics docker image to use (:latest, :1.0.1 and 馃憤 1.0.3 tested)

The web app seems to be working fine and I can create, access and successfully index a remote JanusGraph (tiny one with ~200K vertices and ~400K edges) over Gremlin. However - if I try to add a graph widget I'm not seeing any classes/labels for my graph listed. None of the left-side menu items seems to be working but the Query one, and making a query I can see it actioned on the JanusGraph side and in the arcadeanalytics console.

Lastly - In the dev console of Chrome I get loads of these messages "ERROR TypeError: Cannot read property 'nodesClasses' of undefined"

Any idea how to fix this?

@arcade-player
Copy link
Contributor

Do you have any log from the server side too? or, can tou provide scripts to create a sample db of your data?

@terence-bigtt
Copy link

Hello !
Same problem here.

The search typed request is

g.V().limit(5)

Nothing particular in the backend end log:

2020-03-23 08:24:03.925  INFO 7 --- [ XNIO-2 task-27] c.a.p.gremlin.GremlinDataProvider        : fetching data from '1354' with query 'g.V().limit(5)
arcadeanalytics-single_1  | ' 
arcadeanalytics-single_1  | 2020-03-23 08:24:04.285  INFO 7 --- [ XNIO-2 task-27] c.a.p.gremlin.GremlinDataProvider        : fetched 5 nodes and 0 edges 

The front end properly receives a result from the search call:

Request URL: http://localhost:8080/api/widgets/data/1452
Request Method: POST
Status Code: 200 OK

The response from this call is:

{"nodesClasses":{"Act":{"iid":"String","name":"String"},"Person":{"gender":"String","birthYear":"String"}},"edgesClasses":{},"nodes":[{"classes":"Act","group":"nodes","data":{"id":"1354_5128296","parent":"","source":"","target":"","record":{"@out":{},"@edgeCount":0,"iid":"1002578","@in":{},"name":"155735"}},"position":{},"selected":"","selectable":"","locked":"","grabbable":""},{"classes":"Act","group":"nodes","data":{"id":"1354_6119560","parent":"","source":"","target":"","record":{"@out":{},"@edgeCount":0,"iid":"1007404","@in":{},"name":"229073"}},"position":{},"selected":"","selectable":"","locked":"","grabbable":""},{"classes":"Act","group":"nodes","data":{"id":"1354_6652128","parent":"","source":"","target":"","record":{"@out":{},"@edgeCount":0,"iid":"1010940","@in":{},"name":"262500"}},"position":{},"selected":"","selectable":"","locked":"","grabbable":""},{"classes":"Person","group":"nodes","data":{"id":"1354_32288896","parent":"","source":"","target":"","record":{"@out":{},"@edgeCount":0,"gender":"M","birthYear":1982,"@in":{}}},"position":{},"selected":"","selectable":"","locked":"","grabbable":""},{"classes":"Act","group":"nodes","data":{"id":"1354_13488312","parent":"","source":"","target":"","record":{"@out":{},"@edgeCount":0,"iid":"1043282","@in":{},"name":"688133"}},"position":{},"selected":"","selectable":"","locked":"","grabbable":""}],"edges":[],"truncated":false}

This seems to be a front end issue ?
Any idea on how to fix ?
Thx

@terence-bigtt
Copy link

Hi again !
After some times it works.
It takes some time to load the nodesClasses (12 min).
Is it aa problem specific to Janusgraph ?
Maybe the call to get the graph metadata could be optimized ?

@arcade-player
Copy link
Contributor

The metadata provider for Gremlin is here:

https://github.com/ArcadeData/arcade-connectors/blob/master/gremlin/src/main/kotlin/com/arcadeanalytics/provider/gremlin/GremlinMetadataProvider.kt

We developed and tested on small databases. How big is your db?

@terence-bigtt
Copy link

Hi
Thx for the feedback.

My graph is not very big.. The order of magnitude is 100k vertices and edges.

Quickly looking at your code, it seems to me that the count methods on the node and edge counts might take longer, as it requires traversing the whole graph.
Actually counting nodes and edges in janus without relying on indexes is tricky from my (little) experience.

Could the counts be done asynchronously and update the meta when or if the result arrives?

Also I think the functions mapNodeClasses and mapEdgeClasses may take a while, again because of traversing the whole graph.

Maybe looking at the management Api might be relevant for getting the labels.

@terence-bigtt
Copy link

Here for the management Api : https://stackoverflow.com/a/49404838/7634184

@arcade-player
Copy link
Contributor

Thanks for pointing us to that. This implies to write a dedicated MetadataProvider for Janus that uses the custom api.

@terence-bigtt
Copy link

Actually this may be a generic issue related to gremlin servers, see for instance https://stackoverflow.com/a/48946734/7634184

The frustrating point is that the view won't work without the Metadata.

It would be nice if (part) of the widget could be used without completion of the Metadata call.. I'm thinking for instance to the custom query widget, that doesn't really need the Metadata to run..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants