Child pages
  • Creating a RAMCloud Client
Skip to end of metadata
Go to start of metadata

This page contains basic information on how to write client applications that use the RAMCloud storage system.

An example application

The file src/ClientMain.cc in the RAMCloud source directory contains a simple RAMCloud application. Here are a few general hints about writing applications:

  • The main include file you will need is RamCloud.h, which is in the RAMCloud source directory. This file also includes many other RAMCloud include files.
  • To open a connection with the cluster, you create a RAMCloud::RamCloud object. The arguments to the constructor provide information about how to connect with the cluster; these are typically the same as command-line options passed to the cluster coordinator when it was started.
  • Once you have a RamCloud object, you can use its methods to invoke RAMCloud operations.

How to compile an application

Here is an example command for compiling a RAMCloud client application:

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

This assumes the following:

  • The application is in the file TestClient.cc, which is in the top-level RAMCloud directory.
  • RAMCloud itself has already been compiled.
  • The RAMCloud sources are using the master git branch.

If the application is in a different directory, or if the RAMCloud sources are not using the master branch, you will need to adjust the command line accordingly.

  • No labels