Marc Kwiatkowski (marc@facebook.com)
Aditya Agarwal (aditya@facebook.com)
+Last Modified: 2007-Mar-06
+
Thrift is distributed under the Thrift open source software license.
Please see the included LICENSE file.
language as its input and generates code across programming languages that
uses the abstracted stack to build interoperable RPC clients and servers.
+Thrift is specifically designed to support non-atomic version changes
+across client and server code.
+
For more details on Thrift's design and implementation, take a gander at
the Thrift whitepaper included in this distribution or at the README files
-in a particular subdirectory of interest.
+in your particular subdirectory of interest.
Heirarchy
=========
java/
php/
py/
- ruby/
+ rb/
test/
Contains sample Thrift files and test code across the target programming
languages.
+ tutorial/
+
+ Contains a basic tutorial that will teach you how to develop software
+ using Thrift.
Requirements
============
Run ./configure --help to see other configuration options
-Make thrift
+Make thrift:
make
make install
-Note that some language packages must be installed manually (i.e. Java, Ruby).
+Note that some language packages must be installed manually using build tools
+better suited to those languages (at the time of this writing, this applies
+to Java, Ruby, PHP).
+
Look for the README file in the lib/<language>/ folder for more details on the
installation of each language library package.
--- /dev/null
+Thrift Code Compiler
+
+Author: Mark Slee (mcslee@facebook.com)
+Last Modified: 2007-Mar-06
+
+Thrift is distributed under the Thrift open source software license.
+Please see the included LICENSE file.
+
+Thrift Code Compiler
+====================
+
+This compiler takes thrift files as input and generates output code across
+various programming languages. To build and install it, do this:
+
+ ./bootstrap.sh
+ ./configure
+ make
+ sudo make install
+
+It requires some form of LEX and YACC to be installed, which should be
+picked up by autoconf.
+
+Not much else to report here. You'll have to look at the code to get your
+questions answered. Or just run the executable after you build and take
+a look at the usage message.
Makefile.in \
Makefile.orig \
NEWS \
-README \
aclocal.m4 \
autom4te.cache \
autoscan.log \
if (tservice->get_extends() != NULL) {
string extends = type_name(tservice->get_extends());
- indent(f_service_) << "include " << extends << ".Iface" << endl;
+ indent(f_service_) << "include " << extends << "::Iface" << endl;
}
vector<t_function*> functions = tservice->get_functions();
string extends_client = "";
if (tservice->get_extends() != NULL) {
extends = type_name(tservice->get_extends());
- extends_client = " < " + extends + ".Client, ";
+ extends_client = " < " + extends + "::Client ";
}
indent(f_service_) <<
indent() << " @oprot = oprot" << endl <<
indent() << " end" << endl <<
indent() << " @seqid = 0" << endl;
+ } else {
+ f_service_ <<
+ indent() << " super(iprot, oprot)" << endl;
}
indent(f_service_) << "end" << endl << endl;
string extends_processor = "";
if (tservice->get_extends() != NULL) {
extends = type_name(tservice->get_extends());
- extends_processor = " < " + extends + ".Processor, ";
+ extends_processor = " < " + extends + "::Processor ";
}
// Generate the header portion
f_service_ <<
indent() << "@handler = handler" << endl <<
indent() << "@processMap = {}" << endl;
+ } else {
+ f_service_ <<
+ indent() << "super(handler)" << endl;
}
for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
f_service_ <<
t_struct* tstruct,
string prefix) {
out <<
- indent() << prefix << " = " << type_name(tstruct) << "()" << endl <<
+ indent() << prefix << " = " << type_name(tstruct) << ".new()" << endl <<
indent() << prefix << ".read(iprot)" << endl;
}
fprintf(stderr, " -py Generate Python output files\n");
fprintf(stderr, " -rb Generate Ruby output files\n");
fprintf(stderr, " -xsd Generate XSD output files\n");
- fprintf(stderr, " -I dir Add a directory to the list of directories \n");
- fprintf(stderr, " searched for include directives\n");
+ fprintf(stderr, " -I dir Add a directory to the list of directories \n");
+ fprintf(stderr, " searched for include directives\n");
fprintf(stderr, " -nowarn Suppress all compiler warnings (BAD!)\n");
fprintf(stderr, " -strict Strict compiler warnings on\n");
fprintf(stderr, " -v[erbose] Verbose mode\n");