Álex González - Python and Scala smoke the peace pipe

published May 10, 2013

Álex González talks about Python and Scala, at PyGrunn.

ay Python conference in Groningen, The Netherlands.

Thrift is an interface definition language. You can use to work with several languages at the same time. It gives you basic types, transport, protocol, versioning, processors (input, output).

It helps for example your Python client talk to the Scala server or the other way around.

Types: bool, byte, several integers, string, struct. Also containers: list, set, map (dict in Python). An exception, services (for example a method).


  • TFileTransport uses files.
  • TFramedTransport, for non-blocking servers, chunked data
  • TMemoryTransport, user memory for IO
  • TSocket for blocking sockets
  • TZlibTransport for compressed transport.

Protocols: binary, compact, dense, with and without metadata.

Versioning. For every field in a struct you should add an integer identifier, otherwise you automatically get negative numbers.

Similar things are SOAP, CORBA, COM, Pillar, Protocol buffers (Google's protobuf is really similar to Thrift).

I am @agonzalezro on Twitter. See also http://agonzalezro.github.io