public / sonora

A gRPC-Web implementation for Python
Apache License 2.0
243 stars 13 forks source link

Regular gRPC support #22

Open public opened 4 years ago

public commented 4 years ago

Currently everything is built assuming gRPC-Web but it doesn't seem like it would be much work to also support normal gRPC with H2 only connections although it would depend on there being a WSGI or ASGI server that could actually speak that.

akshayjshah commented 2 years ago

As I understand it, the main problem is that the HTTP/2 gRPC protocol requires sending errors as HTTP trailers. Trailers aren't specific to HTTP/2, but as far as I know they're not exposed by the WSGI standard. (I don't know about ASGI.)

Is there typically an implementation-specific way to access HTTP features that aren't part of the standard?

public commented 2 years ago

Re WSGI https://github.com/python-web-sig/wsgi-ng/issues/9 it's not clear if any implementations support it even via an environ extension.

Re ASGI https://github.com/django/asgiref/issues/141 I think there is some interest in providing this capability but seems like no implementations support it yet either.

jluebbe commented 2 months ago

Re ASGI django/asgiref#141 I think there is some interest in providing this capability but seems like no implementations support it yet either.

HTTP Trailers was added to the ASGI spec: https://github.com/django/asgiref/pull/339