Thrift / Protocol Buffer



Thrift


Thrift is a software framework for scalable cross-language services development. It 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, Smalltalk, and OCaml.

Reference


Protocol Buffer


http://code.google.com/p/protobuf/
google內部非常重要的資料序列化和反序列化的工具。
Protocol Buffer 是一種語言中立、平台中立的機制,係 Google 專為序列化結構化資料所設計–類似 XML,但更小、更快、更簡單。您只要定義一次自己的資料要如何結構化,之後就可以使用特別產生的原始碼,輕鬆地在您的結構化資料與各 種資料串流間進行轉換,以及使用各種語言 (Java、C++ 或 Python)。


Ubuntu

http://wiki.apache.org/thrift/GettingUbuntuPackages

sudo apt-get install libboost-dev automake libtool flex bison pkg-config g++

http://incubator.apache.org/thrift/download/

git clone  git://git.thrift-rpc.org/thrift.git

wget -O thrift.tgz "http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz"
./bootstrap.sh
./configure
make; make install

/usr/local/bin/thrift


Mac OS 10.6

MAC OS X boost安裝筆記
http://sourceforge.net/projects/boost/files/boost/
MacPorts
sudo port install boost
sudo port install libevent
sudo port install pkgconfig

sudo ln -s /opt/local/share/aclocal/pkg.m4 /KuoJavaLibrary/thrift/aclocal/pkg.m4
./bootstrap.sh
./configure --with-boost=/opt/local --with-libevent=/opt/local --prefix=/opt/local
sudo make; sudo make install




http://wiki.apache.org/thrift/Tutorial


Apache Cassandra

http://github.com/charliem/OCM

Comments