grpc-dart
grpc-dart copied to clipboard
Support for http based grpc-web for mobile
https://github.com/grpc/grpc-dart/pull/287 https://github.com/grpc/grpc-dart/pull/351 This will be a re-attempting of the above.
Thanks for your review.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: otakuto (02bcae24b54c1bd478e58d378c4df42fd72073ca)
@sigurdm @mraleph - who would be best to review this?
@otakuto thanks for taking your time to contribute. Could you try to fix EasyCLA check? We can't look at the code before it is fixed.
@otakuto Could you outline a specific use case which makes you interested in using gRPC-Web from a mobile application? Any specific reason that prevents you from using the native gRPC protocol instead?
/cc @wenbozhu
@otakuto thanks for taking your time to contribute. Could you try to fix EasyCLA check? We can't look at the code before it is fixed.
I fixed it.
@otakuto Could you outline a specific use case which makes you interested in using gRPC-Web from a mobile application? Any specific reason that prevents you from using the native gRPC protocol instead?
/cc @wenbozhu
In this example, there is a reason why it is difficult for a microcontroller to support HTTP2 when communicating with a microcontroller such as ESP32 and mobile. Another advantage is that it is possible to implement a pure dart client for mobile and web respectively.
@otakuto
In this example, there is a reason why it is difficult for a microcontroller to support HTTP2 when communicating with a microcontroller such as ESP32 and mobile.
Makes sense. HTTP2 stack might be quite large so it does not necessarily fit on a microcontroller.
Another advantage is that it is possible to implement a pure dart client for mobile and web respectively.
Could you elaborate what you mean by this?
One of the problems with merging this (and officially supporting gRPC-Web protocol on native targets) is that it would block us from migrating our gRPC-Web implementation to use official JavaScript implementation underneath, which is something that we have been considering to reduce our maintenance burden.
Hello !
I want to share another use case for this feature.
As written in #216, another use case is to be able to use the gRPC-Web protocol to bypass the limitations of some cloud platforms, such as DigitalOcean's App Platform service which does not allow to expose a gRPC service.
For us, merging this PR would be extremely valuable.
I'd like to add another vote in support of this PR. AWS lambda doesn't support HTTP2, and while I'm not familiar with other FaaS environments I expect lambda isn't the only one with this constraint. I appreciate the need to control your maintenance surface area but I think it would be a shame to commit to never supporting grpc-web on native targets.
For what it's worth I've locally rebased this PR on 3.1.0 and tested it for my use case, LGTM.
Hello !
We have tested these changes on our API and everything seems OK on our side too.
Maybe another solution would be to export what is needed to be able to offer this functionality in another package?
Any updates on this?