Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception handling? #40

Open
bquorning opened this issue Feb 4, 2023 · 7 comments
Open

Exception handling? #40

bquorning opened this issue Feb 4, 2023 · 7 comments

Comments

@bquorning
Copy link

Thank you for this light-weight alternative to grpc. I hope to be able to use it in production soon.

But first I need to ask you about exception handling. I don’t see anything mentioned in the Readme, and I find no uses of rescue in the examples/ folder. But when trying this gem out, I ended up getting a lot of GrpcKit::Session::ClientSession::ConnectionClosing exceptions. I am not sure if they are caused by the client session becoming “too old”, or if the client has gotten itself into a bad state, or something else.

Any help (and/or documentation) would be appreciated.

@bquorning
Copy link
Author

cc @sorah

@sorah
Copy link
Member

sorah commented Feb 20, 2023

according to the implementation ConnectionClosing is only raised when a Client received a GOAWAY frame.

@bquorning
Copy link
Author

I wonder whether grpc_kit should open a new connection (or stream? I’m not 100% on the terminology) when a GOAWAY frame is received. Or should that be the responsibility of my own client code implementation?

@zenspider
Copy link

@sorah nudge

@sorah
Copy link
Member

sorah commented Mar 31, 2023

GrpcKit works as a building block and just receive an IO object as a a underlying connection, it is not possible to make new connection from GrpcKit directly. So the answer is yes.

@sorah
Copy link
Member

sorah commented Mar 31, 2023

Unrelated to your question itself, please note that grpc_kit's client-side implementation has a lot of issue like less-effecient IO. Personally I believe we need a huge overhaul of logics and API design, but we currently have no bandwidth to do that. Contributions are always welcomed.

(Cookpad uses server-side implementation with cookpad/griffin heavily, but for client-side we use official gRPC gem in most use cases)

@astrocket
Copy link

@sorah Do you have any hint for using cookpad/griffin & official gRPC client together?
eversince grpc_kit overides GRPC constant, they are conflicting each other.. For example, griffin server trying to call other rpc through official gRPC client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants