Developing a QoS Storage Back-End Module
Last updated
Last updated
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.
The first step is to look at the Java Service Provider Interface. This interface needs to be fulfilled by any possible QoS storage back-end.
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 GitHub project.
To include the dependency add following to your pom.xml
.
Create a new class that implements the StorageBackendFactory
. The getType()
method has to return a string that uniqely identifies your back-end module.
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
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
.
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.