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

Added multiple proxies interoperability #217

Merged
merged 3 commits into from
Aug 4, 2018

Conversation

stanley-cheung
Copy link
Collaborator

  1. Added multiple proxies interoperabilty
    • Envoy, Nginx, GrpcWebProxy
  2. Added "binary" mode to client. So the client can be configured in 2 different ways now. See spec for details.
    • Default: Content-Type: application/grpc-web-text
      • Pass in mode=grpcwebtext in the code generator
      • Payload are base64-encoded for both requests and responses
      • Support unary and server streaming calls.
    • Binary: Content-Type: application/grpc-web+proto
      • Pass in mode=grpcweb in the code generator
      • Payload are in binary protobuf format
      • Only unary calls are supported for now.

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.

So pleased to finally see this interoperability done! Well done! This affects #91.

RUN go get -v -u github.com/golang/dep/cmd/dep
RUN go get -v github.com/improbable-eng/grpc-web/go/grpcwebproxy ; exit 0
RUN cd src/github.com/improbable-eng/grpc-web && dep ensure
RUN go get -v -u github.com/improbable-eng/grpc-web/go/grpcwebproxy
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should download a released version rather than just using go get.

https://github.com/improbable-eng/grpc-web/archive/0.6.2.tar.gz

Then download dep and run dep ensure as done here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry wasn't very familiar with go get. Tried a bit just now and couldn't get it to work. Can you show me an example on how that's done?

I tried to download the tarball. Untar it. Which directory should I be running dep ensure from? Do I need another go get command after that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

A complete installation would be:

# Install stable dep
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# Install stable proxy
wget https://github.com/improbable-eng/grpc-web/archive/0.6.2.tar.gz
tar xfv 0.6.2.tar.gz /go/src/github.com/improbable-eng/
cd /go/src/github.com/improbable-eng/grpc-web
dep ensure --vendor-only
# Build and install into /go/bin/grpcwebproxy
go install ./go/grpcwebproxy

Something like this. I haven't tried it, just writing from memory, but shouldn't be far off.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! I made the change and that seems to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants