Skip to content

Latest commit

 

History

History
92 lines (71 loc) · 4.31 KB

motr-developer-guide.md

File metadata and controls

92 lines (71 loc) · 4.31 KB

CORTX Motr Developer Guide

This document describes how to develop a simple application with Motr APIs. This document also list links to more useful Motr applications with richer features.

The first document developers should read is: Motr Client API. It explains basic notations, terminologies, and data structures in CORTX Motr. Example motr client applications can be found in our motr client apps repo and an alternative higher-level interface to motr can be found in our Maestro repo. Developers are also assumed having a running CORTX Motr system: please refer to Cluster Setup and Quick Start Guide. For debugging, ADDB can be very useful and is described in these two documents.

For your convenience to build and develop motr, we offer a CentOS-7.9-based Development VM with all dependencies installed ready to build and start single-node Motr cluster.

CORTX Motr provides object based operations and index (a.k.a key/value) based operations as well as FDMI interface. For architectural documents, please refer to our reading list.

A simple CORTX Motr Object Application

Object Application

A simple CORTX Motr Index/Key-Value Application

Key-Value Application

A simple CORTX Motr FDMI application

FDMI Application

How to compile & build the application examples

One way is to use the Motr building framework. This example is compiled and built within the Motr building framework. If you have a new application, add it to the top level Makefile.am and add a Makefile.sub in your directory.

You can also treat this example as a standalone application, and build it out of More building framework. Please refer to the comments in the source code. If Motr-devel source code or RPM is already installed, you may find the header files in "/usr/include/motr " dir and binary libraries in "/lib".

How to run the examples for Object and Key-Value

The first way is to run application against a running CORTX Motr system. Please refer to Cluster Setup and Quick Start Guide. hctl status will display Motr service configuration parameters.

The second way is to run the "motr/examples/setup_a_running_motr_system.sh" in a singlenode mode. Motr service configuration parameters will be shown there. Then run this example application from another terminal.

CORTX Motr object is identified by a 128-bit unsigned integer. An id should be provided as the last argument to the object program. In the object example, we will only use this id as the lower 64-bit of an object identification. This id should be larger than 0x100000ULL, that is 1048576 in decimal.

More examples, utilities, and applications