Developing User-Defined Extensions (UDX)
The basic process for developing and deploying new user-defined extensions (UDX) created in either C++ or JVM environments is the following.
- Familiarize yourself with the UDX interface, that is, the extension point classes, input and output parameters, data members and methods defined in the
udx_api.hpp
include file (for C++ UDX development), or imported from thecom.cambridgesemantics.anzograph.udx
package (for JVM UDX development). - Create the C++
.cpp
or JVM source files for a user-defined extension library. (Each source library file may contain one or more UDX functions, aggregates, or service extensions.)For C++ environments, the udx_api.hpp include file provides a description of classes , data members, and methods available for C++ UDX development. For JVM environments, AnzoGraph provides two JAR files in the
<install_path>/lib/jar
directory:- anzograph-udx-api-2.1.0 – AnzoGraph UDX Interface library.
- anzograph-udx-api-2.1.0-javadoc – Full HTML API documentation describing AnzoGraph JVM UDX interface library packages, classes, annotations, data members and methods.
- Add the required metadata statements to your UDX library source file so you can register the new UDXs in your source file as an extension library available in AnzoGraph. You may create one or more separate UDX or extension library files to register and use in AnzoGraph.
- Compile the UDX library source file into a shared object file for C++ based extension libraries or a JAR file for JVM-based extension libraries.
- Place the C++ shared object (
.so
) or JAR files, and any files or libraries the extensions are dependent on, in a pre-configured location on the AnzoGraph leader node of a server cluster. Each time AnzoGraph is started, the system loads the C++ shared object or JAR files and adds any registered extensions to the AnzoGraph registry.To designate the location to store UDXs, specify a directory with the
extensions_dir
setting in thesetting.conf
configuration file. All of the individual UDX or extension library files you've created and want to register and use in AnzoGraph, are saved in this one location (along with any files or libraries the extensions are dependent on).
The following topics provide details of the UDX development steps, for both C++ and JVM-based environments:
- Creating New UDX Library Source Files
- Registering UDXs in an Extension Library
- Compiling UDX Source Files
- Loading UDXs into AnzoGraph