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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf message contract #63

Closed
sunkararp opened this issue Dec 20, 2021 · 8 comments
Closed

Protobuf message contract #63

sunkararp opened this issue Dec 20, 2021 · 8 comments

Comments

@sunkararp
Copy link

We wanted to use .net core 6.0 gRpc client to interact with Nebula graph.
Questions:

  • Is there a nebula graph .net client library?
  • If not, can someone point where can I find Nebula graph protobuf contract message, we wanted to use it write our own library?
@wey-gu
Copy link
Contributor

wey-gu commented Dec 22, 2021

Dear @sunkararp,

Welcome to nebula community~~

Nebula GraphD now can only speak facebook thrift rather than gRPC. There is not yet .net client out there but a team in nebula hackathon is working on this :).

Before .net client is ready, you could consider talk to nebula graph in .net with HTTP through nebula-http-gateway :).

BR//Wey

@sunkararp
Copy link
Author

sunkararp commented Dec 26, 2021

We tried nebula-http-gateway, here are the issues we found...

  • We followed These docs to use http-gateway
  • Getting this error 'connection refused for lack of session'
  • We are setting 'nsid' cookie returned through '/api-nebula/db/connect'

@wey-gu
Copy link
Contributor

wey-gu commented Dec 27, 2021

Dear @sunkararp
sorry for its confusing, the docs in readme changed in master build for an unreleased upcoming version.

Could you follow the README last tagged version(which is nsid not common-nsid)?

curl -X POST -H "Cookie: SameSite=None; nsid=6573259f9fac8f318894112f907e151a" -d '{"gql": "show spaces;"}' http://127.0.0.1:8080/api/db/exec
{
  "code": 0,
  "data": {
    "headers": [],
    "tables": [],
    "timeCost": 0
  },
  "message": ""

@sunkararp
Copy link
Author

sunkararp commented Dec 27, 2021

Thanks @wey-gu for the reply.

  • Now '/api-nebula/db/connect' is working
  • We are able to call /api-nebula/db/exec with {"gql": "show spaces;"} payload

We now wanted to call Import API (/api-nebula/task/import), to bulk ingest Vertices and Edges.
Can you let us know sample configBody JSON body schema?

@wey-gu
Copy link
Contributor

wey-gu commented Dec 27, 2021

@sunkararp

Import API is actually simply calling https://github.com/vesoft-inc/nebula-importer as a lib from http-gateway.

Please take a look into https://github.com/vesoft-inc/nebula-importer 's guide to make more sense of it: the bulk information it self is not in the body but in a file path that gateway can access.

If that is not what you want, you could also create long ngql body with exec API instead. Please note nGQL like insert support BULK, thus we should put bulk vertex insert in one line instead of multiple lines.

@wey-gu
Copy link
Contributor

wey-gu commented Dec 27, 2021

BTW, you can actually try https://github.com/shyboylpf/nebula-net , they presented in the nebula hackathon yesterday!

@sunkararp
Copy link
Author

We tried to use ttps://github.com/shyboylpf/nebula-net, stuck with getting below...

SemanticError: The maximum number of statements allowed has been exceeded

@wey-gu
Copy link
Contributor

wey-gu commented Dec 28, 2021

We tried to use ttps://github.com/shyboylpf/nebula-net, stuck with getting below...

SemanticError: The maximum number of statements allowed has been exceeded

I saw your issue nebula-contrib/nebula-net#10 , responded there.

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

No branches or pull requests

2 participants