
Learn gRPC in a weekend - C++ / Golang
Recently at GopherCon 2017, I attended an excellent talk by Alan Shreve on gRPC. At first I was surprised at how popular the subject was, but in retrospect, I see how it totally fits with the purpose of Go — high performance network services. Based on that talk, I plan on investigating gRPC’s middleware concept, the interceptor. That will allow easier logging and authentication.
To any other gRPC-curious:
In the meantime, if you are curious about learning gRPC, it took me a 20-hour weekend to learn gRPC and generate this sample project.
Prior to gRPC, I always used JSON-RPC and it’s been good enough. However, performance-wise, the gains over JSON are considerable on local networks. Outside of performance, it also handles the issues of holding or creating a connection, bidirectional traffic, while giving reasonably portable, typed message structures.
… the JavaScript disappointment
Notice that the example is Golang and C++ here using ncurses. I like ncurses, but really I would rather have displayed all this in a browser. When I started reading about gRPC, one of the selling points is the big list of language bindings. Use it Python, Ruby, Java, you name it, including Node.js. I immediately interpreted Node.js to mean “JavaScript”. Sorry, in summer 2017, gRPC does not work in a browser. However, I’ll be watching gRPC-Web.
