forked from y-higuchi/ramcloud
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
134 lines (74 loc) · 3.05 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
@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
*/