arcadeanalytics icon indicating copy to clipboard operation
arcadeanalytics copied to clipboard

Graph widget not working

Open slygren opened this issue 6 years ago • 8 comments

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?

slygren avatar Nov 28 '19 14:11 slygren

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

arcade-player avatar Dec 08 '19 13:12 arcade-player

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 avatar Mar 23 '20 08:03 terence-bigtt

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 ?

terence-bigtt avatar Mar 25 '20 08:03 terence-bigtt

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?

arcade-player avatar Mar 30 '20 08:03 arcade-player

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 avatar Mar 31 '20 20:03 terence-bigtt

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

terence-bigtt avatar Mar 31 '20 20:03 terence-bigtt

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

arcade-player avatar Apr 01 '20 06:04 arcade-player

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..

terence-bigtt avatar Apr 01 '20 19:04 terence-bigtt