mohanraj-r
1/27/2017 - 11:13 PM

Spike - Transport mechanisms

Spike - Transport mechanisms

Spike - Transport mechanisms

grpc

  • clients can specify a timeout DEADLINE
  • clients can provide METADATA that is opaque to gRPC itself
  • "Note that in gRPC-Go, RPCs operate in a blocking/synchronous mode, which means that the RPC call waits for the server to respond, and will either return a response or an error."
  • "We also pass a context.Context object which lets us change our RPC’s behaviour if necessary, such as time-out/cancel an RPC in flight."
  • "gRPC Go recently acquired support for Interceptors, i.e. middleware that is executed either on the gRPC Server before the request is passed onto the user's application logic, or on the gRPC client either around the user call. It is a perfect way to implement common patters: auth, logging, message, validation, retries or monitoring. These are generic building blocks that make it easy to build multiple microservices easily. The purpose of this repository is to act as a go-to point for such reusable functionality. It contains some of them itself, but also will link to useful external repos."

JSON gateways / proxies

Reference

rpc - The Go Programming Language

  • Package rpc provides access to the exported methods of an object across a network or other I/O connection.
  • gob - The Go Programming Language
    • Package gob manages streams of gobs - binary values exchanged between an Encoder (transmitter) and a Decoder (receiver). A typical use is transporting arguments and results of remote procedure calls (RPCs) such as those provided by package "net/rpc".
    • Gobs of data - The Go Blog

Protocol buffers

Overview

protobuf/third_party.md at master · google/protobuf

Cap'n Proto: Introduction

Protobuff vs Thrift vs JSON

TODO

  • RPC vs REST
  • Benchmark HTTP2 streaming for large results