Skip to content
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

[GSoD 2020] Added tutorials directory on gRPC-Gateway #1829

Merged
merged 19 commits into from
Dec 1, 2020
Merged

[GSoD 2020] Added tutorials directory on gRPC-Gateway #1829

merged 19 commits into from
Dec 1, 2020

Conversation

iamrajiv
Copy link
Contributor

Added tutorials directory on gRPC-Gateway.

@google-cla google-cla bot added the cla: yes label Nov 19, 2020
@iamrajiv iamrajiv closed this Nov 19, 2020
@iamrajiv iamrajiv reopened this Nov 19, 2020
@iamrajiv iamrajiv closed this Nov 19, 2020
@iamrajiv iamrajiv reopened this Nov 19, 2020
@iamrajiv iamrajiv closed this Nov 19, 2020
@iamrajiv iamrajiv reopened this Nov 19, 2020
@iamrajiv iamrajiv closed this Nov 20, 2020
@iamrajiv iamrajiv reopened this Nov 20, 2020
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together Rajiv. It's a bit of a mess right now, but I'm sure we can polish it into something useful for users. I propose the following overarching changes:

  1. Add a new introductory page that talks about what the grpc-gateway is, and what the goal of the tutorial is (build a basic gRPC server in Go with the gRPC-gateway proxying JSON/HTTP requests). Tell the user how to install protoc-gen-go and protoc-gen-go-grpc. Show the basic protofile that we're going to use helloworld/hello_world.proto.
  2. Make another pass over using_buf.md and using_protoc.md, given the new introductory page (e.g. the buf document should talk about a helloworld protobuf root, the protoc generation commands must be relative to this root). Make both of these consistent around the core parts here: How to install the generator (buf/protoc) and how to generate the stubs once you've installed it.
  3. Add a new page that introduces how we add the http.proto annotations to the existing hello_world.proto, and how to install the grpc-gateway generators (only talk about protoc-gen-grpc-gateway, I don't think we need to talk about openapiv2 in this tutorial). This should also include how to modify your protoc or buf generation workflows to generate grpc-gateway stubs. This also has to include copying the "vendored" protobuf files from the grpc-gateway repository into the protobuf file hierarchy (like the boilerplate repo has).
  4. Finally, wrap up with a link to the boilerplate repo main.go that shows how to include the grpc-gateway in the Go server. Add the curl commands to this page and talk about what happens when the JSON hits the gateway.

How does that sound?

docs/docs/tutorials/Generating stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/basic_protos.md Outdated Show resolved Hide resolved
docs/docs/tutorials/basic_protos.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the first set of changes. I think it's starting to become a bit more clear what we need:

  1. The introductory page, which includes the prerequities. This is basically done (needs an intro).
  2. The page introducing hello_world.proto.
  3. The buf/protoc generation sections. These are pretty good now but need to be updated to refer to hello_world.proto
  4. The Go main.go for a basic gRPC server.
  5. The page adding the http annotations, copying the grpc-gateway proto files and updating the generation step to include the grpc-gateway generator.
  6. Finally a page talking about how to update main.go and the section on how to test that it is working.
  7. The last page is the "Learn more" page we already have, we may end up tweaking it a little bit more towards the end but it's pretty good as it is.

How does that sound?

docs/docs/tutorials/Generating stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/Generating stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/prerequisites.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting closer 😄. Something I feel is still missing is a consistency in these pages. When I make suggestions, they are broad suggestions, not to be followed with literally no adjustment. Please go over each page after you make the changes and use your personal judgement to make sure the content on the page makes sense. I want you to be writing this, not me, I am just here to guide towards the final product that we maintainers want to see. Thanks!

docs/docs/tutorials/adding_annotations.md Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/basic_protos.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/learn_more.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_protoc.md Outdated Show resolved Hide resolved
docs/docs/tutorials/learn_more.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/introduction.md Show resolved Hide resolved
docs/docs/tutorials/introduction.md Outdated Show resolved Hide resolved
docs/docs/tutorials/simple_hello_world.md Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting very close now!

docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/index.md Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_buf.md Outdated Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/learn_more.md Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/adding_annotations.md Outdated Show resolved Hide resolved
docs/docs/tutorials/creating_main.go.md Outdated Show resolved Hide resolved
docs/docs/tutorials/learn_more.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, next round this should be ready to merge!

docs/docs/tutorials/simple_hello_world.md Outdated Show resolved Hide resolved
docs/docs/tutorials/generating_stubs/using_buf.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, let's get this tutorial merged!

@johanbrandhorst johanbrandhorst merged commit 806c563 into grpc-ecosystem:master Dec 1, 2020
@iamrajiv iamrajiv changed the title [GSoD] Added tutorials directory on gRPC-Gateway [GSoD 2020] Added tutorials directory on gRPC-Gateway May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants