Slide 1

Slide 1 text

APACHE THRIFT *thrift has no logo

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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.

Slide 4

Slide 4 text

INTERFACE DEFINITION LANGUAGE (IDL) • API specification • message specification • message validation • strongly typed • used to generate stubs and skeletons

Slide 5

Slide 5 text

DATA STRUCTURES • Types: bool, byte, i16, i32, i64, double, string • Containers: • list - ordered list, may contain duplicates • set - unordered set of unique elements • map - map of unique keys of type t1 to values of type t2 • Structs - grouping related items together - translate to classes

Slide 6

Slide 6 text

THRIFT PROCESS • define a .thrift file (interface definition, types, services) • use a thrift compiler to generate our source code • add additional client/server functionality

Slide 7

Slide 7 text

DEMO / TUTORIAL http://thrift.apache.org/tutorial/ https://github.com/foursquare/twofishes/tree/master/ interface/src/main/thrift

Slide 8

Slide 8 text

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