--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d1a0feb8-db01-44dc-b11d-258aa4973ee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On May 12, 2015 1:35 AM, <lwmo...@gmail.com> wrote:
> Can the GRPC service process HTTP1.1 request naturally?
This is possible but not supported by any of the implementations currently.
> eg. a request from browser. If not, what can I do to support it?
This is not generally possible since gRPC requires trailer support and browser APIs don't support trailers. Some new APIs are being added to browsers that may support trailers, so it may be possible in the future to use gRPC natively on the browser.
grpc-gateway is a possible solution though.
The gateway can be used in front of any server. You don't need to write your server in go. Think of it as a reverse proxy process between your webserver backend and front-end.
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/9da4f9ad-bf3b-4e31-a795-8d32e7956b2a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6b9f00fd-f5d3-4c52-9602-9a919aa2d2de%40googlegroups.com.
On May 12, 2015 1:35 AM, <lwmo...@gmail.com> wrote:
> Can the GRPC service process HTTP1.1 request naturally?This is possible but not supported by any of the implementations currently.
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/f19bcbdc-9fab-4723-bf30-28562ab806a6%40googlegroups.com.
Actually, we want to use gRPC on the same port along with the HTTP 1.1 REST API.
Then user can upgrade to use gRPC seamlessly.A proxy is not the ideal solution in this case.
Qi has a rough proposal here: https://github.com/grpc/grpc-go/issues/75#issuecomment-95376238This seems to be a wide solution than a Go specific thing.
I don't think it's needed to implement HTTP/1.1. Just plain HTTP/2. Afaik there's a required header (Content-Type if I remember correctly) for gRPC calls. Can the server have a default handler for HTTP/2 streams that do not provide that required header?
On Sun, May 17, 2015 at 11:40 AM, <xian...@coreos.com> wrote:Actually, we want to use gRPC on the same port along with the HTTP 1.1 REST API.Most of the HTTP/2 gRPC spec would apply to HTTP/1.1. Primarily the RST_STREAM doesn't exist in HTTP/1, so it would become a connection close instead.Then user can upgrade to use gRPC seamlessly.A proxy is not the ideal solution in this case.A reverse proxy can still work well here, but is not "ideal." Not "bad," but not "ideal."Qi has a rough proposal here: https://github.com/grpc/grpc-go/issues/75#issuecomment-95376238This seems to be a wide solution than a Go specific thing.Sorta, but not really. I think it is mainly implementation-specific HTTP handling issues; not wire-protocol issues. gRPC is not a fundamentally special HTTP client or server. This is why a reverse proxy would have no trouble having mixed gRPC and "normal" HTTP traffic, independent of HTTP/1.1 or HTTP/2.The problem is that gRPC is an advanced HTTP user and goes through a lot of effort to be efficient. Lots of HTTP API don't support trailers, efficient flow control (no thread blocking), cheap streams (no thread-per-stream model), and full duplex (send and receive at same time), which are all HTTP/1.1 things to some degree.In Java, I'm expecting us to eventually be able to run as just a Netty handler and do path-based dispatching, similar to ServeMux in Go. I'm heavily redesigning the Netty HTTP/2 API to do that though, and we don't yet know the performance cost.
Qi has a rough proposal here: https://github.com/grpc/grpc-go/issues/75#issuecomment-95376238This seems to be a wide solution than a Go specific thing.Sorta, but not really. I think it is mainly implementation-specific HTTP handling issues; not wire-protocol issues. gRPC is not a fundamentally special HTTP client or server. This is why a reverse proxy would have no trouble having mixed gRPC and "normal" HTTP traffic, independent of HTTP/1.1 or HTTP/2.The problem is that gRPC is an advanced HTTP user and goes through a lot of effort to be efficient. Lots of HTTP API don't support trailers, efficient flow control (no thread blocking), cheap streams (no thread-per-stream model), and full duplex (send and receive at same time), which are all HTTP/1.1 things to some degree.In Java, I'm expecting us to eventually be able to run as just a Netty handler and do path-based dispatching, similar to ServeMux in Go. I'm heavily redesigning the Netty HTTP/2 API to do that though, and we don't yet know the performance cost.I can image there are two issues here:1. determine HTTP version2. if it is HTTP2, then we need to determine plain HTTP2 or gRPC over HTTP2.Are you suggesting to use path-based dispatching to solve 2?