Skip to content

Instantly share code, notes, and snippets.

@peijiehu
Last active October 21, 2017 16:40
Show Gist options
  • Save peijiehu/7743fb61038fb8577b75a4d3685bc728 to your computer and use it in GitHub Desktop.
Save peijiehu/7743fb61038fb8577b75a4d3685bc728 to your computer and use it in GitHub Desktop.

Curated Distributed Computing Concepts

Introduction

RPC

https://en.wikipedia.org/wiki/Remote_procedure_call

RPC is a request-response protocol.

In micro-service architecture, we often refer to inter-service communications as RPC - calling it HTTP calls is too specific. For example, XML-RPC(or JSON-RPC) is a remote procedure call (RPC) protocol which uses XML(or JSON) to encode its calls and HTTP as a transport mechanism. In my understanding, RPC is calling and using remote objects and functions as if they were local.

Implementations: Java RMI, RPyC https://www.ibm.com/developerworks/linux/library/l-rpyc/

Apache Thrift provides cross-language RPC without boilerplate. http://thrift.apache.org/

Apache Avro provides RPC where client and server exchange schemas in the connection handshake and code generation is not required.

https://en.wikipedia.org/wiki/Apache_Avro

Avro schema is defined in JSON.

RPC vs REST

REST is an architecture, a structured way of representing a software solution - specifically, exposing aspects of a solution to a set of remote client-consumers. The central tenet of REST is that these aspects of a solution can be modeled as resources which the client can consume or act upon. This resource-oriented thinking, and not the implementation details of how one communicates between client and server, is what REST is actually all about. This is the key difference that separates actual RESTful APIs from RPC based on HTTP verbs.

Examples: https://sites.google.com/site/wagingguerillasoftware/rest-series/what-is-restful-rest-vs-rpc

REST is resource-oriented while RPS is more about actions.

TODO

Curate https://github.com/theanalyst/awesome-distributed-systems

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