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

Plan for Java/Node SDK? #229

Open
kination opened this issue Jan 10, 2022 · 11 comments
Open

Plan for Java/Node SDK? #229

kination opened this issue Jan 10, 2022 · 11 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kination
Copy link

Hello,
Seems there are SDK for python. Don't you have plan for Java, or Node?

@ysimonson
Copy link
Member

No plans, but happy to help anyone who wants to undertake the effort. Since it's all gRPC, building bindings would be straight-forward -- potentially no code would have to actually be written.

@kination
Copy link
Author

@ysimonson yes, I've saw Python SDK, and it seems pretty simple to go on. Let me look around 🙏

@ysimonson ysimonson added good first issue Good for newcomers help wanted Extra attention is needed labels Feb 10, 2022
@ysimonson
Copy link
Member

Let me know if you have any questions!

@ysimonson ysimonson added the enhancement New feature or request label Feb 10, 2022
@kination
Copy link
Author

@ysimonson hello
I'm reviewing python-sdk to refer implementation. But it has been blocked as following

$ make init
...
fatal: clone of 'git@github.com:indradb/indradb.git' into submodule path '/Users/kination/workspace/oss/python-client/indradb_server' failed
Failed to clone 'indradb_server'. Retry scheduled
Cloning into '/Users/kination/workspace/oss/python-client/indradb_server'...
Enter passphrase for key '/Users/kination/.ssh/id_rsa': 

could you check this?

@ysimonson
Copy link
Member

It's cloning a submodule, and asking for the passphrase to the SSH key that you use for git.

@kination
Copy link
Author

@ysimonson oh, sorry. It was issue in my laptop. Thanks for quick feedback 🙏

@kination
Copy link
Author

kination commented May 27, 2023

@ysimonson hello.
Bit a long time, and started to work on node SDK.

There are some question, that when I call createVertex API, it always returns

{
      wrappers_: null,
      messageId_: undefined,
      arrayIndexOffset_: -1,
      array: [],
      pivot_: 1.7976931348623157e+308,
      convertedPrimitiveFields_: {}
}

Could you let me know whether it is correct or not?

Depend on proto file, CreateVertex should return CreateResponse

message CreateResponse {
    bool created = 1;
}

@kination
Copy link
Author

There were sometimes returning expected value, such as returning true like below

{
      wrappers_: null,
      messageId_: undefined,
      arrayIndexOffset_: -1,
      array: [ true ],
      pivot_: 1.7976931348623157e+308,
      convertedPrimitiveFields_: {}
}

but most of cases it returns empty array data.
So my question is...

  • How can I know if CreateVertex fails?
  • How should I setup id for this? When I setup value as
const vert: IVertex = {
  id: "1234567890123456",
  identifier: "test"
}

it shows => uuid conversion failed: invalid length: expected 16 bytes, found 12

  • Is this returns failure when using same id to create?

@ysimonson
Copy link
Member

That error is happening because you’re not passing a valid UUID (as a 16-byte array of bytes) for the id. I’m not sure about the rest, it looks like the gRPC implementation you’re using is doing something weird, giving back some low level details rather than the properly deserialized response.

@kination
Copy link
Author

kination commented May 29, 2023

@ysimonson
Thanks for feedback. But when I send proper 16-byte uuid, in most of cases it returns the following format (empty array)
#229 (comment)
As I think it should return true/false inside 'array'.

@kination
Copy link
Author

Not quite sure, but seems returning empty array is just happening that node indicates array with false as empty one.
So I think this issue is okay.

But for the future, it will be good if returning data includes detail log 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants