Implement server side gRPC protocol#68
Merged
anuraaga merged 6 commits intoconnectrpc:mainfrom Dec 20, 2025
Merged
Conversation
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
0982e2a to
4c1733c
Compare
…nto grpc-protocol
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
9d4c999 to
7483716
Compare
stefanvanburen
approved these changes
Dec 17, 2025
Member
stefanvanburen
left a comment
There was a problem hiding this comment.
doesn't seem like a large lift in complexity to me, and supporting gRPC is huge for the initial transition from gRPC -> connect, so seems worthwhile. great stuff!
stefanvanburen
approved these changes
Dec 18, 2025
i2y
reviewed
Dec 18, 2025
src/connectrpc/_protocol_grpc.py
Outdated
| case "n": | ||
| return 1 / 1000 / 1000 | ||
| case _: | ||
| msg = "protocol error: timeout has invalid unit '{unit}'" |
Contributor
There was a problem hiding this comment.
missing f prefix
{unit} won't be interpolated and will appear literally in the error message.
Collaborator
Author
There was a problem hiding this comment.
Thanks for catching these!
i2y
reviewed
Dec 18, 2025
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#49
This implements the server side of gRPC protocol, running tests with pyvoy since it supports trailers. ASGI trailers are an extension defined in the spec and other servers may eventually support them, WSGI there's no definition but pyvoy provides an extension to provide parity between the two.
I know there was some concern about added complexity for supporting gRPC - let me know how it looks. I tried to keep things simpler by noting that gRPC protocol is almost the same as connect's streaming protocol except for error handling - so I didn't touch the unary codepath at all and left it connect-only. If it seems ok, I think it can be great to at least provide server-side support for gRPC to make migration easier than using a proxy server.