While protocol buffers have been available for open source users for some
time, our examples use a new flavour of protocol buffers called proto3,
which has a slightly simplified syntax, some useful new features, and supports
lots more languages. This is currently available as an alpha release in
[languages] from [wherever it's going], with more languages in development.
In general, we recommend that you use proto3 with gRPC as it lets you use the
full range of gRPC-supported languages, as well as avoiding compatibility
issues with proto2 clients talking to proto3 servers and vice versa. You
can find out more about these potential issues in [where should we put this
info? It's important but not really part of an overview]. If you need to
continue using proto2 for Java, C++, or Python but want
to try gRPC, you can see an example using a proto2 gRPC client and server
[wherever we put it].
<aname="hello"></a>
<aname="hello"></a>
## Hello gRPC!
## Hello gRPC!
@ -19,11 +66,11 @@ Now that you know a bit more about gRPC, the easiest way to see how it
works is to look at a simple example. Our Hello World walks you through the
works is to look at a simple example. Our Hello World walks you through the
construction of a simple gRPC client-server application, showing you how to:
construction of a simple gRPC client-server application, showing you how to:
- Create a protobuf schema that defines a simple RPC service with a single
- Create a protocol buffers schema that defines a simple RPC service with a single
Hello World method.
Hello World method.
- Create a Java server that implements the schema interface.
- Create a Java server that implements thid interface.
- Create a Java client that accesses the Java server.
- Create a Java client that accesses the Java server.
- Create a Go client that accesses the same Java server.
- Create a [probably need a different language now] client that accesses the same Java server.
- Update the service with more advanced features like RPC streaming.
- Update the service with more advanced features like RPC streaming.
The complete code for the example is available in the `grpc-common` GitHub repository. You can
The complete code for the example is available in the `grpc-common` GitHub repository. You can
@ -41,9 +88,8 @@ languages are coming soon.
<aname="setup"></a>
<aname="setup"></a>
### Setup
### Setup
The rest of this page explains how to set up your local machine to work with
This section explains how to set up your local machine to work with
the example code.
the example code. If you just want to read the example, you can go straight to the [next step](#servicedef).
If you just want to read the example, you can go straight to the [next step](#servicedef).
#### Install Git
#### Install Git
@ -57,9 +103,11 @@ the code to hack on
#### Get the source code
#### Get the source code
The example code for this and our other examples lives in the `grpc-common` GitHub repository. Clone this repository to your local machine by running the
The example code for this and our other examples lives in the `grpc-common`
GitHub repository. Clone this repository to your local machine by running the