diff --git a/content/docs/guides/error.md b/content/docs/guides/error.md index 2efb543..5ac8025 100644 --- a/content/docs/guides/error.md +++ b/content/docs/guides/error.md @@ -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 + + Case | Status code -----|----------- -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 -
+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_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 -
+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_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 +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` diff --git a/content/docs/samples/_index.md b/content/docs/samples/_index.md index 5434ebf..a3e5973 100644 --- a/content/docs/samples/_index.md +++ b/content/docs/samples/_index.md @@ -1,15 +1,12 @@ --- bodyclass: docs -headline: 'gRPC Samples' +headline: gRPC Samples layout: docs title: Samples -type: markdown weight: 5 --- -

Here are some sample apps to help developers build certain functionalities

+Here are some sample apps to help developers build certain functionalities. - +- [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) diff --git a/content/docs/talks/_index.md b/content/docs/talks/_index.md index 1177932..7faf867 100644 --- a/content/docs/talks/_index.md +++ b/content/docs/talks/_index.md @@ -2,26 +2,28 @@ layout: docs title: Presentations & Talks short: Presentations -type: markdown weight: 6 --- -

gRPC has been talked about in many conferences and sessions. Here are a few interesting ones:

+gRPC has been talked about in many conferences and sessions. Here are a few interesting ones: - {{< 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

- +{{< 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) diff --git a/content/docs/tutorials/basic/android.md b/content/docs/tutorials/basic/android.md index 0042da6..b11b767 100644 --- a/content/docs/tutorials/basic/android.md +++ b/content/docs/tutorials/basic/android.md @@ -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 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 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