mirror of https://github.com/grpc/grpc.io.git
More markdown cleanup following Hugo upgrade (#115)
In particular, removing / replacting embedded HTML. Followup to #113.
This commit is contained in:
parent
fbaa7d32a9
commit
f3397321d9
|
|
@ -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
|
There are important considerations to be aware of when deciding whether to
|
||||||
use such an extended error model, however, including:
|
use such an extended error model, however, including:
|
||||||
|
|
||||||
* library implementations of the extended error model may not be consistent
|
- Library implementations of the extended error model may not be consistent
|
||||||
across languages in terms of requirements for and expectations of the error
|
across languages in terms of requirements for and expectations of the error
|
||||||
details payload
|
details payload
|
||||||
* existing proxies, loggers, and other standard HTTP request
|
- Existing proxies, loggers, and other standard HTTP request
|
||||||
processors don't have visibility into the error details and thus
|
processors don't have visibility into the error details and thus
|
||||||
wouldn't be able to leverage them for monitoring or other purposes
|
wouldn't be able to leverage them for monitoring or other purposes
|
||||||
* additional error detail in the trailers interferes with head-of-line
|
- Additional error detail in the trailers interferes with head-of-line
|
||||||
blocking, and will decrease HTTP/2 header compression efficiency due to
|
blocking, and will decrease HTTP/2 header compression efficiency due to
|
||||||
more frequent cache misses
|
more frequent cache misses
|
||||||
* larger error detail payloads may run into protocol limits (like
|
- Larger error detail payloads may run into protocol limits (like
|
||||||
max headers size), effectively losing the original error
|
max headers size), effectively losing the original error
|
||||||
|
|
||||||
### Error status codes
|
### Error status codes
|
||||||
|
|
||||||
|
|
@ -76,33 +76,35 @@ languages.
|
||||||
|
|
||||||
#### General errors
|
#### General errors
|
||||||
|
|
||||||
|
<style>
|
||||||
|
td code { word-break: normal; }
|
||||||
|
</style>
|
||||||
|
|
||||||
Case | Status code
|
Case | Status code
|
||||||
-----|-----------
|
-----|-----------
|
||||||
Client application cancelled the request | GRPC_STATUS_CANCELLED
|
Client application cancelled the request | `GRPC_STATUS_CANCELLED`
|
||||||
Deadline expired before server returned status | GRPC_STATUS_DEADLINE_EXCEEDED
|
Deadline expired before server returned status | `GRPC_STATUS_DEADLINE_EXCEEDED`
|
||||||
Method not found on server | GRPC_STATUS_UNIMPLEMENTED
|
Method not found on server | `GRPC_STATUS_UNIMPLEMENTED`
|
||||||
Server shutting down | GRPC_STATUS_UNAVAILABLE
|
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
|
Server threw an exception (or did something other than returning a status code to terminate the RPC) | `GRPC_STATUS_UNKNOWN`
|
||||||
<br>
|
|
||||||
|
|
||||||
#### Network failures
|
#### Network failures
|
||||||
|
|
||||||
Case | Status code
|
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_STATUS_DEADLINE_EXCEEDED
|
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
|
Some data transmitted (for example, the request metadata has been written to the TCP connection) before the connection breaks | `GRPC_STATUS_UNAVAILABLE`
|
||||||
<br>
|
|
||||||
|
|
||||||
#### Protocol errors
|
#### Protocol errors
|
||||||
|
|
||||||
Case | Status code
|
Case | Status code
|
||||||
-----|-----------
|
-----|-----------
|
||||||
Could not decompress but compression algorithm supported | GRPC_STATUS_INTERNAL
|
Could not decompress but compression algorithm supported | `GRPC_STATUS_INTERNAL`
|
||||||
Compression mechanism used by client not supported by the server | GRPC_STATUS_UNIMPLEMENTED
|
Compression mechanism used by client not supported by the server | `GRPC_STATUS_UNIMPLEMENTED`
|
||||||
Flow-control resource limits reached | GRPC_STATUS_RESOURCE_EXHAUSTED
|
Flow-control resource limits reached | `GRPC_STATUS_RESOURCE_EXHAUSTED`
|
||||||
Flow-control protocol violation | GRPC_STATUS_INTERNAL
|
Flow-control protocol violation | `GRPC_STATUS_INTERNAL`
|
||||||
Error parsing returned status | GRPC_STATUS_UNKNOWN
|
Error parsing returned status | `GRPC_STATUS_UNKNOWN`
|
||||||
Unauthenticated: credentials failed to get metadata | GRPC_STATUS_UNAUTHENTICATED
|
Unauthenticated: credentials failed to get metadata | `GRPC_STATUS_UNAUTHENTICATED`
|
||||||
Invalid host set in authority metadata | GRPC_STATUS_UNAUTHENTICATED
|
Invalid host set in authority metadata | `GRPC_STATUS_UNAUTHENTICATED`
|
||||||
Error parsing response protocol buffer | GRPC_STATUS_INTERNAL
|
Error parsing response protocol buffer | `GRPC_STATUS_INTERNAL`
|
||||||
Error parsing request protocol buffer | GRPC_STATUS_INTERNAL
|
Error parsing request protocol buffer | `GRPC_STATUS_INTERNAL`
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
---
|
---
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
headline: 'gRPC Samples'
|
headline: gRPC Samples
|
||||||
layout: docs
|
layout: docs
|
||||||
title: Samples
|
title: Samples
|
||||||
type: markdown
|
|
||||||
weight: 5
|
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>
|
- [Bidirectional streaming iOS client using Cloud Speech API](https://github.com/GoogleCloudPlatform/ios-docs-samples/tree/master/speech/Objective-C/Speech-gRPC-Streaming)
|
||||||
<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>
|
- [Android app benchmarking JSON/HTTP/1.1 and gRPC](https://github.com/david-cao/gRPCBenchmarks)
|
||||||
<li><a target="_blank" href="https://github.com/david-cao/gRPCBenchmarks">Android app benchmarking JSON/HTTP/1.1 and gRPC</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,28 @@
|
||||||
layout: docs
|
layout: docs
|
||||||
title: Presentations & Talks
|
title: Presentations & Talks
|
||||||
short: Presentations
|
short: Presentations
|
||||||
type: markdown
|
|
||||||
weight: 6
|
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>
|
<style>
|
||||||
{{< youtube F2znfxn_5Hg >}}<br><br>
|
iframe { padding-bottom: 2em; }
|
||||||
{{< youtube S7WIYLcPS1Y >}}<br><br>
|
</style>
|
||||||
{{< 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 >}}
|
|
||||||
|
|
||||||
<h3>Slides only</h3>
|
{{< youtube OZ_Qmklc4zE >}}
|
||||||
<ul>
|
{{< youtube F2znfxn_5Hg >}}
|
||||||
<li><a target="_blank" href="https://www.slideshare.net/VarunTalwar4/grpc-overview">gRPC Overview: Talk at Slack, Feb 2016</a></li>
|
{{< youtube S7WIYLcPS1Y >}}
|
||||||
<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>
|
{{< youtube F2WYEFLTKEw >}}
|
||||||
<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>
|
{{< youtube UZcvnApm81U >}}
|
||||||
</ul>
|
{{< 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)
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,13 @@ Then change your current directory to `grpc-java/examples/android`:
|
||||||
$ cd 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
|
### 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:
|
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
|
[proto3](https://github.com/google/protobuf/releases) compiler (which supports
|
||||||
both proto2 and proto3 syntax) in order to generate gRPC services.
|
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
|
The build system for this example is also part of the Java-gRPC build. Refer to
|
||||||
can refer to the <a
|
the [grpc-java README][] and [build.gradle][] for how to generate code from your
|
||||||
href="https://github.com/grpc/grpc-java/blob/{{< param grpc_java_release_tag >}}/README.md">README</a> and
|
own `.proto` files. Note that for Android, we will use protobuf lite which is
|
||||||
<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
|
optimized for mobile usecase.
|
||||||
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:
|
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
|
### 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
|
#### 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
|
Follow the instructions in the [example directory README][] to build and run the
|
||||||
client and server.
|
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
|
[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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue