Pretty cool! Honestly, I've found the challenges related to standing up Python-based gRPC services to be super complicated and not worth the hit. I'm not sure this solves that in particular, because most of the pain is around things like TLS, HTTP2, proxy and loadbalancer configuration, and other things I'd love to not have to spend hours worrying about just to massage the bytes right.
This is a long-winded way of saying that I used to really love protocol buffers and gRPC but at this point am a little soured on them in practice.
gRPC-Web is actually exactly what you want if you want gRPC but none of the TLS, HTTP2 etc pain. It "just works" on HTTP/1.1 like any other server.
The Google libraries are definitely a pain to use in Python and even if you've got all the HTTP2 stuff sorted already it doesn't play that nicely with existing code bases.
Hey, I haven't tried using gRPC with Python yet but I had been considering it recently and now I'm worried. Could you give me an example of what sort of trouble I should expect? What sort of trouble is it going to give my existing code base?
The first issue I've seen people struggle with are to do with generating the Python bindings in the right modules. Getting the right combination of arguments to protoc isn't always obvious.
The main complexity with an existing code base is that gRPC runs its own ioloop so it controls the server entirely so you can't glue it into an existing Python webapp easily. You can call all your existing Python functions etc just fine though.
Nifty. I assume this still means using some combination of Envoy + Nginx to "downgrade" to 1.1 in a traditional web service environment if the client defaults to HTTP/2. Is that right?
I don't think there is actually a good solution for connecting a regular H2 gRPC client to a gRPC-Web server currently. Envoy's gRPC-Web filter only seems to go the other way. I haven't tested it but the old HTTP/1.1 reverse bridge might work. [0]
I'm currently working on a python-based gRPC project. I use envoy to handle all the stuff you mentioned. I do like gRPC compared to REST, although I wish there were more native data types for gRPC, e.g. UUID and Decimal/Numeric - I create types for these ala google's string marshalling for decimals, but it means therefore I must do my own data validation.
This is a long-winded way of saying that I used to really love protocol buffers and gRPC but at this point am a little soured on them in practice.