Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #60 from stanley-cheung/update_grpc_common_ref
Browse files Browse the repository at this point in the history
Replace grpc-common references with the new examples locations
  • Loading branch information
hsaliak committed Aug 31, 2015
2 parents d825579 + 8c233e2 commit 4d91cc9
Show file tree
Hide file tree
Showing 18 changed files with 160 additions and 160 deletions.
130 changes: 65 additions & 65 deletions docs/index.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/installation/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
```


Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/installation/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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

- Build the solution (this will automatically download NuGet dependencies)

**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).

Expand Down
10 changes: 5 additions & 5 deletions docs/installation/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

6 changes: 3 additions & 3 deletions docs/installation/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -33,7 +33,7 @@ Install
- Install this package's dependencies

```sh
$ cd grpc-common/node
$ cd examples/node
$ npm install
```

Expand All @@ -57,7 +57,7 @@ Try it!
Note
----

The <a href="https://github.com/grpc/grpc-common/tree/master/node">grpc-common/node</a> directory has its own copy of `helloworld.proto` because it currently depends on
The <a href="https://github.com/grpc/grpc/tree/master/examples/node">examples/node</a> 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
Expand Down
12 changes: 6 additions & 6 deletions docs/installation/objective-c.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
10 changes: 5 additions & 5 deletions docs/installation/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
```

Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions docs/installation/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:

Expand All @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions docs/installation/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
16 changes: 8 additions & 8 deletions docs/tutorials/basic/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ 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).


## 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:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -250,7 +250,7 @@ As you can see, we build and start our server using a `ServerBuilder`. To do thi
<a name="client"></a>
## 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

Expand Down
16 changes: 8 additions & 8 deletions docs/tutorials/basic/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -307,7 +307,7 @@ As you can see, we build and start our server using `Grpc.Core.Server` class. To
<a name="client"></a>
## 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

Expand Down Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/basic/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Loading

0 comments on commit 4d91cc9

Please sign in to comment.