Thrift is a lightweight, language-independent software stack forpoint-to-point RPC implementation.Thrift provides clean abstractions and implementations for data transport,data serialization, and application level processing. The code generationsystem takes a simple definition language as input and generates codeacross programming languages that uses the abstracted stack to buildinteroperable RPC clients and servers.
Thrift makes it easy for programs written in different programminglanguages to share data and call remote procedures. With supportfor 28 programming languages, chances are Thriftsupports the languages that you currently use.
Source: “Learning Apache Thrift”, Krzysztof Rakowski, Packt Publishing, December 2015. Transport provides a way to read and write payload from and to the medium you use (most. Let's take a step back and compare data serialization formats, of which there are plenty. What are the key differences between Apache Thrift, Google Protocol Buffers and Apache Avro. Which is 'The Best'? Truth of the matter is, they are all very good and each has its own strong points. Java Multiplication Server¶. Here is the MultiplicationServer class in which I have implemented a simple server. With slightly different configuration this server can become secure as you will see in the next example. Thrift: Scalable Cross-Language Services Implementation Mark Slee, Aditya Agarwal and Marc Kwiatkowski Facebook, 156 University Ave, Palo Alto, CA fmcslee,aditya,[email protected] Abstract Thrift is a software library and set of code-generation tools devel-oped at Facebook to expedite development and implementation of.
Thrift is specifically designed to support non-atomic version changesacross client and server code. This allows you to upgrade yourserver while still being able service older clients; or have newerclients issue requests to older servers. An excellent community-providedwrite-up about thrift and compatibility when versioning an API can befound in the Thrift Missing Guide.
For more details on Thrift's design and implementation, see the Thriftwhitepaper included in this distribution, or at the README.md filein your particular subdirectory of interest.
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Website |
---|---|---|---|---|---|
master | |||||
0.12.0 |
Thrift does not maintain a specific release calendar at this time.
We strive to release twice yearly. Download the current release.
Licensed to the Apache Software Foundation (ASF) under oneor more contributor license agreements. See the NOTICE filedistributed with this work for additional informationregarding copyright ownership. The ASF licenses this fileto you under the Apache License, Version 2.0 (the'License'); you may not use this file except in compliancewith the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,software distributed under the License is distributed on an'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANYKIND, either express or implied. See the License for thespecific language governing permissions and limitationsunder the License.
thrift/
compiler/
lib/
test/
tutorial/
To build the same way Travis CI builds the project you should use docker.We have comprehensive building instructions for docker.
See http://thrift.apache.org/docs/install for a list of build requirements (may be stale). Alternatively see the docker build environments for a list of prerequisites.
More information about Thrift can be obtained on the Thrift webpage at:
Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo,and also by Google's protocol buffers.
If you are building from the first time out of the source repository, you willneed to generate the configure scripts. (This is not necessary if youdownloaded a tarball.) From the top directory, do:
Once the configure scripts are generated, thrift can be configured.From the top directory, do:
You may need to specify the location of the boost files explicitly.If you installed boost in /usr/local, you would run configure as follows:
Note that by default the thrift C++ library is typically built with debuggingsymbols included. If you want to customize these options you should use theCXXFLAGS option in configure, as such:
To enable gcov required options -fprofile-arcs -ftest-coverage enable them:
Run ./configure --help to see other configuration options
Please be aware that the Python library will ignore the --prefix optionand just install wherever Python's distutils puts it (usually alongthe lines of /usr/lib/pythonX.Y/site-packages/). If you need to controlwhere the Python modules are installed, set the PY_PREFIX variable.(DESTDIR is respected for Python and C++.)
Apache Thrift Example
Make thrift:
From the top directory, become superuser and do:
Note that some language packages must be installed manually using build toolsbetter suited to those languages (at the time of this writing, this appliesto Java, Ruby, PHP).
Look for the README.md file in the lib// folder for more details on theinstallation of each language library package.
There are a large number of client library tests that can all be runfrom the top-level directory.
Apache Thrift Pdf File
This will make all of the libraries (as necessary), and run throughthe unit tests defined in each of the client libraries. If a singlelanguage fails, the make check will continue on and provide a synopsisat the end.
Apache Thrift Book Pdf
To run the cross-language test suite, please run:
Apache Thrift Server
This will run a set of tests that use different language clients andservers.