Developing a QoS Storage Back-End Module

Introduction

The current CDMI server implementation allows you to write different storage back-end modules. These modules can be injected at any deployed CDMI server and connects a specific storage back-end to the CDMI server.

This guide describes the basic steps to develop your own storage back-end module, that is used for the QoS path of a CDMI server.

CDMI-SPI

The first step is to look at the CDMI SPI Java Service Provider Interface. This interface needs to be fulfilled by any possible QoS storage back-end.

Getting Started

It is recommended to use a Maven build managed project for your storage back-end module.

The first step would be to include the CDMI SPI dependency in your pom.xml. For the latest version please check the CDMI SPI GitHub project.

To include the dependency add following to your pom.xml.

<repositories>
    <repository>
        <releases>
          <enabled>true</enabled>
          <updatePolicy>always</updatePolicy>
          <checksumPolicy>fail</checksumPolicy>
        </releases>
        <id>SCC-KIT</id>
        <name>SCC</name>
        <url>http://cdmi-qos.data.kit.edu/maven/</url>
      <layout>default</layout>
  </repository>
</repositories>
<dependency>
    <groupId>edu.kit.scc</groupId>
    <artifactId>cdmi-spi</artifactId>
    <version>0.2</version>
</dependency>

StorageBackendFactory

Create a new class that implements the StorageBackendFactory. The getType() method has to return a string that uniqely identifies your back-end module.

StorageBackend

Create a new class that implements the StorageBackend class. For help please have a look at the already available storage back-end modules.

Your module basically has to provide:

  • the back-end capabilities via the getCapabilities() method in the CDMI specific format

  • the current status of an object via the getCurrentStatus(String path) method

  • the updateCdmiObject(String path, String uri) method to make the QoS transition from one set of capabilities to an other

Make the module available

To make the module available you have to provide a file within your project with the FQDN of you StorageBackendFactory.

This file has to be src/main/resources/META-INF/services/org.indigo.cdmi.spi.StorageBackendFactory with the content e.g. org.mycompany.MyBackendFactory.

Run the module

To make use of your module, you have to build and package your module as a jar and include the jar in the class path of the CDMI server at runtime.

Last updated