Open Source

Thrift

Thrift is a software framework for scalable cross-language services development. It combines a powerful software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, and Ruby. Thrift was developed at Facebook, and we are now releasing it as open source.

Download Thrift

Release 20080411p1
Source, .tar.gz format

Thrift is released under the Thrift Software License.

You can also get the latest source code from the public svn repository.

Thrift Software License
Copyright (c) 2006- Facebook, Inc. 

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Overview

Thrift allows you to define data types and service interfaces in a simple definition file. Taking that file as input, the compiler generates code to be used to easily build RPC clients and servers that communicate seamlessly across programming languages.

Besides downloading the source code, there are two easy ways to learn more about Thrift:

Thrift is one of Facebook's core software engineering resources. It is used in various ways across many products, including: Search, Mobile, Posts, Notes, Feed, Platform. If you use the site, you've used Thrift.

Requirements

Thrift has been widely tested and deployed on Facebook's systems. Though the code is designed for portability, we can't guarantee that it will run on every system. Here are some basic things you will want to have. (Note that you do not need to have every language package installed if you only intend to use some of them.)

  • A relatively POSIX-compliant *NIX system
  • GNU build tools (Autoconf 2.59c+)
  • boost 1.33.1+
  • g++ 4.0+
  • Java 1.5+ / Apache Ant
  • Python 2.4+
  • PHP 5.0+
  • Ruby 1.8+

Think this sounds like a fun thing to work on? Submit a patch or join the team.

Problems or suggestions? Sign up for the mailing list and check out the developers group. If that doesn't help, contact us.