elixir-grpc / grpc

An Elixir implementation of gRPC
https://hex.pm/packages/grpc
Apache License 2.0
1.36k stars 210 forks source link

Add the ability to use a different webserver #328

Closed conradwt closed 11 months ago

conradwt commented 11 months ago

Is your feature request related to a problem? Please describe. At this time, there're unintended dependencies when adding grpc to your mix.exs file. For example, the code uses Cowboy and Cowlib but I'm looking to use Bandit.

Describe the solution you'd like I thought one could use Elixir behaviors to make swapping in a different web server.

Describe alternatives you've considered The alternative approach would be to fork, modify, and test with a different web server.

Additional context Add any other context or screenshots about the feature request here.

polvalente commented 11 months ago

You can already implement a custom adapter for https://github.com/elixir-grpc/grpc/blob/master/lib/grpc/server/adapter.ex and configure it as the implementation to be used.

polvalente commented 11 months ago

I'm closing this for now because there are no plans to add a secondary implementation to the repo itself, but users can already implement and use their own.

PRs are welcome, though.

conradwt commented 11 months ago

@polvalente Great, this is just what I was looking for. Do you have docs that go a bit more into detail here? Thanks again for the information.

polvalente commented 11 months ago

Great! If you feel the documentation on how to do the implementation can be improved, please either send a PR so we can iterate on it or open another issue :)

conradwt commented 11 months ago

@polvalente I'm trying to learn from the documentation on the best way to complete an adapter. However, I'm not seeing much detail at the following link:

https://hexdocs.pm/grpc/GRPC.Server.Adapter.html

I'll just file another issue.