-
Notifications
You must be signed in to change notification settings - Fork 88
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
gRPC? #17
Comments
From what I understand from the code the HTTP2 support is very much linked to the Plug, but a good part of the code could be reused to implement any kind of protocol Handler, the main parts that I saw that should be changed would be here and in the Adapter code, and probably some minor changes in some other places that should be specific to the desired protocol (in this case gRPC). Am I right in my analysis? I intend to implement gRPC in this project https://github.com/eigr/falco that today uses Cowboy in its implementation. See issue here |
To the extent that gRPC could be landed via the Plug interface, bandit is agnostic to whatever you're running. However, I don't think that gRPC is really supportable via the Plug API, so that's a bit of a glib answer. The intent of Bandit is very narrowly premised on Plug (and eventually WebSocket) support, so if it's not possible to do via Plug I'm not really open to entertaining additions beyond that within the library. That being said, if Plug evolves to make things like gRPC support possible, Bandit will obviously follow. I would suggest:
What do you think? |
Hi @mtrudel thanks for answer! The problem with the plug's API is that it is made to handle request reply and gRPC has many modes besides request reply, namely stream in, stream out, bidirectional stream, and unary (request reply). And I think you would run into the same Plug API for Websockets problem that you have today. So I think the ideal abstraction for Bandit HTTP2 implementation is to prepare it for streaming communication in any direction. In fact the Plug is quite limited in what it can do. |
Sounds great! You can absolutely use whatever code is in this repo by the terms of license (MIT in this case). No need for my permission (though I'm happy to see you making us of this!) While I'm pretty intent on keeping Bandit laser focused on Plug as an upstream API, it may be worthwhile to try and accommodate other APIs in a streamlined way. If you end up coming up with a useful abstraction that captures that, by all means let's try and find a way to make things work here without a hard fork. I'm going to go ahead and close this issue for purposes of cleanliness; if you feel there is future work to discuss, feel free to reopen the issue or create a new one. Thanks for the issue! |
Hi, this is an excellent project as well as ThousandIsland, thanks for investing time in this.
I would like to know your opinion on how complex it would be to implement the gRPC protocol on top of this library. Do you think this would be viable? Do you have plans for this? What hooks would you need to implement to achieve this?
The text was updated successfully, but these errors were encountered: