Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Apache Thrift

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

Miha Rekar

February 17, 2015
Tweet

More Decks by Miha Rekar

Other Decks in Programming

Transcript

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

    • interface definition language • code generator • service framework • Facebook -> Apache
  2. 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.
  3. INTERFACE DEFINITION LANGUAGE (IDL) • API specification • message specification

    • message validation • strongly typed • used to generate stubs and skeletons
  4. 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
  5. THRIFT PROCESS • define a .thrift file (interface definition, types,

    services) • use a thrift compiler to generate our source code • add additional client/server functionality
  6. 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