» tagged pages
» logout

(Feed found, click Add Page to syndicate.) Error finding feed, please try again » Find feed title

A Blog Page allows you to add entries, for news or other time sensitive postings

(Login required to save to your tagged pages.)
(or Cancel)

Make further edits, (or Cancel)

(Login required to save to your tagged pages.)
(or Cancel)

(Editing anonymously: to be credited for your changes, login or register a new account)

Change Page Permissions? Changing these permissions will adjust who can modify this page.

Anonymous (change)
(change)
(or Cancel)
Upload an image from your computer:
or Copy an image from a URL:
or Erase the current icon:
Icon Preview:

or Cancel

Erase thrudb? The contents of thrudb page and all pages directly attached to thrudb will be erased.

or Cancel

(Editing anonymously: to be credited for your changes, login or register a new account)

other page actions:
thrudb

thrudb

Tags Applied to thrudb

No one has tagged this page.

thrudb Wiki Pages

Tag Cloud

To further filter what appears in the Things Tagged thrudb list, select a tag from the Tag Cloud.
What is thrudb? Edit this page and describe it here.

sorted by: recent | see : popular
Content Tagged thrudb

Compiling ThruDB on OSX

After successfully installing thrift there are still a string of dependencies needed before you can install ThruDB.

Thanks in no small part to Jake Luciani for helping me with finding the dependencies.

MacPorts

First we need several packages from the macports. You may want to run sudo port selfupdate to get the latest versions of those packages.


sudo port install boost clucene libevent memcached ossp-uuid

I hit a weird compile error on boost. I fixed it by running sudo port clean boost and simply re-running the port install command. Same problem on both my machines.

Manual dependencies

Like mentioned above, we need facebook’s thrift. We will their public SVN version because this fixes a bug which makes compiling on OSX easier.

svn co http://svn.facebook.com/svnroot/thrift/trunk/ thrift
cd thrift; ./bootstrap.sh
./configure --with-boost=/opt/local --with-libevent=/opt/local --prefix=/opt/local
sudo make install

Don’t forget to install the thrift ruby libraries:

cd thrift/lib/rb
ruby setup.rb

Next we need spread. Spread is a message bus which works much like you imagine a network of IRC server to work. ThruDB uses it for replication and two-phase commits amongst other things. Its a remarkable piece of software which should find its way in most server farms, regardless of ThruDB’s use or not. Once common usecase is to broadcast server logs to spread. This allows you to write a simple client which just listens to the messages and calculates user statistics, traffic and so on. Its also great for replication and keeping multiple systems in sync, such as a search server and the main database.

Unfortunately the spread team decided that everyone who wants to install it has to fill out a quick form so you will have to manually download it from http://www.spread.org/download/spread-src-4.0.0.tar.gz.

tar zxf spread-src-4.0.0
./configure --prefix=/opt/local 
make
sudo make install

ThruDB makes heavy usage of memcached, therefore it uses the up-and-coming c library by Brian Aker which is quickly establishing itself as the defacto standard client implementation due to its speed and use of Consistent Hashing. I actually wrote a ruby extension for this client library with some very encouraging performance metrics. I hope to release this soon.

curl http://download.tangent.org/libmemcached-0.12.tar.gz > libmemcached-0.12.tar.gz
tar zxf libmemcached-0.12.tar.gz
cd libmemcached-0.12
./configure --prefix=/opt/local
sudo make install

Lastly there is log4cxx to be installed. This is a pretty heavy library because of its use of apache apr. Jake said that he may dump it in an upcoming release to make the dependencies of ThruDB a bit more sane.

svn checkout http://svn.apache.org/repos/asf/logging/log4cxx/trunk apache-log4cxx
cd apache-log4cxx
./autogen.sh
./configure --prefix=/opt/local
sudo make install

Compiling ThruDB

svn co http://thrudb.googlecode.com/svn/trunk thrudb
cd thrudb; ./autogen.sh
env LDFLAGS="-L/opt/local/lib" CPPFLAGS="-I/opt/local/lib -I/opt/local/include -I/opt/local/include/thrift" ./configure --prefix=/opt/local
sudo make install

