More markdown cleanup following Hugo upgrade (#115)

In particular, removing / replacting embedded HTML.

Followup to #113.
This commit is contained in:
Patrice Chalin 2020-03-05 14:22:04 -05:00 committed by GitHub
parent fbaa7d32a9
commit f3397321d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 64 deletions

View File

@ -55,17 +55,17 @@ in order to make practical use of it in your APIs.
There are important considerations to be aware of when deciding whether to
use such an extended error model, however, including:
* library implementations of the extended error model may not be consistent
across languages in terms of requirements for and expectations of the error
details payload
* existing proxies, loggers, and other standard HTTP request
processors don't have visibility into the error details and thus
wouldn't be able to leverage them for monitoring or other purposes
* additional error detail in the trailers interferes with head-of-line
blocking, and will decrease HTTP/2 header compression efficiency due to
more frequent cache misses
* larger error detail payloads may run into protocol limits (like
max headers size), effectively losing the original error
- Library implementations of the extended error model may not be consistent
across languages in terms of requirements for and expectations of the error
details payload
- Existing proxies, loggers, and other standard HTTP request
processors don't have visibility into the error details and thus
wouldn't be able to leverage them for monitoring or other purposes
- Additional error detail in the trailers interferes with head-of-line
blocking, and will decrease HTTP/2 header compression efficiency due to
more frequent cache misses
- Larger error detail payloads may run into protocol limits (like
max headers size), effectively losing the original error
### Error status codes
@ -76,33 +76,35 @@ languages.
#### General errors
<style>
td code { word-break: normal; }
</style>
Case | Status code
-----|-----------
Client application cancelled the request | GRPC&#95;STATUS&#95;CANCELLED
Deadline expired before server returned status | GRPC&#95;STATUS&#95;DEADLINE_EXCEEDED
Method not found on server | GRPC&#95;STATUS&#95;UNIMPLEMENTED
Server shutting down | GRPC&#95;STATUS&#95;UNAVAILABLE
Server threw an exception (or did something other than returning a status code to terminate the RPC) | GRPC&#95;STATUS&#95;UNKNOWN
<br>
Client application cancelled the request | `GRPC_STATUS_CANCELLED`
Deadline expired before server returned status | `GRPC_STATUS_DEADLINE_EXCEEDED`
Method not found on server | `GRPC_STATUS_UNIMPLEMENTED`
Server shutting down | `GRPC_STATUS_UNAVAILABLE`
Server threw an exception (or did something other than returning a status code to terminate the RPC) | `GRPC_STATUS_UNKNOWN`
#### Network failures
Case | Status code
-----|-----------
No data transmitted before deadline expires. Also applies to cases where some data is transmitted and no other failures are detected before the deadline expires | GRPC&#95;STATUS&#95;DEADLINE_EXCEEDED
Some data transmitted (for example, the request metadata has been written to the TCP connection) before the connection breaks | GRPC&#95;STATUS&#95;UNAVAILABLE
<br>
No data transmitted before deadline expires. Also applies to cases where some data is transmitted and no other failures are detected before the deadline expires | `GRPC_STATUS_DEADLINE_EXCEEDED`
Some data transmitted (for example, the request metadata has been written to the TCP connection) before the connection breaks | `GRPC_STATUS_UNAVAILABLE`
#### Protocol errors
Case | Status code
-----|-----------
Could not decompress but compression algorithm supported | GRPC&#95;STATUS&#95;INTERNAL
Compression mechanism used by client not supported by the server | GRPC&#95;STATUS&#95;UNIMPLEMENTED
Flow-control resource limits reached | GRPC&#95;STATUS&#95;RESOURCE_EXHAUSTED
Flow-control protocol violation | GRPC&#95;STATUS&#95;INTERNAL
Error parsing returned status | GRPC&#95;STATUS&#95;UNKNOWN
Unauthenticated: credentials failed to get metadata | GRPC&#95;STATUS&#95;UNAUTHENTICATED
Invalid host set in authority metadata | GRPC&#95;STATUS&#95;UNAUTHENTICATED
Error parsing response protocol buffer | GRPC&#95;STATUS&#95;INTERNAL
Error parsing request protocol buffer | GRPC&#95;STATUS&#95;INTERNAL
Could not decompress but compression algorithm supported | `GRPC_STATUS_INTERNAL`
Compression mechanism used by client not supported by the server | `GRPC_STATUS_UNIMPLEMENTED`
Flow-control resource limits reached | `GRPC_STATUS_RESOURCE_EXHAUSTED`
Flow-control protocol violation | `GRPC_STATUS_INTERNAL`
Error parsing returned status | `GRPC_STATUS_UNKNOWN`
Unauthenticated: credentials failed to get metadata | `GRPC_STATUS_UNAUTHENTICATED`
Invalid host set in authority metadata | `GRPC_STATUS_UNAUTHENTICATED`
Error parsing response protocol buffer | `GRPC_STATUS_INTERNAL`
Error parsing request protocol buffer | `GRPC_STATUS_INTERNAL`

View File

@ -1,15 +1,12 @@
---
bodyclass: docs
headline: 'gRPC Samples'
headline: gRPC Samples
layout: docs
title: Samples
type: markdown
weight: 5
---
<p class="lead">Here are some sample apps to help developers build certain functionalities</p>
Here are some sample apps to help developers build certain functionalities.
<ul>
<li><a target="_blank" href="https://github.com/GoogleCloudPlatform/ios-docs-samples/tree/master/speech/Objective-C/Speech-gRPC-Streaming">Bidirectional streaming iOS client using Cloud Speech API</a></li>
<li><a target="_blank" href="https://github.com/david-cao/gRPCBenchmarks">Android app benchmarking JSON/HTTP/1.1 and gRPC</a></li>
</ul>
- [Bidirectional streaming iOS client using Cloud Speech API](https://github.com/GoogleCloudPlatform/ios-docs-samples/tree/master/speech/Objective-C/Speech-gRPC-Streaming)
- [Android app benchmarking JSON/HTTP/1.1 and gRPC](https://github.com/david-cao/gRPCBenchmarks)

View File

@ -2,26 +2,28 @@
layout: docs
title: Presentations & Talks
short: Presentations
type: markdown
weight: 6
---
<p class="lead">gRPC has been talked about in many conferences and sessions. Here are a few interesting ones:</p>
gRPC has been talked about in many conferences and sessions. Here are a few interesting ones:
{{< youtube OZ_Qmklc4zE >}}<br><br>
{{< youtube F2znfxn_5Hg >}}<br><br>
{{< youtube S7WIYLcPS1Y >}}<br><br>
{{< youtube F2WYEFLTKEw >}}<br><br>
{{< youtube UZcvnApm81U >}}<br><br>
{{< youtube UOIJNygDNlE >}}<br><br>
{{< youtube RvUP7vX2P4s >}}<br><br>
{{< youtube nz-LcdoMYWA >}}<br><br>
{{< youtube sZx3oZt7LVg >}}<br><br>
{{< vimeo 190648663 >}}
<style>
iframe { padding-bottom: 2em; }
</style>
<h3>Slides only</h3>
<ul>
<li><a target="_blank" href="https://www.slideshare.net/VarunTalwar4/grpc-overview">gRPC Overview: Talk at Slack, Feb 2016</a></li>
<li><a target="_blank" href="https://www.slideshare.net/sujatatibre/g-rpc-talk-with-intel-3">Google and Intel speak on NFV and SFC Service Delivery</a></li>
<li><a target="_blank" href="https://www.slideshare.net/VarunTalwar4/grpc-design-and-implementation">gRPC Design and Implementation, Stanford Platforms Lab, March 2016</a></li>
</ul>
{{< youtube OZ_Qmklc4zE >}}
{{< youtube F2znfxn_5Hg >}}
{{< youtube S7WIYLcPS1Y >}}
{{< youtube F2WYEFLTKEw >}}
{{< youtube UZcvnApm81U >}}
{{< youtube UOIJNygDNlE >}}
{{< youtube RvUP7vX2P4s >}}
{{< youtube nz-LcdoMYWA >}}
{{< youtube sZx3oZt7LVg >}}
{{< vimeo 190648663 >}}
### Slides only
- [gRPC Overview: Talk at Slack, Feb 2016](https://www.slideshare.net/VarunTalwar4/grpc-overview)
- [Google and Intel speak on NFV and SFC Service Delivery](https://www.slideshare.net/sujatatibre/g-rpc-talk-with-intel-3)
- [gRPC Design and Implementation, Stanford Platforms Lab, March 2016](https://www.slideshare.net/VarunTalwar4/grpc-design-and-implementation)

View File

@ -38,12 +38,13 @@ Then change your current directory to `grpc-java/examples/android`:
$ cd grpc-java/examples/android
```
You also should have the relevant tools installed to generate the client interface code - if you don't already, follow the setup instructions in [the Java README](https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/README.md).
You also should have the relevant tools installed to generate the client
interface code - if you don't already, follow the setup instructions in the
[grpc-java README][].
### Defining the service
Our first step (as you'll know from the [Overview](/docs/)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`routeguide/app/src/main/proto/route_guide.proto`](https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/routeguide/app/src/main/proto/route_guide.proto).
Our first step (as you'll know from the [Overview](/docs/)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [routeguide/app/src/main/proto/route_guide.proto](https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/routeguide/app/src/main/proto/route_guide.proto).
As we're generating Java code in this example, we've specified a `java_package` file option in our .proto:
@ -135,12 +136,10 @@ a special gRPC Java plugin. You need to use the
[proto3](https://github.com/google/protobuf/releases) compiler (which supports
both proto2 and proto3 syntax) in order to generate gRPC services.
The build system for this example is also part of Java gRPC itself's build. You
can refer to the <a
href="https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/README.md">README</a> and
<a href="https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/routeguide/app/build.gradle#L26">build.gradle</a> for
how to generate code from your own .proto files.
Note that for Android, we will use protobuf lite which is optimized for mobile usecase.
The build system for this example is also part of the Java-gRPC build. Refer to
the [grpc-java README][] and [build.gradle][] for how to generate code from your
own `.proto` files. Note that for Android, we will use protobuf lite which is
optimized for mobile usecase.
The following classes are generated from our service definition:
@ -156,7 +155,7 @@ The following classes are generated from our service definition:
### Creating the client
In this section, we'll look at creating a Java client for our `RouteGuide` service. You can see our complete example client code in [`routeguide/app/src/main/java/io/grpc/routeguideexample/RouteGuideActivity.java`](https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/routeguide/app/src/main/java/io/grpc/routeguideexample/RouteGuideActivity.java).
In this section, we'll look at creating a Java client for our `RouteGuide` service. You can see our complete example client code in [routeguide/app/src/main/java/io/grpc/routeguideexample/RouteGuideActivity.java](https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/routeguide/app/src/main/java/io/grpc/routeguideexample/RouteGuideActivity.java).
#### Creating a stub
@ -360,4 +359,6 @@ As with our client-side streaming example, we both get and return a `StreamObser
Follow the instructions in the [example directory README][] to build and run the
client and server.
[build.gradle]: https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/routeguide/app/build.gradle#L26
[example directory README]: https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/examples/android/README.md
[grpc-java README]: https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/README.md