DataReelDataReelC++ Toolkit Documentation

DataReel 7.4.1 Readme

Contents

Overview
What DataReel is good for
What changed in DataReel 7
License
Supported platforms and compilers
Package map
Building
Using DataReel in your project
File formats
Example programs and tests
Documentation
Release history

https://datareel.com

Overview

DataReel is an object database (OODB) and cross platform communications toolkit for C++: applications keep their objects in local database files and talk to other systems over TLS. It began in 1997, when C++ had no standard string, container, thread or file system classes, as a general purpose library that supplied all of them. The C++ standard library now does that job, so DataReel 7 keeps the parts the standard library still does not have and removes the rest:

The library has no dependencies except the system TLS library (OpenSSL on Linux, Schannel or OpenSSL on Windows).

DataReel 7.4.1, released 11/20/2026, is the current DataReel release (7.4 with fixes: see "NEW IN 7.4.1" in RELEASE_NOTES_7.4.txt). DataReel 7 is the main, fully supported release line. DataReel 6 (6.4.2) is the legacy release line: it is still supported with bug fixes and security updates, but gets no new features. Online documentation: https://datareel.com/clib7/ (Version 7) and https://datareel.com/clib/ (Version 6, legacy).

README.md is a short overview of DataReel and its two release tracks: DataReel 7.x (main) and DataReel 6.4.2 (legacy).

The DataReel development package was produced by independent work and contract work released to the public through non-exclusive license agreements. The initial work began independently in 1997 and was augmented from 1999 to 2004 by code produced under contract to support various applications. Bug fixes, enhancements and additions are welcome through the DataReel website:

https://datareel.com/downloads/datareel/ https://datareel.com/contact.php

What DataReel is good for

Object database

 gxObjRepl         Object replication between Windows and Linux nodes,
                   both ways, with takeover and rejoin (7.4)
 gxDatabase        32/64-bit block file engine: allocate, write, read,
                   delete and reuse variable size blocks, per-block CRC,
                   file and record locking, large files
 gxBtree           Disk B-tree index with your own key class, optional
                   node cache (BtreeCache)
 POD               A data file and its index files opened together
 InfoHog           Persistent objects: a fixed key plus any number of
                   variable length members, indexed by key
 gxDatabaseCache   Write-back cache for database files
 db_debug/ix_debug Utilities that analyze and rebuild damaged files

TLS networking

 gxsTLSConnection  TCP connection with implicit TLS or STARTTLS,
                   certificate and host name checks, line and block I/O
 gxsTLSServer      TLS server; pairs well with datareel::ThreadPool
 gxsHTTPClient     HTTPS client with redirects and chunked bodies
 gxsHTTPMessage    HTTP/1.1 messages for clients and servers
 gxsSMTPClient     Mail over implicit TLS (465) or STARTTLS (587)
 gxsPOP3Client     Mail over implicit TLS (995) or STLS (110)
 gxsIMAPClient     Mailboxes over implicit TLS (993) or STARTTLS (143)
 gxsFTPClient      FTPS with encrypted data connections
 gxStream          Database blocks between client and server over TLS
 gxSocket          IPv4/IPv6 TCP and UDP socket under all of the above
 gxSerialComm      Serial ports (and a serial database block server)
 gxsPing, telnet   Plain text diagnostics (ICMP and telnet cannot be
                   encrypted; use telnet only on trusted networks)

Portable types and helpers

 gxINT16..gxUINT64, gxFLOAT64, CDate   Fixed layout types used in files
 gxConfig          name=value configuration files
 LogFile           Thread safe time stamped log file
 ThreadPool        Task pool on std::thread (the standard has none)
 strutil.h         std::string helpers (trim, case-insensitive find,
                   split, str_append, ...)
 systime.h         Time stamps for logs, SMTP and HTTP
 gxs_b64.h, gxcrc32.h   Base 64 and CRC-32

For general purpose work (strings, containers, threads, files, time) use the C++ standard library; DataReel 7 itself does.

What changed in DataReel 7

See RELEASE_NOTES_7.0.txt for the full list and for porting notes, RELEASE_NOTES_7.1.txt, RELEASE_NOTES_7.2.txt, RELEASE_NOTES_7.3.txt, RELEASE_NOTES_7.3.1.txt, RELEASE_NOTES_7.3.2.txt, RELEASE_NOTES_7.3.3.txt and RELEASE_NOTES_7.4.txt for the changes in 7.1 to 7.4. In short:

License

The DataReel open source library is copyrighted by DataReel Software Development, Copyright (c) 2001-2026, all rights reserved. DataReel open source is available to non-profit, commercial, individual, and academic developers. The open-source archive is distributed under the GNU Lesser General Public License (LGPL), version 3 or any later version, with provisions for use in commercial and non-commercial applications under the terms of the LGPL. See the LICENSE file.

Under the terms of the LGPL you can use the open source code in commercial applications as a static or dynamically linked library. This allows commercial developers to compile the library and link to it without making any changes to the DataReel source code.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Supported platforms and compilers

Package map

 README.md       Overview: what DataReel is, the 7.x and 6.4 release tracks
 CMakeLists.txt  Main build file (library, examples, utilities, tests)
 include/        DataReel headers
 src/            DataReel source files
 examples/       Example programs: database/, tls/, general/, diagnostics/
 utils/          db_debug and ix_debug database utilities
 tests/          run_tests.sh, mock mail/FTPS servers, damaged file test
 build/          Linux makefile (cd build; make; make install)
 env/            Settings for the Linux makefile (linux.env, gnu_env.sh)
 lib/            Library install folder used by build/makefile
 docs/           HTML documentation (start with docs/index.html)
 docs/ai/        Usage guides for AI coding assistants
 AGENTS.md       Rules for AI assistants that write code with DataReel
 llms.txt        Index of the documentation for AI tools
 llms-full.txt   The AI guides in one file

Building

Linux (RHEL 8, 9, 10):

 sudo dnf install gcc-c++ cmake openssl-devel
 cmake -S . -B cmake-build -DCMAKE_BUILD_TYPE=Release
 cmake --build cmake-build -j
 sudo cmake --install cmake-build          # /usr/local by default

Or with the makefile, which installs into ../lib:

 cd build
 make                 # make LARGEFILES=1 for the 64-bit database engine
 make install

Windows (Visual Studio 2022 or 2026, from a Developer Command Prompt):

 cmake -S . -B cmake-build -G "Visual Studio 17 2022" -A x64
 cmake --build cmake-build --config Release
 cmake --install cmake-build --config Release --prefix C:\datareel

Use -G "Visual Studio 18 2026" with Visual Studio 2026. To build with OpenSSL instead of Schannel add:

 -DDATAREEL_SSL=OPENSSL -DOPENSSL_ROOT_DIR=E:/3plibs/openssl64

CMake options:

 DATAREEL_64BIT_DATABASE  64-bit database engine (default OFF)
 DATAREEL_NATIVE_TYPES    Native integer/float types (default ON)
 DATAREEL_SSL             OPENSSL or SCHANNEL
 DATAREEL_GUI             CONSOLE or WX (wxWidgets 3.x)
 BUILD_SHARED_LIBS        Shared library instead of static
 DATAREEL_BUILD_EXAMPLES  Examples, utilities and tests (default ON)

Using DataReel in your project

With an installed DataReel:

 find_package(DataReel 7 REQUIRED)
 target_link_libraries(myapp PRIVATE DataReel::datareel)

Or as a subdirectory of your project:

 add_subdirectory(datareel)
 target_link_libraries(myapp PRIVATE DataReel::datareel)

The DataReel::datareel target carries the include path and the configuration macros, which must match between the library and your program because some headers change layout with them.

File formats

DataReel 7 reads and writes the same files as 6.x. Two build settings change the file layout, so a program must use the same settings as the files it opens:

Example programs and tests

The examples are built with the library. Each is one source file:

 examples/database/   gxDatabase, gxBtree, POD, InfoHog
 examples/tls/        TLS echo server/client, HTTPS server/client,
                      SMTP, POP3, FTPS, gxStream server/client
 examples/oodb/       Object database patterns: typed objects with a
                      text export and import, gxdJournal crash
                      recovery, a day-organized event database and
                      replication over gxStream
 examples/general/    gxConfig, LogFile, ThreadPool, US trading
                      sessions (CDate), strutil/base 64/CRC-32
 examples/diagnostics ping, telnet

examples/README.txt says what each of the newer examples shows and how to run it.