If the compile fails with a missing thriftnb library than you didn’t compile thrift with—with-libevent=/opt/local . Just do that again, we’ll wait.

ThruDB & ruby.

# Run memcached server
memcached -d
# Setup lib shenanigans
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib/

#run thrudb tutorials
cd tutorial

# create the ruby client for the bookmarks.thrift service
make

# start thrudb
./thrudbctl start

# run the tutorial
cd rb; ruby BookmarkExample.rb 

# Profit! (to quote Jake) 

Typo: too-biased

ThruDB - Document Oriented Database Services

Thrudb is a set of simple services built on top of Facebook's Thrift framework that provides indexing and document storage services for building and scaling websites.

opensource: del.icio.us tag/opensource

Compiling ThruDB on OSX

After successfully installing thrift there are still a string of dependencies needed before you can install ThruDB.

Thanks in no small part to Jake Luciani for helping me with finding the dependencies.

MacPorts

First we need several packages from the macports. You may want to run sudo port selfupdate to get the latest versions of those packages.


sudo port install boost clucene libevent memcached ossp-uuid

I hit a weird compile error on boost. I fixed it by running sudo port clean boost and simply re-running the port install command. Same problem on both my machines.

Manual dependencies

Like mentioned above, we need facebook’s thrift. We will their public SVN version because this fixes a bug which makes compiling on OSX easier.

svn co http://svn.facebook.com/svnroot/thrift/trunk/ thrift
cd thrift; ./bootstrap.sh
./configure --with-boost=/opt/local --with-libevent=/opt/local --prefix=/opt/local
sudo make install

Don’t forget to install the thrift ruby libraries:

cd thrift/lib/rb
ruby setup.rb

Next we need spread. Spread is a message bus which works much like you imagine a network of IRC server to work. ThruDB uses it for replication and two-phase commits amongst other things. Its a remarkable piece of software which should find its way in most server farms, regardless of ThruDB’s use or not. Once common usecase is to broadcast server logs to spread. This allows you to write a simple client which just listens to the messages and calculates user statistics, traffic and so on. Its also great for replication and keeping multiple systems in sync, such as a search server and the main database.

Unfortunately the spread team decided that everyone who wants to install it has to fill out a quick form so you will have to manually download it from http://www.spread.org/download/spread-src-4.0.0.tar.gz.

tar zxf spread-src-4.0.0
./configure --prefix=/opt/local 
make
sudo make install

ThruDB makes heavy usage of memcached, therefore it uses the up-and-coming c library by Brian Aker which is quickly establishing itself as the defacto standard client implementation due to its speed and use of Consistent Hashing. I actually wrote a ruby extension for this client library with some very encouraging performance metrics. I hope to release this soon.

curl http://download.tangent.org/libmemcached-0.12.tar.gz > libmemcached-0.12.tar.gz
tar zxf libmemcached-0.12.tar.gz
cd libmemcached-0.12
./configure --prefix=/opt/local
sudo make install

Lastly there is log4cxx to be installed. This is a pretty heavy library because of its use of apache apr. Jake said that he may dump it in an upcoming release to make the dependencies of ThruDB a bit more sane.

svn checkout http://svn.apache.org/repos/asf/logging/log4cxx/trunk apache-log4cxx
cd apache-log4cxx
./autogen.sh
./configure --prefix=/opt/local
sudo make install

Compiling ThruDB

svn co http://thrudb.googlecode.com/svn/trunk thrudb
cd thrudb; ./autogen.sh
env LDFLAGS="-L/opt/local/lib" CPPFLAGS="-I/opt/local/lib -I/opt/local/include -I/opt/local/include/thrift" ./configure --prefix=/opt/local
sudo make install

If the compile fails with a missing thriftnb library than you didn’t compile thrift with—with-libevent=/opt/local . Just do that again, we’ll wait.

ThruDB & ruby.

# Run memcached server
memcached -d
# Setup lib shenanigans
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib/

#run thrudb tutorials
cd tutorial

# create the ruby client for the bookmarks.thrift service
make

# start thrudb
./thrudbctl start

# run the tutorial
cd rb; ruby BookmarkExample.rb 

# Profit! (to quote Jake) 

Typo: too-biased

Username:
Password:
(or Cancel)