-
Notifications
You must be signed in to change notification settings - Fork 7
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ngdi UDF gateway #20
Conversation
Run ngdi API gateway to handle call with HTTPIt's either a cURL call or a UDF query from ngdi-graphd.
-- Prepare the write schema
USE basketballplayer;
CREATE TAG IF NOT EXISTS pagerank(pagerank string);
:sleep 20;
-- Call with ngdi()
RETURN ngdi("pagerank", ["follow"], ["degree"], "spark", {space: "basketballplayer", max_iter: 10}, {write_mode: "insert"}) Where the parameters are:
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"write_context": {
"write_mode": "insert"
},
"read_context": {
"edge_types": ["follow"],
"read_mode": "scan",
"edge_weights": ["degree"]
},
"algo_context": {
"name": "pagerank",
"space": "basketballplayer"
}
}' \
http://jupyter:9999/api/v0/spark/pagerank
|
poc passed, now implemented in lib
549ea71
to
dbbe82d
Compare
#18
see: