Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit ea75284

Browse files
authored
Merge branch 'master' into patch-1
2 parents 0c38374 + f1bd02a commit ea75284

37 files changed

+460
-40
lines changed

_includes/doc-call.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ <h2 class="doc-call-title">Want to learn more?</h2>
2929
<div class="lang-select-row">
3030
<a href="{{site.baseurl}}/docs/quickstart/php.html" class="btn btn-grpc waves-effect inverse lang-select">PHP</a>
3131
<a href="{{site.baseurl}}/docs/quickstart/dart.html" class="btn btn-grpc waves-effect inverse lang-select">Dart</a>
32+
<a href="{{site.baseurl}}/docs/quickstart/web.html" class="btn btn-grpc waves-effect inverse lang-select">Web</a>
3233

3334
</div>
3435
</div>

_includes/doc-side-quickstart-nav.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
<li class="doc-side-nav-list-item"><a href="{{ site.baseurl }}/docs/quickstart/php.html" {% if current[3] == 'php.html' %}class='current'{% endif %}>PHP</a></li>
1313
<li class="doc-side-nav-list-item"><a href="{{ site.baseurl }}/docs/quickstart/python.html" {% if current[3] == 'python.html' %}class='current'{% endif %}>Python</a></li>
1414
<li class="doc-side-nav-list-item"><a href="{{ site.baseurl }}/docs/quickstart/ruby.html" {% if current[3] == 'ruby.html' %}class='current'{% endif %}>Ruby</a></li>
15+
<li class="doc-side-nav-list-item"><a href="{{ site.baseurl }}/docs/quickstart/web.html" {% if current[3] == 'web.html' %}class='current'{% endif %}>Web</a></li>
1516
</ul>

_includes/doc-side-tutorial-nav.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ <h6 class="arrow-r">Basic</h6>
2727
<a class="submenu-link {% if current[4] == 'php.html' %}active{% endif %}" href="{{ site.baseurl }}/docs/tutorials/basic/php.html">PHP</a>
2828
<a class="submenu-link {% if current[4] == 'python.html' %}active{% endif %}" href="{{ site.baseurl }}/docs/tutorials/basic/python.html">Python</a>
2929
<a class="submenu-link {% if current[4] == 'ruby.html' %}active{% endif %}" href="{{ site.baseurl }}/docs/tutorials/basic/ruby.html">Ruby</a>
30+
<a class="submenu-link {% if current[4] == 'web.html' %}active{% endif %}" href="{{ site.baseurl }}/docs/tutorials/basic/web.html">Web</a>
3031
</div>
3132
</li>
3233
</ul>

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="col-md-5 col-sm-5 col-xs-12 footer-community">
3030
<ul class="toggle">
3131
<p class="right-link-headers">Community</p>
32-
<li><a href="https://github.com/grpc/" target="_blank"><p class="github community-links">Github</p></a></li>
32+
<li><a href="https://github.com/grpc/" target="_blank"><p class="github community-links">GitHub</p></a></li>
3333
<li><a href="https://twitter.com/grpcio" target="_blank"><p class="twitter community-links">Twitter</p></a></li>
3434
<li><a href="https://stackoverflow.com/tags/grpc/" target="_blank"><p class="stack-overflow community-links">Stack Overflow</p></a></li>
3535
<li><a href="https://www.youtube.com/channel/UCrnk1HWelWnYtF78YZX80fg" target="_blank"><p class="youtube community-links">YouTube</p></a></li>

_posts/2015-10-26-principles.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
We’re also taking a big step forward in improving the installation process. Over the past few weeks we’ve rolled out gRPC packages to <a href="https://packages.debian.org/jessie-backports/libgrpc0">Debian Stable/Backports</a>. Installation in most cases is now a two line install using the Debian package and available language specific package managers (<a href="https://search.maven.org/#artifactdetails%7Cio.grpc%7Cgrpc-core%7C0.9.0%7Cjar">maven</a>, <a href="https://pypi.python.org/pypi/grpcio">pip</a>, <a href="https://rubygems.org/gems/grpc">gem</a>, <a href="https://packagist.org/packages/grpc/grpc">composer</a>, <a href="https://pecl.php.net/package/gRPC">pecl</a>, <a href="https://www.npmjs.com/package/grpc">npm</a>, <a href="https://www.nuget.org/packages/Grpc/">nuget</a>, <a href="https://cocoapods.org/pods/gRPC">pod</a>). In addition <a href="https://hub.docker.com/r/grpc/">gRPC docker images</a> are now available on Docker Hub.
1717
</p>
1818
<p>
19-
We’ve updated the <a href="/docs/">documentation</a> on grpc.io to reflect the latest changes and released additional language-specific <a href="/docs/reference/">reference docs</a>. See what’s changed with the Beta release in the release notes on Github for <a href="https://github.com/grpc/grpc-java/releases/tag/v0.9.0">Java</a>, <a href="https://godoc.org/google.golang.org/grpc">Go</a> and <a href="https://github.com/grpc/grpc/releases/tag/release-0_11_0">all other</a> languages.
19+
We’ve updated the <a href="/docs/">documentation</a> on grpc.io to reflect the latest changes and released additional language-specific <a href="/docs/reference/">reference docs</a>. See what’s changed with the Beta release in the release notes on GitHub for <a href="https://github.com/grpc/grpc-java/releases/tag/v0.9.0">Java</a>, <a href="https://godoc.org/google.golang.org/grpc">Go</a> and <a href="https://github.com/grpc/grpc/releases/tag/release-0_11_0">all other</a> languages.
2020
</p>
2121
<p>
2222
In keeping in line with our <a href="{{ site.baseurl }}/blog/principles">principles</a> and goal to enable highly performant and scalable APIs and microservices on top of HTTP/2, in the coming months, the focus of the gRPC project will be to keep improving performance and stability and adding carefully chosen features for production use cases. Documentation will also be clarified and will continue to improve with new examples and guides.

_posts/2016-3-24-pubsub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ attribution: Originally written by Lisa Carey with help from others at Google.
1212

