You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/27 18:18:10 UTC

[GitHub] [apisix] wenerme opened a new issue, #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

wenerme opened a new issue, #7338:
URL: https://github.com/apache/apisix/issues/7338

   ### Description
   
   connect protocol https://connect.build/docs/protocol is HTTP POST base, apisix already support grpc-transcode, add connect support is doable.
   
   Besides on support connect protocol, support grpc-reflect is also helpful, the config should just
   
   ```yaml
   path: /{svc}/{method}
   grpc-connect:
     reflect: true # cache reflect for some time - fill supported svc ?
     services: [ hello.HelloService ] # manual specified service, use the reflect to fetch the proto
   ```
   
   then POST should works
   
   ```http
   POST /hello.HelloService/Hello
   content-type: applicatio/json
   
   { "name": "Wener" }
   ```
   
   
   If route prefix must static, I think this is fine too.
   
   ```yaml
   path: /hello.HelloService/{method}
   grpc-connect:
     reflect: true # cache reflect for some time - fill supported svc ?
   ```
   
   will reduce a lot of routes compare to grpc-transcode, and easier to maintain
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] wenerme commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
wenerme commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1169633181

   > how about the ecosystem of this protocol? 
   
   Connect protocol is quite early stage, but when I see the protocol, I finally found what I want for grpc, for me, I thinks this is grpc should be.
   
   Here is some context from my [note](https://github.com/wenerme/wener/blob/master/notes/service/api/connect.md#why-connect)
   
   **Why Connect**
   
   - gRPC 因为考虑 Google 内部使用和开源社区使用,一些设计上很乱很奇怪
   - gRPC 小版本也可能不出现兼容
   - gRPC 在 Web 环境非常麻烦
   - 要求 HTTP/2 Trailer - 对使用环境、实现要求苛刻
   - vs golang grpc
     - 不兼容 net/http
     - 实现复杂
   
   ---
   
   - source https://buf.build/blog/connect-a-better-grpc
   
   > How does it work with the gRPC stub codes (and the existing gRPC runtime lib).
   
   connect is just an alternative protocol besides the grpc binary protocol, it works with existing grpc.
   
   ----
   
   I want to use the apisix as an gateway for such service, but seems impossible, because
   
   1. use grpc-transcode - like the POST based connect, but it's method level, means every method is a route, unable to maintain the route, also need to sync proto
   2. route every service like /hello.HelloService/* to each upstream, doable, but it's harder than just write a go gateway
     - connect currently only have go runtime - other server need transcode, write a gateway is easy, because client and server has same interface
     - and we need the authz-keycloak, but in SaaS case , the issuer is dynamic, which means there are more than one discovery endpoint, a custom gateway can do this.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] wenerme commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
wenerme commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1168497155

   > what's the benefit of the Connect protocol, compared with the grpc-gateway?
   
   - use grpc-gateway need to predefined every url you want to use. 
   - Connect is a superset of grpc, support grpc , but also support POST json, no predefined url required.
   
   > in this way we can't configure plugins for the method. Maybe it is acceptable in some situations?
   
   It's service level proxy, same as grpc
   
   ```
   /{serviceName}/{methodName}
   ```
   
   > are you willing to work on this feature?
   
   New to apisix, read some source code, but I think I can't do this work.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1168664499

   I will leave this issue open and wait if someone is interested in it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1168432060

   I want to ask three questions:
   1. what's the benefit of the Connect protocol, compared with the grpc-gateway?
   2. in this way we can't configure plugins for the method. Maybe it is acceptable in some situations?
   3. are you willing to work on this feature?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1612764653

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] closed issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier
URL: https://github.com/apache/apisix/issues/7338


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1592749479

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1170645618

   > connect protocol lower the bar to use the grpc service by allowed `curl --json '{"name":""}' 127.0.0.1:8080/hello.HelloService`, so web can call the grpc service without grpc-web or grpc-gateway.
   
   Got it. Let's if there are some people interested in it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] wenerme commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
wenerme commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1169891595

   connect protocol lower the bar to use the grpc service by allowed `curl --json '{"name":""}' 127.0.0.1:8080/hello.HelloService`, so web can call the grpc service without grpc-web or grpc-gateway.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1169730875

   > connect is just an alternative protocol besides the grpc binary protocol, it works with existing grpc.
   
   But basically, the gRPC runtime library contains the network settings, including how to encode and decode the messages. So where is the point that the connect protocol can work?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7338: feat: As a user, I want to support connect protocol, so that grpc can be access eassier

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7338:
URL: https://github.com/apache/apisix/issues/7338#issuecomment-1169432228

   @wenerme I just look through the protocol. How about the ecosystem of this protocol? How does it work with the gRPC stub codes (and the existing gRPC runtime lib).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org