Gridengine Database Interface
- GDI
Introduction
The Grid Engine Database Interface (GDI)
standardizes the mechanism for creating, retrieving, changing and deleting
objects stored within a Grid Engine qmaster process. The GDI is the main
interface to communicate with an instance of a qmaster for each client
and server application which is part of the Grid Engine distribution.
Please note, the GDI represents an internal and evolving interface designed
to connect project internal components which evolve with the project. If
you intend to plugin an external component to the Grid Engine system, then
the GDI is not the right choice. One of the initial objectives of the Grid
Engine project is to design and develop generic and stable APIs which are
suitable interfaces for the integration of such external applications.
Internal data representation
The qmaster stores all information in objects
such as queues, jobs, hosts, users, etc. These objects are represented
internally via the Common Usabel List Library (
CULL).
The GDI provides the means to exchange
CULL-objects between different Grid Engine components running on different
hosts. The GDI utilizes the Grid Engine
communication
system for the network-wide date exchange.
Interface
The GDI consists of three groups of functions - initialisation, interacting
with qmaster and shutting down the GDI. All functions are contained in
the library libgdi.a. The function prototypes and any pertinent constants
are defined in sge_gdi.h.
This page only provides an overview on the GDI. For more detailed documentation
about the functions mentioned below, please see the sge_gdi(3) manual page
and related manual pages as well as documentation in the source files.
The functions described mentioned below can be found in source/libs/gdi/gdi_setup.c
and source/libs/gdi/sge_gdi_request.c.
Initializing the GDI
The function sge_gdi_setup() initializes the GDI as well as the Grid Engine
communication system.
To modify the behavior of this function it is possible to use sge_gdi_param()
before calling sge_gdi_setup().
Creating, retrieving, changing and deleting qmaster objects
Only a single function serves this purpose: sge_gdi(). A more advanced
variant exists with sge_gdi_multi() and a third function, sge_gdi_extract_answer(),
is available to retrieve status and error messages in a convenient fashion.
Shutting down GDI library
Shutting down the GDI is performed with
sge_gdi_shutdown(). This function has to be called before exiting the program.
It deregisters from the communication system.
Modules
Most files contained in source/libs/gdi contain CULL object definitions.
By convention, each of those files has a capital L in front of the .h file
suffix.
Files with the word "parse" in their name, contain parsing code producing
CULL objects.