1313
[Alpha instructions and gRPC code](https://cloud.google.com/pubsub/grpc-overview) are now available for gRPC PubSub in Python and Java.
1414

15-
But what if you want to use this service now with gRPC in another language - C#, say, or Ruby? Once you have a Google account, with a little bit of extra work you can do that too! You can use the tools and the instructions on [our site](/docs/) to generate and use your own gRPC client code from the PubSub service's `.proto` file, available from [Github](https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto).
15+
But what if you want to use this service now with gRPC in another language - C#, say, or Ruby? Once you have a Google account, with a little bit of extra work you can do that too! You can use the tools and the instructions on [our site](/docs/) to generate and use your own gRPC client code from the PubSub service's `.proto` file, available from [GitHub](https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto).
1616

1717
[Read the full Google Cloud PubSub announcement](https://cloud.google.com/blog/big-data/2016/03/announcing-grpc-alpha-for-google-cloud-pubsub)
1818

_posts/2016-4-4-installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Python | Linux, Mac, Windows | `pip install grpcio`
2929
Ruby | Linux, Mac, Windows | `gem install grpc`
3030
PHP | Linux, Mac, Windows | `pecl install grpc-beta`
3131
Go | Linux, Mac, Windows | `go get google.golang.org/grpc`
32-
Objective-C | Mac | Runtime source fetched automatically from Github by Cocoapods
32+
Objective-C | Mac | Runtime source fetched automatically from GitHub by Cocoapods
3333
C# | Windows | Install [gRPC NuGet package](https://www.nuget.org/packages/Grpc/) from your IDE (Visual Studio, Monodevelop, Xamarin Studio)
3434
Java | Linux, Mac, Windows | Use our [Maven and Gradle plugins](https://github.com/grpc/grpc-java/blob/master/README.md) that provide gRPC with [statically linked `boringssl`](https://github.com/grpc/grpc-java/blob/master/SECURITY.md#openssl-statically-linked-netty-tcnative-boringssl-static)
3535
C++ | Linux, Mac, Windows | Currently requires [manual build and install](https://github.com/grpc/grpc/blob/{{ site.data.config.grpc_release_tag }}/src/cpp/README.md)
3636

37-
You can find out more about installation in our [Getting Started guide](/docs/#install-grpc) and Github repositories. Do send us your feedback on our [mailing list](https://groups.google.com/forum/#!forum/grpc-io) or file issues on our issue tracker if you run into any problems.
37+
You can find out more about installation in our [Getting Started guide](/docs/#install-grpc) and GitHub repositories. Do send us your feedback on our [mailing list](https://groups.google.com/forum/#!forum/grpc-io) or file issues on our issue tracker if you run into any problems.
3838

_posts/2018-08-15-grpc-with-json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,5 +226,5 @@ Almost **10x** faster than before! We can still take advantage of gRPC's effici
226226

227227
gRPC lets you use encoders other than Protobuf. It has no dependency on Protobuf and was specially made to work with a wide variety of environments. We can see that with a little extra boilerplate, we can use any encoder we want. While this post only covered JSON, gRPC is compatible with Thrift, Avro, Flatbuffers, Cap’n Proto, and even raw bytes! gRPC lets you be in control of how your data is handled. (We still recommend Protobuf though due to strong backwards compatibility, type checking, and performance it gives you.)
228228

229-
All the code is avaialable on [Github](https://github.com/carl-mastrangelo/kvstore/tree/04-gson-marshaller) if you would like to see a fully working implementation.
229+
All the code is avaialable on [GitHub](https://github.com/carl-mastrangelo/kvstore/tree/04-gson-marshaller) if you would like to see a fully working implementation.
230230

_posts/2018-09-05-grpc-channelz-how-to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ service.RegisterChannelzServiceToServer(s)
9292
```
9393

9494
A web tool called
95-
[grpc-zpages](https://github.com/grpc/grpc-experiments/tree/master/grpc-zpages)
95+
[grpc-zpages](https://github.com/grpc/grpc-experiments/tree/master/gdebug)
9696
has been developed to conveniently serve channelz data through a web page.
9797
First, configure the web app to connect to the gRPC port that's serving the
9898
channelz service (see instructions from the previous link). Then, open the

_posts/2018-10-23-grpc-web-ga.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
layout: post
3+
title: gRPC-Web is Generally Available
4+
published: true
5+
permalink: blog/grpc-web-ga
6+
author: Luc Perkins - CNCF, Stanley Cheung - Google, Kailash Sethuraman - Google
7+
---
8+
9+
We are excited to announce the GA release of
10+
[gRPC-Web](https://www.npmjs.com/package/grpc-web), a JavaScript client library
11+
that enables web apps to communicate directly with gRPC backend services,
12+
without requiring an HTTP server to act as an intermediary. "GA" means that
13+
gRPC-Web is now Generally Available and stable and qualified for production use.
14+
15+
<!--more-->
16+
17+
With gRPC-Web, you can now easily build truly end-to-end gRPC application
18+
architectures by defining your client *and* server-side data types and service
19+
interfaces with Protocol Buffers. This has been a hotly requested feature for a
20+
while, and we are finally happy to say that it is now ready for production use.
21+
In addition, being able to access gRPC services opens up new an exciting
22+
possibilities for [web based
23+
tooling](https://github.com/grpc/grpc-experiments/tree/master/gdebug) around gRPC.
24+
25+
## The Basics
26+
gRPC-Web, just like gRPC, lets you define the service "contract" between client
27+
(web) and backend gRPC services using Protocol Buffers. The client can then be
28+
auto generated. To do this, you have a choice between the [Closure](https://developers.google.com/closure/compiler/) compiler
29+
or the more widely used [CommonJS](https://requirejs.org/docs/commonjs.html).
30+
This development process removes the need to manage concerns such as creating
31+
custom JSON seralization and deserialization logic, wrangling HTTP status codes
32+
(which can vary across REST APIs), managing content type negotiation etc.
33+
34+
From a broader architectural perspective, gRPC-Web enables end-to-end gRPC. The diagram below illustrates this:
35+
36+
<img src="/img/grpc-web-arch.png" style="max-width: 947px">
37+
38+
39+
<p style="text-align: center"> Figure 1.
40+
gRPC with gRPC-Web (left) and gRPC with REST (right)</p>
41+
42+
In the gRPC-Web universe on the left, a client application speaks Protocol Buffers to a gRPC backend server that speaks Protocol Buffers to other gRPC backend services. In the REST universe on the right, the web app speaks HTTP to a backend REST API server that then speaks Protocol Buffers to backend services.
43+
44+
## Advantages of using gRPC-Web
45+
gRPC-Web will offer an ever-broader feature set over time, but here’s what’s in 1.0 today:
46+
47+
* **End-to-end gRPC** — Enables you to craft your entire RPC pipeline using Protocol Buffers. Imagine a scenario in which a client request goes to an HTTP server, which then interacts with 5 backend gRPC services. There’s a good chance that you’ll spend as much time building the HTTP interaction layer as you will building the entire rest of the pipeline.
48+
* **Tighter coordination between frontend and backend teams** — With the entire RPC pipeline defined using Protocol Buffers, you no longer need to have your “microservices teams” alongside your “client team.” The client-backend interaction is just one more gRPC layer amongst others.
49+
* **Easily generate client libraries** — With gRPC-Web, the server that interacts with the “outside” world, i.e. the membrane connecting your backend stack to the internet, is now a gRPC server instead of an HTTP server, that means that all of your service’s client libraries can be gRPC libraries. Need client libraries for Ruby, Python, Java, and 4 other languages? You no longer need to write HTTP clients for all of them.
50+
51+
## A gRPC-Web example
52+
The previous section illustrated some of the high-level advantages of gRPC-Web for large-scale applications. Now let’s get closer to the metal with an example: a simple TODO app. In gRPC-Web you can start with a simple ``todos.proto`` definition like this:
53+
```proto
54+
syntax = "proto3";
55+
56+
package todos;
57+
58+
message Todo {
59+
string content = 1;
60+
bool finished = 2;
61+
}
62+
63+
message GetTodoRequest {
64+
int32 id = 1;
65+
}
66+
67+
service TodoService {
68+
rpc GetTodoById (GetTodoRequest) returns (Todo);
69+
}
70+
71+
```
72+
CommonJS client-side code can be generated from this ``.proto`` definition with the following command:
73+
74+
```proto
75+
protoc echo.proto \
76+
--js_out=import_style=commonjs:./output \
77+
--grpc-web_out=import_style=commonjs:./output
78+
```
79+
80+
Now, fetching a list of TODOs from a backend gRPC service is as simple as:
81+
82+
```js
83+
const {GetTodoRequest} = require('./todos_pb.js');
84+
const {TodoServiceClient} = require('./todos_grpc_web_pb.js');
85+
86+
const todoService = new proto.todos.TodoServiceClient('http://localhost:8080');
87+
const todoId = 1234;
88+
89+
var getTodoRequest = new proto.todos.GetTodoRequest();
90+
getTodoRequest.setId(todoId);
91+
92+
var metadata = {};
93+
var getTodo = todoService.getTodoById(getTodoRequest, metadata, (err, response) => {
94+
if (err) {
95+
console.log(err);
96+
} else {
97+
const todo = response.todo();
98+
if (todo == null) {
99+
console.log(`A TODO with the ID ${todoId} wasn't found`);
100+
} else {
101+
console.log(`Fetched TODO with ID ${todoId}: ${todo.content()}`);
102+
}
103+
}
104+
});
105+
106+
```
107+
108+
Once you declare the data types and a service interface, gRPC-Web abstracts away all the boilerplate, leaving you with a clean and human-friendly API (essentially the same API as the current [Node.js](https://grpc.io/docs/tutorials/basic/node.html) for gRPC API, just transferred to the client).
109+
110+
On the backend, the gRPC server can be written in any language that supports gRPC, such as Go, Java, C++, Ruby, Node.js, and many others. The last piece of the puzzle is the service proxy. From the get-go, gRPC-Web will support [Envoy](https://envoyproxy.io) as the default service proxy, which has a built-in [envoy.grpc_web filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/grpc_web_filter#config-http-filters-grpc-web) that you can apply with just a few lines of copy-and-pastable configuration.
111+
112+
## Next Steps
113+
Going GA means that the core building blocks are firmly in place and ready for usage in production web applications. But there’s still much more to come for gRPC-Web. Check out the [official roadmap](https://github.com/grpc/grpc-web/blob/master/ROADMAP.md) to see what the core team envisions for the near future.
114+
115+
If you’re interested in contributing to gRPC-Web, there are a few things we would love community help with:
116+
117+
* **Front-end framework integration** — Commonly used front-end frameworks like [React](https://reactjs.org), [Vue](https://vuejs.org) and [Angular](https://angularjs.org) don't yet offer official support for gRPC-Web. But we would love to see these frameworks support it since the integration between these frontend frameworks and gRPC-Web can be a vehicle to deliver user-perceivable performance benefits to applications. If you are interested in building out support for these frontend frameworks, let us know on the [gRPC.io mailing list](https://groups.google.com/forum/#!forum/grpc-io), [filing a feature request on github](https://github.com/grpc/grpc-web/issues) or via the feature survey form below.
118+
119+
* **Language-specific proxy support** — As of the GA release, [Envoy](https://envoyproxy.io) is the default proxy for gRPC-Web, offering support via a special module. NGNIX is also [supported](https://github.com/grpc/grpc-web/tree/master/net/grpc/gateway/nginx). But we’d also love to see development of in-process proxies for specific languages since they obviate the need for special proxies—such as Envoy and nginx—and would make using gRPC-Web even easier.
120+
121+
We’d also love to get feature requests from the community. Currently the best way to make feature requests is to fill out the [gRPC-Web roadmap features survey](https://docs.google.com/forms/d/1NjWpyRviohn5jaPntosBHXRXZYkh_Ffi4GxJZFibylM/viewform?edit_requested=true). When filling up the form, list features you’d like to see and also let us know if you’d like to contribute to the development of those features in the **I’d like to contribute to** section. The gRPC-Web engineers will be sure to take that information to heart over the course of the project’s development.
122+
123+
Most importantly, we want to thank all the Alpha and Beta users who have given us feedback, bug reports and pull requests contributions over the course of the past year. We would certainly hope to maintain this momentum and make sure this project brings tangible benefits to the developer community.

0 commit comments

Comments
 (0)