USB as a transport channel for gRPC

47 views
Skip to first unread message

Frédéric Martinsons

unread,
Feb 25, 2021, 11:35:06 AMFeb 25
to grpc.io
Hello guys, like I said in a previous message (https://groups.google.com/g/grpc-io/c/rCOTPM65A7U) , back in the day, in my company there was a use cases to having gRPC work through usb. We made patches for that and we would like to submit it to the project.

Two questions though:
  - Is is wanted and will it be acceptable for the project (does it worth the shot to rebase and clean ourpatches) ?
  - If yes, then our patches introduced a libusb dependency (https://libusb.info/) and I'm wondering what is the best way to introduce that ? In a new third party submodule ? Is there documentation about integrating a new submodule because I read https://github.com/grpc/grpc/blob/master/third_party/README.md and there is not much details except that it trigs a lot of work and maintenance.

Thanks in advance for all the insights.

Nicolas Noble

unread,
Feb 25, 2021, 10:12:32 PMFeb 25
to Frédéric Martinsons, grpc.io
Hi,

  While the idea is interesting and has merit, adding a libusb dependency into a network-oriented library seems counter productive and would likely complexify our build, test, distribution, and maintenance burden. This seems like an endeavor that'd be much more appropriate as a specific fork; call it grpc-usb if you want, and it'd ONLY have USB as a transport mechanism. We wouldn't mind hosting it in our grpc-ecosystem organization for instance.

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/a0f856e9-dc0d-4f5f-82f1-ee2efef6ecd3n%40googlegroups.com.

Frédéric Martinsons

unread,
Feb 26, 2021, 1:13:01 AMFeb 26
to grpc.io
Ok I understand the point but I missed some details:
   - I can fork grpc to my github account but how to give it to the grpc-ecosystem ?
   - For adding libusb dependency, am I obliged to go through third_party git submodule and compile libusb from sources ? Or can I only relies on system package (if so , where do I put it, directly in CMakeLists.txt) ?
   - I have only a test setup running on unix , will it be acceptable for this fork to be only unix compatible ? Or do I need to support windows, apple ... ?

Thanks again for your quick answer by the way. Have a nice day !

Nicolas Noble

unread,
Feb 26, 2021, 12:24:20 PMFeb 26
to Frédéric Martinsons, grpc.io
I would direct you to https://github.com/grpc/grpc-community/blob/master/grpc_ecosystem.md for details on how to proceed, but, in short:

- transfer of ownership is a very straightforward process using github: https://docs.github.com/en/github/administering-a-repository/transferring-a-repository
- being in the ecosystem organization means way less stringent rules; you get to decide what's best for building and distributing your version. If you wish to restrict it to Linux, and remove all of the wrapped languages but C/C++, go for it.

Frédéric Martinsons

unread,
Feb 26, 2021, 1:00:34 PMFeb 26
to Nicolas Noble, grpc.io
Thanks Nicolas, I will read the doc you pointed and make the fork in the coming days (weeks maybe :p). 

One last question that come to my mind. Like I said in the above mentioned thread, the person who develop the patch is gone and I'm taking responsability for the code. 
I can make it compile on Linux, test it for our use cases (Android device in accessory mode) but I don't know if the patches will be correct towards coding rules or grpc philosophy.
And, if I understood correctly, doing the fork means that no peer review will be done to comment and accept the patches but I'm willing to have advices about how to do better integration inside gRPC world. 
Si here is my question (finally) : do you think it is possible to have review from gRPC devs people? 




Reply all
Reply to author
Forward
0 new messages