forked from DalavanCloud/grpc-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from a-elhusseine/master
El Peso G / grpc-web
- Loading branch information
Showing
5 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Overview | ||
|
||
In-process proxies allow a browser client to talk to the gRPC server directly without deploying any intermediary process | ||
such as an Envoy proxy. This document provides a high-level design guidelines on how we expect such a "proxy" to work. | ||
|
||
# The choice of HTTP stack | ||
|
||
We strongly recommend the gRPC-Web module use the default HTTP stack provided by the language platform, or in the case of Java, | ||
the standard Java Servlet stack. This is to ensure maximum portability and to ease integration between gRPC-Web and existing Web | ||
frameworks. | ||
|
||
The actual HTTP version that the HTTP stack supports may include both HTTP/1.1 and HTTP/2. In the runtime, it's up to the user-agent and | ||
intermediaries to negotiate the HTTP version, which is mostly transparent to the gRPC-Web module. | ||
|
||
# Proxy or not | ||
|
||
For most languages, the gRPC-Web module will handle the gRPC-Web request, do the translation, and then proxy the request using a gPRP client | ||
to the gRPC server via a local socket. The gRPC-Web support is totally transparent to the gRPC server. | ||
|
||
For some languages, such as Swift, if the gRPC server implementation uses the same HTTP stack as gRPC-Web, then gRPC-Web may be supported | ||
directly as part of the gRPC server implementation. The added complexity to the gRPC iteslf is still a concern. | ||
|
||
# HTTP port | ||
|
||
We expect that gRPC-Web requests are handled on a separate port. If the HTTP stack supports both HTTP/2 and HTTP/1.1, port sharing could be supported. | ||
However, since CORS is a mandatory feature for gRPC-Web proxies, porting sharing is optional for in-process proxies. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters