WYRDTEK Home Features Reference Downloads About


This is the reference guide for the exstreamspeed API. exstreamspeed is an object-based library written in C. The library is divided into interfaces. Each interface has a seperate section in the guide and a corresponding navigation link (found on left).

Fully inlined C++ class wrappers are also included in the distribution and all example programs are presented with respect to both C and C++ interfaces for comparison.

General Structure

The API consists primarily of interfaces for constructing and manipulating in-memory databases. These interfaces all begin with the prefix es_mb - as in es_mb, es_mbd, es_mbc and so on. The remaining interfaces are either for constructing data to store in databases, such as dates (es_date) and strings (es_sd) or for use in serializing databases to disk or across networks, such as read and write buffers (es_rb and es_wb) and socket management (es_sock).

Each function in the API has the name of the interface to which it belongs as a name-prefix. Each interface, with the exception of es_date and es_sock, has a corresponding opaque data pointer or handle used for maintaining state (a sort of this pointer). For example, here are the declarations for the handle and a few of the functions of the string dictionary (es_sd) interface.

/* string dictionary handle */
struct es_sd;

/* construct new string dictionary */
struct es_sd *es_sd_new( unsigned chunksize, int storestrings );

/* destroy string dictionary and recovery all memory */
void es_sd_delete( struct es_sd *dict );

/* find id for string and add to dictionary if missing */
unsigned es_sd_add( struct es_sd *dict, unsigned *idx, const char *cptr );

[Back To Top]

Key Relationships

The diagram below shows the key relationships between the core interfaces used to construct and manipulate in-memory databases.

Each database instance (es_mb) corresponds to a database definition or schema (es_mbd) that describes it's structure. A database definition consists of a set of database classes (es_mbc) each of which defines the set of fields, indicies and parent relationships for a set of database nodes (es_mbn). Each node consist of a set of rows, or tuples, of data. A set of nodes collectively form a database instance (es_mb).

Databases can be traversed or updated via iterators (es_mbi) and sorted iterators (es_mbs). Iterators fetch from or update a database via program variables that are bound to database fields via a field-binding object (es_mbb).

Object Model

[Back To Top]

Interface Summary

The set of interfaces in the exstreamspeed API are summarized below.
es_mbd Database definition.
es_mb Database instance.
es_mbc Database class definition.
es_mbn Database node.
es_mbq Database query parser.
es_mbb Database field-binding.
es_mbm Database membership filter.
es_mbi Database iterator.
es_mbs Database sorted iterator.
es_mba Database aggregator.
es_sd String dictionary.
es_sdc Compressed string dictionary.
es_sdm String dictionary manager.
es_date Date calculator.
es_sc Statistics calculator.
es_rb Buffered file descriptor reader.
es_wb Buffered file descriptor writer.
es_sock Network programming API.

[Back To Top]