Skip to content

HTTP over gRPC: encode HTTP requests as gRPC requests #235

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

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

tomwilkie
Copy link
Contributor

@tomwilkie tomwilkie commented Jan 24, 2017

Why? Want to use gRPC for everything, as it make propagating context, load balacing and connection persisting easier than using raw HTTP.

By embedding HTTP in gRPC, we have a migration path, and a way for authfe to no have to know how to forward requests for every service type.

See weaveworks/common#10 for the PR to add this to common, which should go in first.

@tomwilkie tomwilkie self-assigned this Jan 24, 2017
@tomwilkie tomwilkie mentioned this pull request Jan 24, 2017
26 tasks
}
req = req.WithContext(ctx)
req.Header = toHeader(r.Headers)
recorder := httptest.NewRecorder()
Copy link
Contributor

Choose a reason for hiding this comment

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

Smart!

@juliusv
Copy link
Contributor

juliusv commented Jan 24, 2017

👍 crazy stuff.

@tomwilkie tomwilkie force-pushed the http-over-grpc branch 2 times, most recently from c96a023 to d1758d0 Compare January 25, 2017 21:00
@tomwilkie tomwilkie changed the title [WIP] HTTP over gRPC: encode HTTP requests as gRPC requests HTTP over gRPC: encode HTTP requests as gRPC requests Jan 25, 2017
@tomwilkie tomwilkie removed their assignment Jan 25, 2017
    Why? Want to use gRPC for everything, as it make propagating context, load balacing and connection persisting easier than using raw HTTP.

    By embedding HTTP in gRPC, we have a migration path, and a way for authfe to no have to know how to forward requests for every service type.

    Also, move user context code and grpc middleware to weaveworks/common, remove scope vendoring.
@tomwilkie tomwilkie merged commit 7846dd7 into master Jan 26, 2017
@tomwilkie tomwilkie deleted the http-over-grpc branch January 26, 2017 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants