-
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
RFC: connecting the dots, wiring ngdi algo with NebulaGraph UDF #18
Comments
The minimal PoC implementation will be:
WIP on: |
let's choose the cypher way, not the ngql way.
|
I think not necessary to say networkx as compact and spark as parallel . |
Sure, this is much better, but a little hard to implement, but will eventually implement it in this way. |
make sense, then we don't have to introduce other option of compact but just another mode. |
Ok, for now, let's choose the easiest way. We can change the DSL later. It is not determined. |
I don't get. is this udf implemented in c++ or python in Nebula?
the udf seems like a c++ client of ngdi-api-server? |
Exactly, thus for the query-based reader, in spark mode, passing the query string rather than evaluating is much easier to implement in the initial fast PoC version. UDF (c++) make calls from graphd to ngdi api server(run in either spark cluster or as a single process in python) |
why not add a python udf in nebula instead? |
Because it's the merged implementation(easier) for now 😭 |
We could try adding FFI in UDF to call python code though from graphd directly, but that will benefit the non-spark version only. But there should be some dirty work on binding this from current UDF infra(basically just the existing function manager, pure c++ by nature) |
ok. the c++ client of ngdi-api-server is the easiest way so far. But, If the udf call is introduced in DSL, the syntax check is not easy. For example, is it a correct graph structure in this page_udf(graph)? who will check the correctness? graphD or spark? |
Indeed, for now, I put all validation that the UDF could do in UDF because it should fail early and explicitly hint at where it goes wrong as much as possible(we could see there are a lot of checks in the current poc UDF in that branch). From the ngdi_gateway side, there should be as much as possible early check(when needed) and exception handling to not confuse users, too. For instance, in match query read_mode, in the fast track of implementation(option 2), graphd only treats it as a string, which has to be evaluated by spark connector ngql reader, but I will do my best to make it smoother/clear/lovely to use. in production/future delivery version of the UDF for ndgi calling, it'll be quite heavy to do enough checks before calling remote ngdi. |
Native Query experience to leverage ngdi.
API
execution engine/mode
Call Syntax
Option 0:
Option 1:
Write Mode
Design
9999
(thrift) or19999
(http)ref: vesoft-inc/nebula#4804
The text was updated successfully, but these errors were encountered: