Apache Thrift

5a5fcbae333f071dc7a28f4958509db5?s=47 Miha Rekar
February 17, 2015

Apache Thrift

Short tech talk I did for my coworkers on Apache Thrift and then later at my local Ruby User Group.

You can watch me present it here: https://www.youtube.com/watch?v=XnreZtC87do

Further read:
- Thrift Homepage:
 http://thrift.apache.org/
- Thrift the Missing Guide: 
http://diwakergupta.github.io/thrift-missing-guide/
- Ruby Conf 2013 - A Lightweight SOA Framework using Ruby, Apache Thrift and AMQP: 
https://www.youtube.com/watch?v=HTVoQ6_iVuc

5a5fcbae333f071dc7a28f4958509db5?s=128

Miha Rekar

February 17, 2015
Tweet

Transcript

  1. APACHE THRIFT *thrift has no logo

  2. WHAT IS THRIFT? • language independent • binary communication protocol

    • interface definition language • code generator • service framework • Facebook -> Apache
  3. WHAT IS THRIFT? • language independent • binary communication protocol

    • interface definition language • code generator • service framework • Facebook -> Apache The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
  4. INTERFACE DEFINITION LANGUAGE (IDL) • API specification • message specification

    • message validation • strongly typed • used to generate stubs and skeletons
  5. DATA STRUCTURES • Types: bool, byte, i16, i32, i64, double,

    string • Containers: • list<t1> - ordered list, may contain duplicates • set<t1> - unordered set of unique elements • map<t1,t2> - map of unique keys of type t1 to values of type t2 • Structs - grouping related items together - translate to classes
  6. THRIFT PROCESS • define a .thrift file (interface definition, types,

    services) • use a thrift compiler to generate our source code • add additional client/server functionality
  7. DEMO / TUTORIAL http://thrift.apache.org/tutorial/ https://github.com/foursquare/twofishes/tree/master/ interface/src/main/thrift

  8. FURTHER READ • Thrift Homepage:
 http://thrift.apache.org/ • Thrift the Missing

    Guide:
 http://diwakergupta.github.io/thrift-missing- guide/ • Ruby Conf 2013 - A Lightweight SOA Framework using Ruby, Apache Thrift and AMQP:
 https://www.youtube.com/watch?v=HTVoQ6_iVuc