ESDM
Middleware for Earth System Data
Macros | Functions
esdm-modules.c File Reference

ESDM module registry that keeps track of available backends. More...

#include <esdm-internal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "backends-metadata/posix/md-posix.h"
Include dependency graph for esdm-modules.c:

Macros

#define ESDM_HAS_MD_POSIX
 
#define DEBUG_ENTER   ESDM_DEBUG_COM_FMT("MODULES", "", "")
 
#define DEBUG(fmt, ...)   ESDM_DEBUG_COM_FMT("MODULES", fmt, __VA_ARGS__)
 
#define ESDM_HAS_MONDODB
 

Functions

esdm_modules_tesdm_modules_init (esdm_instance_t *esdm)
 
esdm_status esdm_modules_finalize (esdm_instance_t *esdm)
 
esdm_backend_t ** esdm_modules_makeBackendRecommendation (esdm_modules_t *modules, esdm_dataspace_t *space, int64_t *out_backendCount, int64_t *out_maxFragmentSize)
 
esdm_backend_tesdm_modules_randomWeightedBackend (esdm_modules_t *modules)
 
esdm_backend_tesdm_modules_fastestBackend (esdm_modules_t *modules)
 
esdm_status esdm_modules_get_by_type (esdm_module_type_t type, esdm_module_type_array_t **array)
 

Detailed Description

ESDM module registry that keeps track of available backends.

Function Documentation

◆ esdm_modules_fastestBackend()

esdm_backend_t* esdm_modules_fastestBackend ( esdm_modules_t modules)

Get a pointer to the backend with the highest estimated throughput.

◆ esdm_modules_makeBackendRecommendation()

esdm_backend_t** esdm_modules_makeBackendRecommendation ( esdm_modules_t modules,
esdm_dataspace_t space,
int64_t *  out_moduleCount,
int64_t *  out_maxFragmentSize 
)

Make a recommendation on which data backend to use to store data for the given dataspace.

Parameters
[in]modulesusually esdm->modules
[in]spacethe dataspace for which the recommendation is to be made
[out]out_moduleCountreturns the number of recommended backends
[out]out_maxFragmentSizea max fragment size that is suitable for use with all the recommended backends (optional, may be NULL)
Returns
a freshly allocated array of *out_moduleCount backend pointers, must be free'd by the caller