Skip to content

effy/ramcloud

 
 

Repository files navigation

/**
  @mainpage RAMCloud


  See https://ramcloud.stanford.edu/wiki/display/ramcloud/General+Information+for+Developers for further details.



====================================
1. Building
====================================

1.1 Pre-requisites (Ubuntu)

A 64-bit linux !

g++ (at least 4.4)

git

python

perl

sudo apt-get install build-essential git-core libcppunit-dev libcppunit-doc doxygen libboost1.42-all-dev libprcre3-dev protobuf-compiler libprotobuf-dev libcrypto++-dev

1.2 Builds

Using GNU make, type:

$ make

This will build the client, server, and coordinator.

====================================
2. Running
====================================

To run you must have 3 things.  A running coordinator, a running master,
and some kind of client.  These all need to be run on the same host;
running on separate hosts requires more flags (see -C and -L on both
the coordinator and server binary).

2.1 Starting a coordinator

$ ./obj.master/coordinator

2.2 Starting a server

$ ./obj.master/server -M -r 0

This starts a RAMCloud process acting only as a master using 0 backups.
If the master can communicate with the coordinator process you should
see a log message ending with "My server ID is 1" after a second or so.

2.3

To make sure things are really working try running

$ ./obj.master/client

It should connect to the master and perform a few random operations.
If it is working then you have a working basic RAMCloud and you can
start writing more interesting applications.

2.4 Using the libramcloud.so library

Write a client application using the interface described in
src/RamCloud.h (see RamCloudMain.cc for an example).

Until we have a proper 'install' target compile with:

$ g++ -Lobj.master -lramcloud -Isrc -Iobj.master -o TestClient TestClient.cc

This is assuming TestClient.cc is in the ramcloud directory just above src.
Adjust your paths accordingly.

2.5 Using the Python bindings:

$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:obj.master PYTHONPATH=bindings/python python

>>> import ramcloud

>>> c = ramcloud.RAMCloud()

>>> c.connect()

>>> c.write(0, 0, 'Hello from Python!')

>>> c.read(0, 0)


====================================
3. Testing
====================================
3.1 Static Style Checking

$ make check

3.2 Unit Testing

$ make test

3.3 Integration Tests (Used as a pre-commit hook)

$ hooks/pre-commit


====================================
4. Source code layout
====================================

bindings/          Bindings in languages other than C/C++ for RAMCloud clients.

clientTests/	   RAMCloud client codes for testing

docs/              Doxygen generated source documentation.

ft/                Fast Transport Prototype - with helper scripts.

GNUmakefile        Primary Makefile to build everything.

hooks/             Scripts executed as hooks when certain git operations are called.

obj.master/        Build directory for the git branch "master". A separate one is created for each branch.

scripts/           Tools.

src/               Main source directory.

gtest/             git submodule that contains the code for google test


*/