-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul of top-level .md files #15802
Overhaul of top-level .md files #15802
Conversation
|
@carl-mastrangelo @hcaseyal @srini100 you all have recently dealt with c-core repo as newcomers. Comments are welcome! |
|
|
CONCEPTS.md
Outdated
## Interface | ||
|
||
|
||
Developers using gRPC typically start with the description of an RPC service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: run on sentence. Would you consider:
Developers using gRPC start with the description of an RPC service (a collection of methods), and generate client and server side interfaces. The server implements the service interface, which can be remotely invoked by the client interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for carl's suggestion. Although I'd say to add the "typically" back in if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONCEPTS.md
Outdated
### Surface API | ||
Starting from an interface definition in a .proto file, gRPC provides | ||
Protocol Compiler plugins that generate Client- and Server-side APIs. | ||
gRPC users typically call into these APIs on the Client side and implement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would make these statements stronger, and thus avoid words like "typically". While technically correct, I would claim that a reader of this page is looking to be told what to do. Once they are more comfortable with gRPC they can branch out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONCEPTS.md
Outdated
fleshing out the details of each of the required operations. | ||
|
||
## Abstract gRPC protocol | ||
A gRPC RPC comprises of a bidirectional stream of messages, initiated by the client. In the client-to-server direction, this stream begins with a mandatory `Call Header`, followed by optional `Initial-Metadata`, followed by zero or more `Payload Messages`. The server-to-client direction contains an optional `Initial-Metadata`, followed by zero or more `Payload Messages` terminated with a mandatory `Status` and optional `Status-Metadata` (a.k.a.,`Trailing-Metadata`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You used gRPC Call
above, and gRPC RPC
here. I prefer the former, but I think being consistent is more important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONCEPTS.md
Outdated
The abstract protocol defined above is implemented over [HTTP/2](https://http2.github.io/). gRPC bidirectional streams are mapped to HTTP/2 streams. The contents of `Call Header` and `Initial Metadata` are sent as HTTP/2 headers and subject to HPACK compression. `Payload Messages` are serialized into a byte stream of length prefixed gRPC frames which are then fragmented into HTTP/2 frames at the sender and reassembled at the receiver. `Status` and `Trailing-Metadata` are sent as HTTP/2 trailing headers (a.k.a., trailers). | ||
|
||
## Flow Control | ||
gRPC inherits the flow control mechanisms in HTTP/2 and uses them to enable fine-grained control of the amount of memory used for buffering in-flight messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run on sentence. Perhaps:
gRPC uses the flow control mechanism in HTTP/2. This enables fine-grained control of memory used for buffering in-flight messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
=================================== | ||
|
||
gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. It enables client and server applications to communicate transparently, and makes it easier to build connected systems. | ||
|
||
<table> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: I believe markdown supports tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving as is, this snippet is copied from grpc-java repo: https://raw.githubusercontent.com/grpc/grpc-java/master/README.md
README.md
Outdated
|
||
You can find per-language quickstart guides and tutorials in [Documentation section on grpc.io website](https://grpc.io/docs/). The code examples are available in the [examples](examples) directory. | ||
|
||
# To start developing gRPC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section should be in CONTRIBUTING.md right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the info to CONTRIBUTING.md
README.md
Outdated
First of all, please refer to the documentation under the `src/YOUR_LANGUAGE` directory for any language-specific instructions on how to build and how to setup your | ||
development environment. | ||
|
||
Different languages use different build systems. To hide the complexity of needing to build with many different build systems, we provide a portable python script that unifies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: avoid first-person, unless it's done consistently. I, we, us, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
README.md
Outdated
instructions | ||
- Run | ||
``` | ||
python tools/run_tests/run_tests.py -l YOUR_LANGUAGE --build_only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs several dependencies no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I was able to use the run_tests.py script for building on a fresh GCE instance (Debian 9) without installing any extra python module (we recently removed the implicit dependency on google-api-client-python).
But I agree in general, let's check if any more dependencies are needed and add them to the docs - I was planning to do one more pass once restructuring the .md files is done.
src/cpp/README.md
Outdated
- via cmake's `ExternalProject_Add` using a technique called "superbuild". [Example](../../examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt) | ||
- add gRPC source tree to your project (preferrably as a git submodule) and add it to your cmake project with `add_subdirectory`. [Example](../../examples/cpp/helloworld/CMakeLists.txt) | ||
|
||
## bazel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If bazel is recommended, it should be on the top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted some preliminary comments, but I will be reviewing the rest of the docs in the near future. Hope they're helpful!
BUILDING.md
Outdated
From the grpc repository root | ||
```sh | ||
$ make | ||
# WARNING: make doesn't provide an easy way to uninstall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide some context for this warning? If I were someone new to grpc, I may not know why I should be concerned that "make doesn't provide an easy way to uninstall." Is this a situation where if a user needs to be able to easily uninstall grpc, they should use bazel instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up q; I thought we do support make uninstall
, is that not a sufficient uninstall? Might be work clarifying, because this comment, as is, is a little scary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make uninstall
doesn't exist (and to be honest it would be pretty hard to implement, the right solution for uninstalling is to rely on a build system / package manager that has proper support for installing/uninstalling dependencies - I'm hoping we will get there soon).
I agree that more careful wording (and more detailed explanation) would be necessary for the warning. For now, I removed the comment and also the make install
line as this document is about how to build (more info on installation is in src/cpp/README.md)
|
||
# Build from source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide a brief introduction here that explains why these different build options exist? E.g., when would someone use make vs. bazel? Can bazel be used on all systems? I could envision a new user being confused about which of these options they should choose (or if they need to run a subset of these options).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this would be useful. For now, I provided some basic info about why we support multiple build systems, we can elaborate on this in a followup PR (please see my general comment about merging this PR and iterating).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intro you provided is sufficient 👍 There is a typo though (should be "would work for all...")
CONCEPTS.md
Outdated
## Interface | ||
|
||
|
||
Developers using gRPC typically start with the description of an RPC service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for carl's suggestion. Although I'd say to add the "typically" back in if necessary.
CONCEPTS.md
Outdated
and the structure of the payload messages. It is possible to use other | ||
alternatives if desired. | ||
|
||
### Surface API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I were someone completely new to grpc, I'd have no idea why this section is titled "Surface API." I'd ask, "What is the non-surface API? What is surface?" I'd probably understand eventually, but providing a clearer indication of what is meant by "surface api" would be great. E.g., Surface API (Client- and Server-side APIs).
Looking at this more, I think the problem is in the structure of the topic sentence below. Although the title of this section introduces a potentially new concept, Surface API, the topic sentence begins with other new concepts, and it's not immediately clear how it relates to surface API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the section title, sg?
|
1 similar comment
|
|
1 similar comment
|
|
1 similar comment
|
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome
BUILDING.md
Outdated
From the grpc repository root | ||
```sh | ||
$ make | ||
# WARNING: make doesn't provide an easy way to uninstall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up q; I thought we do support make uninstall
, is that not a sufficient uninstall? Might be work clarifying, because this comment, as is, is a little scary
> powershell git clone --recursive -b ((New-Object System.Net.WebClient).DownloadString(\"https://grpc.io/release\").Trim()) https://github.com/grpc/grpc | ||
> cd grpc | ||
> @rem To update submodules at later time, run "git submodule update --init" | ||
bazel build :all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to our doc or a bazel doc on how to get this dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg, let's do this in a followup PR? (see my comment #15802 (comment))
|
||
## Interface | ||
|
||
Developers using gRPC start with the description of an RPC service (a collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. start with a language agnostic description of an RPC service ...
## Interface | ||
|
||
Developers using gRPC start with the description of an RPC service (a collection | ||
of methods), and generate client and server side interfaces. The server implements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... methods). From this description, gRPC will generate client and server side interfaces in any of our supported languages. The server...
|
||
gRPC supports streaming semantics, where either the client or the server (or both) | ||
send a stream of messages on a single RPC call. The most general case is | ||
Bidirectional Streaming where a single gRPC call establishes a stream where both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitl change the second where to in which
clients and servers. A concrete embedding over HTTP/2 completes the picture by | ||
fleshing out the details of each of the required operations. | ||
|
||
## Abstract gRPC protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point this needs its own doc with the same level of detail that PROTOCOL-HTTP2 has...
|
||
## Implementation over HTTP/2 | ||
The abstract protocol defined above is implemented over [HTTP/2](https://http2.github.io/). gRPC bidirectional streams are mapped to HTTP/2 streams. The contents of `Call Header` and `Initial Metadata` are sent as HTTP/2 headers and subject to HPACK compression. `Payload Messages` are serialized into a byte stream of length prefixed gRPC frames which are then fragmented into HTTP/2 frames at the sender and reassembled at the receiver. `Status` and `Trailing-Metadata` are sent as HTTP/2 trailing headers (a.k.a., trailers). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth mentioning the http web protocol here?
@@ -1,24 +1,79 @@ | |||
[gRPC - An RPC library and framework](http://github.com/grpc/grpc) | |||
gRPC - An RPC library and framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; I think it would look better if we capitalized the L and F
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will leave as is because grpc-java also uses lowercase.
https://github.com/grpc/grpc-java/blob/3a58a9999e33452268d831da8c9ab61f533380b4/README.md
|
1 similar comment
|
|
1 similar comment
|
Thanks everyone for great comments! I think all of the comments are very useful and I definitely plan to incorporate them, but my worries is that this PR is getting very bloated and the comment thread will be super long.
Can we get this PR reviewed (and merged) quickly and then continue improving individual .md files separately? That will lead to smaller PRs and better overall productivity IMHO. We will also be able to split the work among more people if we wanted to. |
|
|
|
2 similar comments
|
|
@jtattermusch SGTM Also LGTM. |
3c81708
to
f389e52
Compare
I squashed the commits and I'm going to merge as soon as the required tests pass. Remaining comments will be addresses in followup PRs. |
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left a few more wording suggestions and nits that can be addressed in the other PR
|
||
# Build from source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intro you provided is sufficient 👍 There is a typo though (should be "would work for all...")
script that unifies the experience of building and testing gRPC in different | ||
languages and on different platforms is provided. | ||
|
||
To build gRPC in the language of choice (e.g. `c++`, `csharp`, `php`, `python`, `ruby`, ...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add colon at the end of this line
languages and on different platforms is provided. | ||
|
||
To build gRPC in the language of choice (e.g. `c++`, `csharp`, `php`, `python`, `ruby`, ...) | ||
- Prepare you development environment based on language-specific instructions in `src/YOUR-LANGUAGE` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"you" should be "your"
To build gRPC in the language of choice (e.g. `c++`, `csharp`, `php`, `python`, `ruby`, ...) | ||
- Prepare you development environment based on language-specific instructions in `src/YOUR-LANGUAGE` directory. | ||
- The language-specific instructions might involve installing C/C++ prerequisites listed in | ||
[Building gRPC C++: Prerequisites](BUILDING.md#pre-requisites) as gRPC implementations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence takes a couple of reads to parse. I would break it up: "The language-specific instructions might involve installing C/C++ prerequisites listed in Building gRPC C++: Prerequisites. This is because gRPC implementations in this repository are using the native gRPC "core" library internally."
``` | ||
|
||
You can also run `python tools/run_tests/run_tests.py --help` to discover useful command line flags supported. For more details, | ||
see [tools/run_tests](tools/run_tests) where you will also find guidance on how to run various other test suites (e.g. interop tests, benchmarks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period missing at the end of this sentence.
restructure top-level README.md, INSTALL.md
I'm planning to make a few more changes in a followup PR (improvements for contributing.md, test out the prerequisites list, ...)