selmeci / dgraph-tonic

Async/Sync gRPC client for Dgraph DB
MIT License
83 stars 8 forks source link

Exposing some Interface Types #5

Closed lhr0909 closed 4 years ago

lhr0909 commented 4 years ago

Hey @selmeci, thank you so much for putting together this lib! We ran into some performance issues with the dgraph-js client processing large transactions and queries, so I was hoping I could build a full native client binding for nodejs using Rust, and Just as I got the tonic API client generated I came across your lib on crates.io ! This is so well put together and it will help us integrate into NodeJS much quicker.

However, I am running into some issues trying to write the type definition for the txn's generated from the client so I can use neon-binding to put the client into the NodeJS background thread. So I am curious how should I go about getting the type definition for the Txn 's in the system? Is the public API enough to do so? I am very new to Rust so that's why I want to hopefully get some answers from you. I am happy to send you a PR if there is anything that needs to be exposed from the current contract.

selmeci commented 4 years ago

Hey @lhr0909, I'll see how I can help.

selmeci commented 4 years ago

We can do this with generic parameters.

lhr0909 commented 4 years ago

Thank you @selmeci for pointing out. I am just chugging along and learning in the process. It has been fun and really love the language.