gRPC — cross-platform open source RPC over HTTP/2

Collaborating with Google on open sourcing gRPC

Square Engineering
Feb 26, 2015 · 2 min read

Written by Manik Surtani.

Heads up, we’ve moved! If you’d like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog

Several months ago, we evaluated open sourcing our proprietary, internal RPC library (which is based on protocol buffers). Along the way, we also decided to move this framework to HTTP/2. Luckily before putting forth too much effort, we learned Google was attempting to open source something similar — and was much further along. We paused our efforts and reached out to Google to see how we could help.

Google looped us in, and we got involved with gRPC, an open source (BSD-licensed) cross-platform library for making remote procedure calls. (This is useful for both client-server communications as well as server-server communications in a microservice architecture.) It’s been a fun process discussing designs, playing with an early implementation, and collaborating to open source gRPC.

You may be thinking, “Another RPC library? What’s wrong with JSON-over-REST?” Well, nothing — except that binary protocols have inherent benefits in terms of bandwidth and CPU efficiency, type safety, and memory footprint. Also, building on top of the recently finalized HTTP/2 specification gives us bidirectional streaming, multiplexed connections, flow control, and header compression.

gRPC is cross-platform too with support for C, C++, Java, Go, Node.js, Python, and Ruby, with libraries for Objective-C, PHP, and C# being planned.

The project is run completely in the open with upstream master repositories on GitHub. Communications (IRC, Google Group) and documentation is all open and public. Please tag StackOverflow questions with “grpc”.

Google blogged about this release too.

We’d love to hear your thoughts on gRPC. Contribute by forking and submitting pull requests, chat with us, and follow @grpcio.

Cheers
Manik

Square Corner Blog

Buying and selling sound like simple things - and they…

Square Engineering

Written by

The official account for @Square Engineering.

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Square Engineering

Written by

The official account for @Square Engineering.

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store