x64-mingw32, x86_64-linux, universal-darwin, x86-mingw32), or would it be a fat jar that include multiple JNI wrappers?It has probably been a decade since I had a reason to try to use JNI. Does anyone have any experience building Gems using that approach? Would it be the case that there would be one JAR per supported platform (x64-mingw32,x86_64-linux,universal-darwin,x86-mingw32), or would it be a fat jar that include multiple JNI wrappers?I am not clear on what capabilities of the existing gem are needed to satisfy the dependency of the Google Cloud gem (which is my personal motivation to see this move forward). Maybe Mike Moore knows better if the client side would be enough?
1) Please add details on implementation ownership, so that it can be discussed. Its unclear if this is something that the proposer is signing up to implement, is that the plan?
2) Could you please update the proposal to cover the implementation approach in more detail based on some of these points. Ie: Location of the prototype repo, some discussion on the API surfaces that need to be conformed to and potential areas you have identified as problematic. This can go hand in hand with a prototype of the java wrapped approach so that we can tackle issues as they happen.
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/042830fb-0dd9-4ddb-b982-28a24ca23720%40googlegroups.com.
Hi Jason,
Thanks for working on this! Apologies for the delay in getting back to you. We took a closer look at the prototype and at the moment it looks like most of the work has been around the jbuilder integration and stubbing out of C core implementation to get most of the tests passing (do let me know if I missed something!). The bulk of work will be in mapping the ruby api on top of the java api. We can help consult on areas that are not straightforward once you do this.
General recommendations on the approach:
Use Java's advanced API instead of the stub API. That means things in io.grpc instead of io.grpc.stub. Specifically, ManagedChannel and ClientCall. You can refer to io.grpc.stub.ClientCalls and the generated code for inspiration/hints. Getting a working MethodDescriptor may be a bit annoying, but after that point most things hopefully start coming together since you could do Channel.newCall() which is very fundamental.
As far as the shims go, it may be doable but some items may be infeasible. At that point, it would be good to discuss the specific points on this thread and we can definitely help figure out. Some areas such as Call/Channel credentials APIs might be candidates for that. There are a number of APIs for ruby channel objects that are specific to the C-core (see options passable to channel constructors in https://github.com/grpc/grpc/blob/c4f46018096a85f239ace283563ad5c192a6c433/include/grpc/impl/codegen/grpc_types.h#L152), along with call credentials, channel credentials, etc. Possibly not everything needs to be emulated, but a minimum of this surface would need to be designed for us to review by the proposer of the gRFC (you) and later implemented.
As a lower priority, consider decoupling this implementation from grpc/grpc, it would be nice to land this in grpc-ecosystem eventually.
Thanks