From 8c233e270dbe641fdf40a720d34117aacaa4768a Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 28 Aug 2015 13:31:41 -0700 Subject: [PATCH] replace grpc-common references with the new examples locations --- docs/index.md | 130 ++++++++++++++-------------- docs/installation/c.md | 16 ++-- docs/installation/csharp.md | 4 +- docs/installation/go.md | 10 +-- docs/installation/node.md | 6 +- docs/installation/objective-c.md | 12 +-- docs/installation/php.md | 10 +-- docs/installation/python.md | 16 ++-- docs/installation/ruby.md | 4 +- docs/tutorials/basic/c.md | 16 ++-- docs/tutorials/basic/csharp.md | 16 ++-- docs/tutorials/basic/go.md | 2 +- docs/tutorials/basic/node.md | 14 +-- docs/tutorials/basic/objective-c.md | 14 +-- docs/tutorials/basic/php.md | 14 +-- docs/tutorials/basic/python.md | 14 +-- docs/tutorials/basic/ruby.md | 20 ++--- faq/index.html | 2 +- 18 files changed, 160 insertions(+), 160 deletions(-) diff --git a/docs/index.md b/docs/index.md index 62d1308a..931fbdf3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -23,13 +23,13 @@ To get up and running with gRPC straight away, see the quick start for your chos * [Python](/docs/installation/python.html) * [Ruby](/docs/installation/ruby.html) * [Node.js](/docs/installation/node.html) -* [Android Java](https://github.com/grpc/grpc-common/tree/master/java/android) (draft) +* [Android Java](https://github.com/grpc/grpc-java/tree/master/examples/android) (draft) * [C#](/docs/installation/csharp.html) * [Objective-C](/docs/installation/objective-c.html) * [PHP](/docs/installation/php.html) You can find out about the gRPC source code repositories in -[grpc](https://github.com/grpc/grpc). Most of our example code (plus more draft documentation) lives in [grpc-common](https://github.com/grpc/grpc-common). +[grpc](https://github.com/grpc/grpc). Most of our example code (plus more draft documentation) lives in the [examples](https://github.com/grpc/grpc/tree/master/examples) directory. ## What is gRPC? @@ -93,8 +93,8 @@ Hello World method. - Create a server that implements this interface in your favourite language (where available). - Create a client in your favourite language (or any other one you like!) that accesses your server. -The complete code for the examples is available in the `grpc-common` GitHub -repository. We use the Git versioning system for source code management: +The complete code for the examples is available in the `examples` directory in our +GitHub repositories. We use the Git versioning system for source code management: however, you don't need to know anything about Git to follow along other than how to install and run a few git commands. @@ -153,47 +153,47 @@ cd grpc-java/examples
-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command: +

The example code for this lives in the examples directory in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 
-

Change your current directory to grpc-common/cpp/helloworld +

Change your current directory to examples/cpp/helloworld

-$ cd grpc-common/cpp/helloworld/
+$ cd examples/cpp/helloworld/
 
-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command: +

The example code for this lives in the examples directory in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 
-

Change your current directory to grpc-common/python/helloworld +

Change your current directory to examples/python/helloworld

-$ cd grpc-common/python/helloworld/
+$ cd examples/python/helloworld/
 

Get the example:

-$ go get -u github.com/grpc/grpc-common/go/greeter_client
-$ go get -u github.com/grpc/grpc-common/go/greeter_server
+$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_client
+$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_server
 
-

Change your current directory to grpc-common/go +

Change your current directory to examples/helloworld

-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command:

+

The example code for this lives in the examples directory in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 
-

Change your current directory to grpc-common/ruby. Then use bundler to install the example package's dependencies:

+

Change your current directory to examples/ruby. Then use bundler to install the example package's dependencies:

 $ gem install bundler # if you don't already have bundler available
@@ -202,46 +202,46 @@ $ bundle install
 
   
-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command:

+

The example code for this lives in the examples directory in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 
-

Change your current directory to grpc-common/ruby, then install this package's dependencies:

+

Change your current directory to examples/node, then install this package's dependencies:

-$ cd grpc-common/node
+$ cd examples/node
 $ npm install
 
-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command:

+

The example code for this lives in the examples directory in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 

Open Greeter.sln from Visual Studio (or Monodevelop on Linux). See the C# Quickstart for platform-specific setup.

-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command:

+

The example code for this lives in the examples directory in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 
-

Change your current directory to grpc-common/objective-c/helloworld.

+

Change your current directory to examples/objective-c/helloworld.

-

The example code for this lives in the grpc-common GitHub repository. Clone this repository to your local machine by running the following command:

+

The example code for this lives in the examples in our GitHub repositories. Clone this repository to your local machine by running the following command:

-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
 
-

Change your current directory to grpc-common/php.

+

Change your current directory to examples/php.

While most of our Hello World examples use the same .proto file, the PHP example has its own copy of helloworld.proto because it currently depends on some proto2 syntax. There is no proto3 support for PHP yet.

@@ -447,7 +447,7 @@ Running the appropriate command for your OS regenerates the following files in t
-For simplicity, we've provided a [Podspec file](https://github.com/grpc/grpc-common/blob/master/objective-c/helloworld/HelloWorld.podspec) that runs protoc for you with the appropriate plugin, input, and output, and describes how to compile the generated files. You just need to run in `grpc-common/objective-c/route_guide`: +For simplicity, we've provided a [Podspec file](https://github.com/grpc/grpc/blob/master/examples/objective-c/helloworld/HelloWorld.podspec) that runs protoc for you with the appropriate plugin, input, and output, and describes how to compile the generated files. You just need to run in `examples/objective-c/route_guide`: ``` $ pod install @@ -534,7 +534,7 @@ message, as specified in our interface definition.
-

greeter_server.cc +

greeter_server.cc implements our Greeter service's required behaviour.

As you can see, the class GreeterServiceImpl implements the interface @@ -571,7 +571,7 @@ message, as specified in our interface definition.

-

greeter_server.py implements our Greeter service's required behaviour. +

greeter_server.py implements our Greeter service's required behaviour.

As you can see, the class Greeter implements the interface helloworld_pb2.EarlyAdopterGreeterServicer that we generated from our proto @@ -589,7 +589,7 @@ message, as specified in our interface definition.

-

greeter_server/main.go implements our Greeter service's required behaviour. +

greeter_server/main.go implements our Greeter service's required behaviour.

As you can see, our server has a server struct type. This implements the GreeterServer interface that we generated from our proto service definition by implementing the method SayHello:

// server is used to implement helloworld.GreeterServer.
@@ -609,7 +609,7 @@ message, as specified in our interface definition.
 
   
-

greeter_server.rb implements our Greeter service's required behaviour. +

greeter_server.rb implements our Greeter service's required behaviour.

Our server has a GreeterServer class, which implements the GreeterServer interface that we generated from our proto service definition by implementing the method SayHello:

class GreeterServer < Helloworld::Greeter::Service
@@ -623,7 +623,7 @@ message, as specified in our interface definition, then return.

-

greeter_server.js implements our Greeter service's required behaviour. +

greeter_server.js implements our Greeter service's required behaviour.

Our server implements the Greeterservice from our service definition by implementing the method SayHello:

@@ -635,7 +635,7 @@ function sayHello(call, callback) {
 
   
-

GreeterServer/Program.cs implements our Greeter service's required behaviour. +

GreeterServer/Program.cs implements our Greeter service's required behaviour.

Our server has a GreeterImpl class, which implements the IGreeter interface that we generated from our proto service definition by implementing the method SayHello:

@@ -697,7 +697,7 @@ provides this for our Java example.

-

greeter_server.cc +

greeter_server.cc also provides this for our C++ example.

void RunServer() {
   std::string server_address("0.0.0.0:50051");
@@ -714,7 +714,7 @@ also provides this for our C++ example.

-

greeter_server.py +

greeter_server.py also provides this for our C++ example.

  server = helloworld_pb2.early_adopter_create_Greeter_server(
       Greeter(), 50051, None, None)
@@ -727,7 +727,7 @@ also provides this for our C++ example.

-

greeter_server/main.go also provides this for our Go example. +

greeter_server/main.go also provides this for our Go example.

 const (
 	port = ":50051"
@@ -747,7 +747,7 @@ func main() {
 
   
-

greeter_server.rb also provides this for our Ruby example. +

greeter_server.rb also provides this for our Ruby example.

 def main
   s = GRPC::RpcServer.new
@@ -759,7 +759,7 @@ end
 
   
-

greeter_server.js also provides this for our Node.js example. +

greeter_server.js also provides this for our Node.js example.

 function main() {
   var server = new Server({
@@ -774,7 +774,7 @@ function main() {
 
   
-

GreeterServer/Program.cs also provides this for our C# example. +

GreeterServer/Program.cs also provides this for our C# example.

Server server = new Server();
 server.AddServiceDefinition(Greeter.BindService(new GreeterImpl()));
 int port = server.AddListeningPort("localhost", 50051);
@@ -965,13 +965,13 @@ Now we can contact the service and obtain a greeting:
     }
   }
-

You can see the complete client code in greeter_client.cc.

+

You can see the complete client code in greeter_client.cc.

response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'), _TIMEOUT_SECONDS)
 print "Greeter client received: " + response.message
 
-

You can see the complete client code in greeter_client.py.

+

You can see the complete client code in greeter_client.py.

@@ -980,7 +980,7 @@ if err != nil { log.Fatalf("could not greet: %v", err) } log.Printf("Greeting: %s", r.Message) -

You can see the complete client code in greeter_client/main.go.

+

You can see the complete client code in greeter_client/main.go.

@@ -988,20 +988,20 @@ log.Printf("Greeting: %s", r.Message) message = stub.say_hello(Helloworld::HelloRequest.new(name: user)).message p "Greeting: #{message}" -

You can see the complete client code in greeter_client.rb.

+

You can see the complete client code in greeter_client.rb.

  client.sayHello({name: user}, function(err, response) {
     console.log('Greeting:', response.message);
   });
-

You can see the complete client code in greeter_client.js.

+

You can see the complete client code in greeter_client.js.

var reply = client.SayHello(new HelloRequest.Builder { Name = user }.Build());
 Console.WriteLine("Greeting: " + reply.Message);
-

You can see the complete example code in GreeterClient/Program.cs.

+

You can see the complete example code in GreeterClient/Program.cs.

@@ -1010,7 +1010,7 @@ Console.WriteLine("Greeting: " + reply.Message); [client sayHelloWithRequest:request handler:^(HLWHelloReply *response, NSError *error) { NSLog(@"%@", response.message); }]; -

You can see the complete example code in grpc-common/objective-c/helloworld.

+

You can see the complete example code in examples/objective-c/helloworld.

@@ -1019,7 +1019,7 @@ Console.WriteLine("Greeting: " + reply.Message); list($reply, $status) = $client->SayHello($request)->wait(); $message = $reply->getMessage(); -

You can see the complete client code in greeter_client.php.

+

You can see the complete client code in greeter_client.php.

@@ -1053,33 +1053,33 @@ $ ./gradlew :grpc-examples:helloWorldServer
-

You can build and run the server from the grpc-common/cpp/helloworld folder. First build the client and server. +

You can build and run the server from the examples/cpp/helloworld folder. First build the client and server.

$ make
Then run the server, which will listen on port 50051:
$ ./greeter_server
-

You can run the server from grpc-common/python/helloworld using: +

You can run the server from examples/python/helloworld using:

$ ./run_server.sh
-

You can run the server from grpc-common/go using: +

You can run the server from examples/helloworld using:

$ greeter_server &
-

You can run the server from grpc-common/ruby using: +

You can run the server from examples/ruby using:

$ bundle exec ./greeter_server.rb &
-

You can run the server from grpc-common/node using: +

You can run the server from examples/node using:

$ node ./greeter_server.js &
-

Build the solution. Then from grpc-common/csharp: +

Build the solution. Then from examples/csharp: ``` > cd GreeterServer/bin/Debug @@ -1111,33 +1111,33 @@ $ ./gradlew :grpc-examples:helloWorldClient

-

You can build and run the client from the grpc-common/cpp/helloworld folder. If you haven't already built the client, build it using: +

You can build and run the client from the examples/cpp/helloworld folder. If you haven't already built the client, build it using:

$ make
Then run the client:
$ ./greeter_client
-

You can run the client from grpc-common/python/helloworld using: +

You can run the client from examples/python/helloworld using:

$ ./run_client.sh
-

You can run the client from grpc-common/go using: +

You can run the client from examples/helloworld using:

$ greeter_client
-

You can run the client from grpc-common/ruby using: +

You can run the client from examples/ruby using:

$ bundle exec ./greeter_client.rb
-

You can run the client from grpc-common/node using: +

You can run the client from examples/node using:

$ node ./greeter_client.js
-

Build the solution. Then from grpc-common/csharp: +

Build the solution. Then from examples/csharp: ``` > cd GreeterClient/bin/Debug @@ -1150,7 +1150,7 @@ Then run the client:

-

You can run the client from grpc-common/php using: +

You can run the client from examples/php using: ``` $ ./run_greeter_client.sh @@ -1164,4 +1164,4 @@ $ ./run_greeter_client.sh - Find out how to install gRPC and get started in each language's [quick start](#quickstart). - Follow the tutorial(s) for your favorite language(s). -- [gRPC Authentication Support](https://github.com/grpc/grpc-common/blob/master/grpc-auth-support.md) introduces authentication support in gRPC with supported mechanisms and examples. +- [gRPC Authentication Support](https://github.com/grpc/grpc/blob/master/doc/grpc-auth-support.md) introduces authentication support in gRPC with supported mechanisms and examples. diff --git a/docs/installation/c.md b/docs/installation/c.md index 7cdce58e..3d654b63 100644 --- a/docs/installation/c.md +++ b/docs/installation/c.md @@ -13,21 +13,21 @@ To install gRPC on your system, follow the instructions here: ## Hello C++ gRPC! -Here's how to build and run the C++ implementation of the [Hello World](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto) example used in the [Overview](/docs/index.shtml). +Here's how to build and run the C++ implementation of the [Hello World](https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto) example used in the [Overview](/docs/index.shtml). -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 `examples` +directory. Clone this repository to your local machine by running the following command: ```sh -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Change your current directory to grpc-common/cpp/helloworld +Change your current directory to examples/cpp/helloworld ```sh -$ cd grpc-common/cpp/helloworld/ +$ cd examples/cpp/helloworld/ ``` @@ -47,9 +47,9 @@ $ protoc -I ../../protos/ --cpp_out=. ../../protos/helloworld.proto ### Client and server implementations -The client implementation is at [greeter_client.cc](https://github.com/grpc/grpc-common/blob/master/cpp/helloworld/greeter_client.cc). +The client implementation is at [greeter_client.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_client.cc). -The server implementation is at [greeter_server.cc](https://github.com/grpc/grpc-common/blob/master/cpp/helloworld/greeter_server.cc). +The server implementation is at [greeter_server.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_server.cc). ### Try it! Build client and server: diff --git a/docs/installation/csharp.md b/docs/installation/csharp.md index 6da29091..036e9006 100644 --- a/docs/installation/csharp.md +++ b/docs/installation/csharp.md @@ -33,7 +33,7 @@ Build **Windows** -- Clone the [grpc-common](https://github.com/grpc/grpc-common) repository. +- Clone the [grpc](https://github.com/grpc/grpc) repository. - Open solution `Greeter.sln` with Visual Studio @@ -41,7 +41,7 @@ Build **Linux (Mono)** -- Clone the [grpc-common](https://github.com/grpc/grpc-common) repository. +- Clone the [grpc](https://github.com/grpc/grpc) repository. - Install gRPC C Core using instructions in [homebrew-grpc](https://github.com/grpc/homebrew-grpc). diff --git a/docs/installation/go.md b/docs/installation/go.md index 9df4d0a9..99c4d8e2 100644 --- a/docs/installation/go.md +++ b/docs/installation/go.md @@ -35,14 +35,14 @@ $ go get -a github.com/golang/protobuf/protoc-gen-go - Get the example. ```sh -$ go get -u github.com/grpc/grpc-common/go/greeter_client -$ go get -u github.com/grpc/grpc-common/go/greeter_server +$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_client +$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_server ``` Try it! ------- -For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto). +For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-go/blob/master/examples/helloworld/proto/helloworld.proto). - Run the server ```sh @@ -60,7 +60,7 @@ OPTIONAL - Rebuilding the generated code You must have protoc and the Go protoc plugin installed to do this: ```sh -$ # from the grpc-common/go dir; invoke protoc -$ protoc -I ../protos ../protos/helloworld.proto --go_out=plugins=grpc:helloworld +$ # from the examples/helloworld dir; invoke protoc +$ protoc -I ../proto ../proto/helloworld.proto --go_out=plugins=grpc:helloworld ``` diff --git a/docs/installation/node.md b/docs/installation/node.md index 8b9f2ffc..51e058db 100644 --- a/docs/installation/node.md +++ b/docs/installation/node.md @@ -18,7 +18,7 @@ Install - Clone this repository ```sh - $ git clone https://github.com/grpc/grpc-common.git + $ git clone https://github.com/grpc/grpc.git ``` - Download the grpc debian packages from the [latest grpc release](https://github.com/grpc/grpc/releases) and install them. @@ -33,7 +33,7 @@ Install - Install this package's dependencies ```sh - $ cd grpc-common/node + $ cd examples/node $ npm install ``` @@ -57,7 +57,7 @@ Try it! Note ---- -The grpc-common/node directory has its own copy of `helloworld.proto` because it currently depends on +The examples/node directory has its own copy of `helloworld.proto` because it currently depends on some Protocol Buffer 2.0 syntax that is deprecated in Protocol Buffer 3.0. Tutorial diff --git a/docs/installation/objective-c.md b/docs/installation/objective-c.md index 047c0f56..d6e460b7 100644 --- a/docs/installation/objective-c.md +++ b/docs/installation/objective-c.md @@ -13,21 +13,21 @@ To run this example you should have [Cocoapods](https://cocoapods.org/#install) ## Hello Objective-C gRPC! -Here's how to build and run the Objective-C implementation of the [Hello World](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto) example used in the [Overview](/docs/index.html). +Here's how to build and run the Objective-C implementation of the [Hello World](https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto) example used in the [Overview](/docs/index.html). -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 `examples` +directory. Clone this repository to your local machine by running the following command: ```` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Change your current directory to `grpc-common/objective-c/helloworld` +Change your current directory to `examples/objective-c/helloworld` ```` -$ cd grpc-common/objective-c/helloworld +$ cd examples/objective-c/helloworld ``` ### Try it! diff --git a/docs/installation/php.md b/docs/installation/php.md index dc080cfb..0eb9ce06 100644 --- a/docs/installation/php.md +++ b/docs/installation/php.md @@ -24,13 +24,13 @@ INSTALL - Clone this repository ```sh - $ git clone https://github.com/grpc/grpc-common.git + $ git clone https://github.com/grpc/grpc.git ``` - Install composer ``` - $ cd grpc-common/php + $ cd examples/php $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install ``` @@ -41,14 +41,14 @@ TRY IT! - Run a gRPC server. Follow the instruction in [Node][] to run an example server (we only support writing clients in PHP): ``` - $ cd grpc-common/node + $ cd examples/node $ nodejs greeter_server.js ``` - Run the client: ``` - $ cd grpc-common/php + $ cd examples/php $ ./run_greeter_client.sh ``` @@ -64,7 +64,7 @@ Optional - REBUILDING THE GENERATED CODE The PHP client stub implementation of the proto files can be generated by the [`protoc-gen-php`](https://github.com/datto/protobuf-php) tool. To install the tool: ```sh -$ cd grpc-common/php +$ cd examples/php $ php composer.phar install $ cd vendor/datto/protobuf-php $ gem install rake ronn diff --git a/docs/installation/python.md b/docs/installation/python.md index 5f48d968..af343126 100644 --- a/docs/installation/python.md +++ b/docs/installation/python.md @@ -17,19 +17,19 @@ have cloned the [gRPC git repo](https://github.com/grpc/grpc). ### Get the source code -The example code for our Hello World and our other examples live in the `grpc-common` -GitHub repository. Clone this repository to your local machine by running the +The example code for our Hello World and our other examples live in the `examples` +directory. Clone this repository to your local machine by running the following command: ```sh -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Change your current directory to grpc-common/python/helloworld +Change your current directory to examples/python/helloworld ```sh -$ cd grpc-common/python/helloworld/ +$ cd examples/python/helloworld/ ``` ### Defining a service @@ -45,7 +45,7 @@ types as protocol buffer message types. Both the client and the server use interface code generated from the service definition. Here's our example service definition, defined using protocol buffers IDL in -[helloworld.proto](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto). The `Greeting` +[helloworld.proto](https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto). The `Greeting` service has one method, `hello`, that lets the server receive a single `HelloRequest` message from the remote client containing the user's name, then send back @@ -102,7 +102,7 @@ been generated for you (helloworld_pb2.py). ### The client -Client-side code can be found in [greeter_client.py](https://github.com/grpc/grpc-common/blob/master/python/helloworld/greeter_client.py). +Client-side code can be found in [greeter_client.py](https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_client.py). You can run the client using: @@ -113,7 +113,7 @@ $ ./run_client.sh ### The server -Server side code can be found in [greeter_server.py](https://github.com/grpc/grpc-common/blob/master/python/helloworld/greeter_server.py). +Server side code can be found in [greeter_server.py](https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py). You can run the server using: diff --git a/docs/installation/ruby.md b/docs/installation/ruby.md index 1d3ecb87..303ddbcf 100644 --- a/docs/installation/ruby.md +++ b/docs/installation/ruby.md @@ -25,7 +25,7 @@ $ # and that the rvm command is installed Install ------- -- Clone the [grpc-common](https://github.com/grpc/grpc-common) repository, which contains all our examples. +- Clone the [grpc](https://github.com/grpc/grpc) repository, which contains all our examples. - Use bundler to install the example package's dependencies ```sh @@ -60,5 +60,5 @@ Tutorial You can find a more detailed tutorial in [gRPC Basics: Ruby](/docs/tutorials/basic/ruby.html) -[helloworld.proto]:https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto +[helloworld.proto]:https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto [RVM]:https://www.rvm.io/ diff --git a/docs/tutorials/basic/c.md b/docs/tutorials/basic/c.md index d6a339cf..8eff3231 100644 --- a/docs/tutorials/basic/c.md +++ b/docs/tutorials/basic/c.md @@ -27,14 +27,14 @@ With gRPC we can define our service once in a .proto file and implement clients ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/cpp/route_guide](https://github.com/grpc/grpc-common/tree/master/cpp/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [grpc/grpc/examples/cpp/route_guide](https://github.com/grpc/grpc/tree/master/examples/cpp/route_guide). To download the example, clone the `grpc` repository by running the following command: ``` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/cpp/route_guide`: +Then change your current directory to `examples/cpp/route_guide`: ``` -$ cd grpc-common/cpp/route_guide +$ cd examples/cpp/route_guide ``` You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the C++ quick start guide](/docs/installation/c.html). @@ -42,7 +42,7 @@ You also should have the relevant tools installed to generate the server and cli ## Defining the service -Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`examples/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -105,7 +105,7 @@ message Point { Next we need to generate the gRPC client and server interfaces from our .proto service definition. We do this using the protocol buffer compiler `protoc` with a special gRPC C++ plugin. -For simplicity, we've provided a [makefile](https://github.com/grpc/grpc-common/blob/master/cpp/route_guide/Makefile) that runs `protoc` for you with the appropriate plugin, input, and output (if you want to run this yourself, make sure you've installed protoc and followed the gRPC code [installation instructions](https://github.com/grpc/grpc/blob/master/INSTALL) first): +For simplicity, we've provided a [makefile](https://github.com/grpc/grpc/blob/master/examples/cpp/route_guide/Makefile) that runs `protoc` for you with the appropriate plugin, input, and output (if you want to run this yourself, make sure you've installed protoc and followed the gRPC code [installation instructions](https://github.com/grpc/grpc/blob/master/INSTALL) first): ``` $ make route_guide.grpc.pb.cc route_guide.pb.cc @@ -140,7 +140,7 @@ There are two parts to making our `RouteGuide` service do its job: - Implementing the service interface generated from our service definition: doing the actual "work" of our service. - Running a gRPC server to listen for requests from clients and return the service responses. -You can find our example `RouteGuide` server in [grpc-common/cpp/route_guide/route_guide_server.cc](https://github.com/grpc/grpc-common/blob/master/cpp/route_guide/route_guide_server.cc). Let's take a closer look at how it works. +You can find our example `RouteGuide` server in [examples/cpp/route_guide/route_guide_server.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/route_guide/route_guide_server.cc). Let's take a closer look at how it works. ### Implementing RouteGuide @@ -250,7 +250,7 @@ As you can see, we build and start our server using a `ServerBuilder`. To do thi ## Creating the client -In this section, we'll look at creating a C++ client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/cpp/route_guide/route_guide_client.cc](https://github.com/grpc/grpc-common/blob/master/cpp/route_guide/route_guide_client.cc). +In this section, we'll look at creating a C++ client for our `RouteGuide` service. You can see our complete example client code in [examples/cpp/route_guide/route_guide_client.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/route_guide/route_guide_client.cc). ### Creating a stub diff --git a/docs/tutorials/basic/csharp.md b/docs/tutorials/basic/csharp.md index 9a2f062d..dae00eb5 100644 --- a/docs/tutorials/basic/csharp.md +++ b/docs/tutorials/basic/csharp.md @@ -28,13 +28,13 @@ With gRPC we can define our service once in a .proto file and implement clients ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/csharp/route_guide](https://github.com/grpc/grpc-common/tree/master/csharp/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [grpc/grpc/examples/csharp/route_guide](https://github.com/grpc/grpc/tree/master/examples/csharp/route_guide). To download the example, clone the `grpc` repository by running the following command: ```shell -$ git clone https://github.com/google/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -All the files for this tutorial are in the directory `grpc-common/csharp/route_guide`. -Open the solution `grpc-common/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux). +All the files for this tutorial are in the directory `examples/csharp/route_guide`. +Open the solution `examples/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux). On Windows, you should not need to do anything besides opening the solution. All the needed dependencies will be restored for you automatically by the `Grpc` NuGet package upon building the solution. @@ -44,7 +44,7 @@ able to generate the server and client interface code and run the examples. Foll ## Defining the service -Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/csharp/route_guide/RouteGuide/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/sharp/route_guide/RouteGuide/protos/route_guide.proto). +Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`examples/csharp/route_guide/RouteGuide/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/csharp/route_guide/RouteGuide/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -146,7 +146,7 @@ There are two parts to making our `RouteGuide` service do its job: - Implementing the service interface generated from our service definition: doing the actual "work" of our service. - Running a gRPC server to listen for requests from clients and return the service responses. -You can find our example `RouteGuide` server in [grpc-common/csharp/route_guide/RouteGuideServer/RouteGuideImpl.cs](https://github.com/grpc/grpc-common/blob/master/csharp/route_guide/RouteGuideServer/RouteGuideServerImpl.cs). Let's take a closer look at how it works. +You can find our example `RouteGuide` server in [examples/csharp/route_guide/RouteGuideServer/RouteGuideImpl.cs](https://github.com/grpc/grpc/blob/master/examples/csharp/route_guide/RouteGuideServer/RouteGuideServerImpl.cs). Let's take a closer look at how it works. ### Implementing RouteGuide @@ -307,7 +307,7 @@ As you can see, we build and start our server using `Grpc.Core.Server` class. To ## Creating the client -In this section, we'll look at creating a C# client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/csharp/route_guide/RouteGuideClient/Program.cs](https://github.com/grpc/grpc-common/blob/master/csharp/route_guide/RouteGuideClient/Program.cs). +In this section, we'll look at creating a C# client for our `RouteGuide` service. You can see our complete example client code in [examples/csharp/route_guide/RouteGuideClient/Program.cs](https://github.com/grpc/grpc/blob/master/examples/csharp/route_guide/RouteGuideClient/Program.cs). ### Creating a stub @@ -411,7 +411,7 @@ Finally, let's look at our bidirectional streaming RPC `RouteChat`. In this case Build client and server: -- Open the solution `grpc-common/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux) and select **Build**. +- Open the solution `examples/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux) and select **Build**. - Run the server, which will listen on port 50052: diff --git a/docs/tutorials/basic/go.md b/docs/tutorials/basic/go.md index d4c30aa6..52812a57 100644 --- a/docs/tutorials/basic/go.md +++ b/docs/tutorials/basic/go.md @@ -42,7 +42,7 @@ You also should have the relevant tools installed to generate the server and cli ## Defining the service -Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`examples/helloworld/proto/route_guide.proto`](https://github.com/grpc/grpc-go/blob/master/examples/helloworld/proto/route_guide.proto). To define a service, you specify a named `service` in your .proto file: diff --git a/docs/tutorials/basic/node.md b/docs/tutorials/basic/node.md index b98afeb2..71b20ba3 100644 --- a/docs/tutorials/basic/node.md +++ b/docs/tutorials/basic/node.md @@ -26,16 +26,16 @@ With gRPC we can define our service once in a .proto file and implement clients ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/node/route_guide](https://github.com/grpc/grpc-common/tree/master/node/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [grpc/grpc/examples/node/route_guide](https://github.com/grpc/grpc/tree/master/examples/node/route_guide). To download the example, clone the `grpc` repository by running the following command: ``` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/node/route_guide`: +Then change your current directory to `examples/node/route_guide`: ``` -$ cd grpc-common/node/route_guide +$ cd examples/node/route_guide ``` You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Node.js quick start guide](/docs/installation/node.html). @@ -43,7 +43,7 @@ You also should have the relevant tools installed to generate the server and cli ## Defining the service -Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`examples/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -126,7 +126,7 @@ There are two parts to making our `RouteGuide` service do its job: - Implementing the service interface generated from our service definition: doing the actual "work" of our service. - Running a gRPC server to listen for requests from clients and return the service responses. -You can find our example `RouteGuide` server in [grpc-common/node/route_guide/route_guide_server.js](https://github.com/grpc/grpc-common/blob/master/node/route_guide/route_guide_server.js). Let's take a closer look at how it works. +You can find our example `RouteGuide` server in [examples/node/route_guide/route_guide_server.js](https://github.com/grpc/grpc/blob/master/examples/node/route_guide/route_guide_server.js). Let's take a closer look at how it works. ### Implementing RouteGuide @@ -260,7 +260,7 @@ As you can see, we build and start our server with the following steps: ## Creating the client -In this section, we'll look at creating a Node.js client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/node/route_guide/route_guide_client.js](https://github.com/grpc/grpc-common/blob/master/node/route_guide/route_guide_client.js). +In this section, we'll look at creating a Node.js client for our `RouteGuide` service. You can see our complete example client code in [examples/node/route_guide/route_guide_client.js](https://github.com/grpc/grpc/blob/master/examples/node/route_guide/route_guide_client.js). ### Creating a stub diff --git a/docs/tutorials/basic/objective-c.md b/docs/tutorials/basic/objective-c.md index 1f7b22c4..23f7dce2 100644 --- a/docs/tutorials/basic/objective-c.md +++ b/docs/tutorials/basic/objective-c.md @@ -28,16 +28,16 @@ gRPC and proto3 are specially suited for mobile clients: gRPC is implemented on ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/objective-c/route_guide](https://github.com/grpc/grpc-common/tree/master/objective-c/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [grpc/grpc/examples/objective-c/route_guide](https://github.com/grpc/grpc/tree/master/examples/objective-c/route_guide). To download the example, clone the `grpc` repository by running the following command: ``` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/objective-c/route_guide`: +Then change your current directory to `examples/objective-c/route_guide`: ``` -$ cd grpc-common/objective-c/route_guide +$ cd examples/objective-c/route_guide ``` Our example is a simple route mapping application that lets clients get information about features on their route, create a summary of their route, and exchange route information such as traffic updates with the server and other clients. @@ -73,7 +73,7 @@ The next sections guide you step-by-step through how this proto service is defin ## Defining the service -First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`examples/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -143,7 +143,7 @@ option objc_class_prefix = "RTG"; Next we need to generate the gRPC client interfaces from our .proto service definition. We do this using the protocol buffer compiler (`protoc`) with a special gRPC Objective-C plugin. -For simplicity, we've provided a [Podspec file](https://github.com/grpc/grpc-common/blob/master/objective-c/route_guide/RouteGuide.podspec) that runs `protoc` for you with the appropriate plugin, input, and output, and describes how to compile the generated files. You just need to run in this directory (`grpc-common/objective-c/route_guide`): +For simplicity, we've provided a [Podspec file](https://github.com/grpc/grpc/blob/master/examples/objective-c/route_guide/RouteGuide.podspec) that runs `protoc` for you with the appropriate plugin, input, and output, and describes how to compile the generated files. You just need to run in this directory (`examples/objective-c/route_guide`): ``` $ pod install @@ -173,7 +173,7 @@ You can also use the provided Podspec file to generate client code from any othe ## Creating the client -In this section, we'll look at creating an Objective-C client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/objective-c/route_guide/ViewControllers.m](https://github.com/grpc/grpc-common/blob/master/objective-c/route_guide/ViewControllers.m). (Note: In your apps, for maintainability and readability reasons, you shouldn't put all of your view controllers in a single file; it's done here only to simplify the learning process). +In this section, we'll look at creating an Objective-C client for our `RouteGuide` service. You can see our complete example client code in [examples/objective-c/route_guide/ViewControllers.m](https://github.com/grpc/grpc/blob/master/examples/objective-c/route_guide/ViewControllers.m). (Note: In your apps, for maintainability and readability reasons, you shouldn't put all of your view controllers in a single file; it's done here only to simplify the learning process). ### Constructing a client object diff --git a/docs/tutorials/basic/php.md b/docs/tutorials/basic/php.md index 550921c7..50f4ac4e 100644 --- a/docs/tutorials/basic/php.md +++ b/docs/tutorials/basic/php.md @@ -28,16 +28,16 @@ With gRPC you can define your service once in a .proto file and implement client ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/php/route_guide](https://github.com/grpc/grpc-common/tree/master/php/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [grpc/grpc/examples/php/route_guide](https://github.com/grpc/grpc/tree/master/examples/php/route_guide). To download the example, clone the `grpc` repository by running the following command: ``` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/php/route_guide`: +Then change your current directory to `examples/php/route_guide`: ``` -$ cd grpc-common/php/route_guide +$ cd examples/php/route_guide ``` Our example is a simple route mapping application that lets clients get information about features on their route, create a summary of their route, and exchange route information such as traffic updates with the server and other clients. @@ -69,7 +69,7 @@ The next sections guide you step-by-step through how this proto service is defin ## Defining the service -First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`examples/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -134,7 +134,7 @@ message Point { The PHP client stub implementation of the proto files can be generated by the [`protoc-gen-php`](https://github.com/datto/protobuf-php) tool. To install the tool: ```sh -$ cd grpc-common/php +$ cd examples/php $ php composer.phar install $ cd vendor/datto/protobuf-php $ gem install rake ronn @@ -166,7 +166,7 @@ The file contains: ## Creating the client -In this section, we'll look at creating a PHP client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/php/route_guide/route_guide_client.php](https://github.com/grpc/grpc-common/blob/master/php/route_guide/route_guide_client.php). +In this section, we'll look at creating a PHP client for our `RouteGuide` service. You can see our complete example client code in [examples/php/route_guide/route_guide_client.php](https://github.com/grpc/grpc/blob/master/examples/php/route_guide/route_guide_client.php). ### Constructing a client object diff --git a/docs/tutorials/basic/python.md b/docs/tutorials/basic/python.md index 3b3bee1c..fe03383e 100644 --- a/docs/tutorials/basic/python.md +++ b/docs/tutorials/basic/python.md @@ -27,23 +27,23 @@ With gRPC you can define your service once in a .proto file and implement client ## Example code and setup -The example code for this tutorial is in [grpc/grpc-common/python/route_guide](https://github.com/grpc/grpc-common/tree/master/python/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for this tutorial is in [grpc/grpc/examples/python/route_guide](https://github.com/grpc/grpc/tree/master/examples/python/route_guide). To download the example, clone the `grpc` repository by running the following command: ``` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/python/route_guide`: +Then change your current directory to `examples/python/route_guide`: ``` -$ cd grpc-common/python/route_guide +$ cd examples/python/route_guide ``` You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Python quick start guide](/docs/installation/python.html). ## Defining the service -Your first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +Your first step (as you'll know from the [Overview](/docs/index.html)) 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 [`examples/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -132,7 +132,7 @@ Creating and running a `RouteGuide` server breaks down into two work items: - Implementing the servicer interface generated from our service definition with functions that perform the actual "work" of the service. - Running a gRPC server to listen for requests from clients and transmit responses. -You can find the example `RouteGuide` server in [grpc-common/python/route_guide/route_guide_server.py](https://github.com/grpc/grpc-common/blob/master/python/route_guide/route_guide_server.py). +You can find the example `RouteGuide` server in [examples/python/route_guide/route_guide_server.py](https://github.com/grpc/grpc/blob/master/examples/python/route_guide/route_guide_server.py). ### Implementing RouteGuide @@ -239,7 +239,7 @@ Because `start()` does not block you may need to sleep-loop if there is nothing ## Creating the client -You can see the complete example client code in [grpc-common/python/route_guide/route_guide_client.py](https://github.com/grpc/grpc-common/blob/master/python/route_guide/route_guide_client.py). +You can see the complete example client code in [examples/python/route_guide/route_guide_client.py](https://github.com/grpc/grpc/blob/master/examples/python/route_guide/route_guide_client.py). ### Creating a stub diff --git a/docs/tutorials/basic/ruby.md b/docs/tutorials/basic/ruby.md index 4c45ddb8..6114552a 100644 --- a/docs/tutorials/basic/ruby.md +++ b/docs/tutorials/basic/ruby.md @@ -27,16 +27,16 @@ With gRPC we can define our service once in a .proto file and implement clients ## Example code and setup -The example code for our tutorial is in [grpc/grpc-common/ruby/route_guide](https://github.com/grpc/grpc-common/tree/master/ruby/route_guide). To download the example, clone the `grpc-common` repository by running the following command: +The example code for our tutorial is in [grpc/grpc/examples/ruby/route_guide](https://github.com/grpc/grpc/tree/master/examples/ruby/route_guide). To download the example, clone the `grpc` repository by running the following command: ``` -$ git clone https://github.com/grpc/grpc-common.git +$ git clone https://github.com/grpc/grpc.git ``` -Then change your current directory to `grpc-common/ruby/route_guide`: +Then change your current directory to `examples/ruby/route_guide`: ``` -$ cd grpc-common/ruby/route_guide +$ cd examples/ruby/route_guide ``` You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Ruby quick start guide](/docs/installation/ruby.html). @@ -44,7 +44,7 @@ You also should have the relevant tools installed to generate the server and cli ## Defining the service -Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto). +Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`examples/protos/route_guide.proto`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto). To define a service, you specify a named `service` in your .proto file: @@ -132,7 +132,7 @@ There are two parts to making our `RouteGuide` service do its job: - Implementing the service interface generated from our service definition: doing the actual "work" of our service. - Running a gRPC server to listen for requests from clients and return the service responses. -You can find our example `RouteGuide` server in [grpc-common/ruby/route_guide/route_guide_server.rb](https://github.com/grpc/grpc-common/blob/master/ruby/route_guide/route_guide_server.rb). Let's take a closer look at how it works. +You can find our example `RouteGuide` server in [examples/ruby/route_guide/route_guide_server.rb](https://github.com/grpc/grpc/blob/master/examples/ruby/route_guide/route_guide_server.rb). Let's take a closer look at how it works. ### Implementing RouteGuide @@ -215,7 +215,7 @@ As you can see, we build and start our server using a `GRPC::RpcServer`. To do t ## Creating the client -In this section, we'll look at creating a Ruby client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/ruby/route_guide/route_guide_client.rb](https://github.com/grpc/grpc-common/blob/master/ruby/route_guide/route_guide_client.rb). +In this section, we'll look at creating a Ruby client for our `RouteGuide` service. You can see our complete example client code in [examples/ruby/route_guide/route_guide_client.rb](https://github.com/grpc/grpc/blob/master/examples/ruby/route_guide/route_guide_client.rb). ### Creating a stub @@ -285,19 +285,19 @@ Although it's not shown well by this example, each enumerable is independent of Build client and server: ``` -$ # from grpc-common/ruby +$ # from examples/ruby $ gem install bundler && bundle install ``` Run the server, which will listen on port 50051: ``` -$ # from grpc-common/ruby +$ # from examples/ruby $ bundle exec route_guide/route_guide_server.rb ../node/route_guide/route_guide_db.json & ``` Run the client (in a different terminal): ``` -$ # from grpc-common/ruby +$ # from examples/ruby $ bundle exec route_guide/route_guide_client.rb ../node/route_guide/route_guide_db.json & ``` diff --git a/faq/index.html b/faq/index.html index 7d3253c6..d469809f 100644 --- a/faq/index.html +++ b/faq/index.html @@ -41,7 +41,7 @@

How can I contribute?

Contributors are highly welcome and the repositories are hosted on GitHub. We look forward to community feedback, additions and bugs. Both individual contributors and corporate contributors need to sign our CLA.

Where is the documentation?

-

The documentation is on GitHub in the gRPC-common repository.

+

The documentation is on GitHub in the gRPC repository.

What is the roadmap?

The roadmap is being tracked in GitHub milestones. Please refer to the respective milestones in the gRPC, gRPC-java and gRPC-go repositories under the GitHub gRPC org.