Reference Guide C API www.spreadconcepts.com


Programmer's Reference Guide
Replicated Hash Table
Version 2.0


Getting Started

Building a distributed application that uses RHT replicas is very easy. It involves just a few basic steps.

  1. Make sure you have a Spread daemon running somewhere that you can connect to. For more information on Spread, see http://www.spreadconcepts.com/spread_info.html. Spread is included as part of this distribution and can be found in bin/spread from the root of this distribution.

  2. Review the compilation instructions. You will need to set up your include & library paths and link with certain libraries of this distribution.

  3. Initialize the RHT library with a call to rht_lib_init.

  4. Create a local replica of a specified replica using a call to rht_create.

  5. Insert a key-value pair into the replica with a call to rht_put.

  6. Read from the replica a key-value pair with a call to rht_get.

  7. Optionally delete a key-value pair with a call to rht_del.

  8. Repeat the "put", "get", and "delete" operations as necessary for your program.

  9. Finally clean up the replica when you are finished with your program's execution with a call to rht_fini.


Copyright © 2004, Spread Concepts LLC, All rights reserved