tests/run_tests.sh builds everything with CMake and runs the examples against each other, the mail and FTPS clients against mock servers (tests/mock_servers.py, needs python3), and tests/damaged_files, which reads deliberately damaged database files. Pass CMAKE_OPTS to test other configurations:

 tests/run_tests.sh
 CMAKE_OPTS="-DDATAREEL_64BIT_DATABASE=ON" tests/run_tests.sh /tmp/b64

Documentation

Open docs/index.html in a browser. The class library pages are under docs/classes, the examples under docs/examples and the utilities under docs/utils. The guides in docs/ai (also collected in llms-full.txt) are short task-oriented descriptions of the API with working code, written for AI coding assistants but useful to anyone.

Security and the database port: docs/security_white_paper.html is the security design of the library (TLS, mutual TLS, input checks, database files, replication, limits, FIPS and quantum computing). docs/gxstream_replication_white_paper.html explains gxStream and object replication on the IANA-registered port 2073 (gxs-data-port), and docs/rfc/draft-gaer-datareel-gxstream-00.txt is the protocol's specification, an Internet-Draft for the Independent Submission stream.

Release history

 7.4.1 11/20/2026 Fix release: the object service address check
                  (security), gxObjRepl port 2073 by default, a stalled
                  copy no longer holds the primary, reconnects taken at
                  once, gxObjReplReader (read-only access from another
                  process), KNOWN_ISSUES.md ("NEW IN 7.4.1" in
                  RELEASE_NOTES_7.4.txt).
 7.4   11/17/2026 Final release: 7.4 beta 5 plus the fixes and additions
                  listed under "NEW IN 7.4 (AFTER BETA 5)" in
                  RELEASE_NOTES_7.4.txt.
       11/16/2026 Beta 5: object replication between Windows and Linux
                  (gxObjRepl), one file layout and one stream header on
                  every platform, the IMAP client and examples; gxrepl
                  page shipping removed (RELEASE_NOTES_7.4.txt).
       11/16/2026 Beta 4 (tag 7.4-beta4): gxrepl recovery gap fixes,
                  stamp-keeping fill.
       11/14/2026 Beta 3 (tag 7.4-beta3): gxrepl drain-verify fixes (no
                  verify cascade, position gone, a log made again,
                  ReadLogOf), per-object apply fixes A1-A3, scan fixes
                  S2/S3; security scan clean.
       11/14/2026 Beta 2 (tag 7.4-beta2). Vector extensions phases A-D:
                  vector index, HNSW search, float16/int8, vector sets,
                  vector searches in the object server, vector indexes
                  under gxrepl; gxrepl F4/F6/F7, the 7.3.2 fixes and the
                  per-object derived apply (off by default)
                  (RELEASE_NOTES_7.4.txt). Follows the 11/12/2026
                  7.4-beta preview (phases A-B).
 7.3.3 11/14/2026 Beta. Database replication fixes
                  (RELEASE_NOTES_7.3.3.txt)
 7.3.2 11/14/2026 Beta. Database replication fixes
                  (RELEASE_NOTES_7.3.2.txt)
 7.3.1 11/01/2026 Beta. Security scan fixes (RELEASE_NOTES_7.3.1.txt)
 7.3  10/31/2026  Beta. Memory-mapped reads, faster scans
                  (RELEASE_NOTES_7.3.txt)
 7.2  10/31/2026  Beta. Journal, page cache, positional I/O, hashed
                  B-tree cache (RELEASE_NOTES_7.2.txt)
 7.1  10/31/2026  Beta. Object database and TLS networking only:
                  gxRDBMS removed (RELEASE_NOTES_7.1.txt)
 7.0  10/26/2026  Beta. Modern C++17 rewrite, TLS-only networking, IPv6,
                  datareel namespace, CMake (RELEASE_NOTES_7.0.txt)
 6.2  10/25/2026  Loop guards for damaged files, SetWriteHook()
 6.1  10/25/2026  Security fixes in gxBtree and InfoHog
 6.0              Code review fixes (RELEASE_NOTES_6.0.txt and
                  CODE_REVIEW_FIXES.txt)

Release notes for the earlier versions are in docs/release_notes_6_2.html, docs/release_notes_6_1.html and docs/release_notes_6_0.html.