Thrift#001#参考图书及资料

Thrift是一个可扩展、跨语言的服务开发框架。它使用代码生成引擎,形成了一个可以高效和无缝连接Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, and OCaml等语言的开发栈。

Thrift使用IDL描述语言来定义软件服务,并经过它的编译器将IDL服务翻译成骨架文件以及通信协议代码。它通常被当作一个远程过程调用(RPC)框架来使用,是由Facebook为“大规模跨语言服务开发”而开发的。

主要特性如下:

  • interface description language - Everything is specified in an IDL file from which bindings for many languages can be generated.
  • language bindings - Thrift is supported in many languages and environments
  • namespaces - Each Thrift file is in its own namespace allowing you to use the same identifier in multiple Thrift files
  • language namespaces - Per Thrift file you can specify which namespace should be used for each programming language
  • base types - Thrift has a small set of base types. See Thrift Types
  • constants and enumerations - Constant values can be assigned logical names
  • structs - Use structs to group related data. Structs can have fields of any type. See Thrift Types
  • sparse structs - Optional base fields that have not been set and reference fields that are null will not be sent across the wire
  • struct evolution - The addition and removal of fields is handled without breaking existing clients by using integer identifiers for fields
  • containers - You can use sets, lists and maps of any type: base types, structs and other containers. See Thrift Types
  • type definitions - Any type can be given a name that better describes it
  • services - A service is a group of functions
  • service inheritance - Subservices implement all functions of their base services and can have additional functions
  • asynchronous invocations - Functions that do not return a result can be invoked asynchronously so the client is not blocked until the server has finished processing the request. The server may execute asynchronous * invocations of the same client in parallel/out of order
  • exceptions - If an error occurs a function can throw a standard or user-defined exception. See Thrift Types
  • cyclic structs - Starting with version 0.9.2, Thrift supports structs that contain themselves, or other structs to be declared later.

0x01 参考图书

书名ISBN作者出版社出版日期备注
Learning Apache Thrift9781785882746Krzysztof RakowskiPackt Publishing2015-12-01P
Programmer’s Guide to Apache Thrift9781617296161Randy AbernethyManning Publications2018-12-01P

白皮书

https://thrift.apache.org/static/files/thrift-20070401.pdf

To learn more about Apache Thrift Read the Whitepaper

Thrift: The Missing Guide

https://diwakergupta.github.io/thrift-missing-guide/

https://diwakergupta.github.io/thrift-missing-guide/thrift.pdf

Programmer’s Guide to Apache Thrift

https://github.com/RandyAbernethy/ThriftBook

0x02 参考网站

  • 官网
地址说明
https://thrift.apache.orgApache Thrift官方网站,包括代码下载、开发资料以及最新资讯等
https://github.com/apache/thriftApache Thrift Git
https://thrift.apache.org/download最新版本下载
https://archive.apache.org/dist/thrift历史版本下载
https://thrift.apache.org/docs官方资料
https://thrift.apache.org/docs/Languages.htmlApache Thrift支持的开发语言以及特性矩阵
https://thrift.apache.org/docs/features.htmlApache Thrift特性
  • 其他网站

https://keepalive555.github.io/2017/04/01/Thrift%E6%95%99%E7%A8%8B/