DataReelDataReelC++ Transition Guide

Modern Examples

Every example program of DataReel 6.4 has a modern C++ equivalent in examples_modern. Client and server pairs are one modern program that runs both ends, so 93 legacy source files map to 82 modern programs. Each page shows the legacy and modern sources side by side.

Oldest standard needed: C++11: 11 programs, C++14: 1 programs, C++17: 32 programs, C++20: 38 programs.

Thread Examples

ProgramLegacy filesStandardLibrariesWhat it shows
threads_canceltestprog.cppC++20C++ standard library onlyModern equivalent of the cancel example.
threads_conditiontestprog.cppC++11C++ standard library onlyModern equivalent of the condition variable example.
threads_deadlock1testprog.cppC++17C++ standard library onlyModern equivalent of deadlock1.
threads_deadlock2testprog.cppC++11C++ standard library onlyModern equivalent of deadlock2, where the application recovers a mutex whose owner died (gxMUTEX_OWNERDEAD_ERROR, MakeConsistent()).
threads_deadlock_posix_testingtestprog.cppC++11C++ standard library onlyModern equivalent of the POSIX robust mutex test.
threads_destroytestprog.cppC++11C++ standard library onlyModern equivalent of the destroy example.
threads_detachtestprog.cppC++20C++ standard library onlyModern equivalent of the detach example.
threads_exitingtestprog.cppC++11C++ standard library onlyModern equivalent of the exiting example.
threads_joinedtestprog.cppC++11C++ standard library onlyModern equivalent of the joined example.
threads_messagetestprog.cppC++11C++ standard library onlyModern equivalent of the message example.
threads_mutextestprog.cppC++17C++ standard library onlyModern equivalent of the mutex example.
threads_prioritytestprog.cppC++17C++ standard library onlyModern equivalent of the priority example.
threads_simpletestprog.cppC++11C++ standard library onlyModern equivalent of the simple gxThread example.
threads_specifictestprog.cppC++11C++ standard library onlyModern equivalent of the thread-specific data example.
threads_stacktestprog.cppC++11C++ standard library onlyModern equivalent of the stack size example.
threads_suspendtestprog.cppC++20C++ standard library onlyModern equivalent of the suspend example.
threads_templatetestprog.cppC++17C++ standard library onlyModern equivalent of the template example.
threads_thread_pooltestprog.cppC++17C++ standard library onlyModern equivalent of the thread pool example.
threads_thread_securitytestprog.cppC++20C++ standard library onlyModern equivalent of the 6.4.1 thread checks.
threads_timedtestprog.cppC++14C++ standard library onlyModern equivalent of the timed example.

General Examples

ProgramLegacy filesStandardLibrariesWhat it shows
general_binary_search_treetestprog.cppC++17C++ standard library onlyModern equivalent of the binary search tree test.
general_config_classtestprog.cppC++17C++ standard library onlyModern equivalent of the gxConfig test program.
general_device_cachetestprog.cppC++17C++ standard library onlyModern equivalent of the device cache test, which copies a file through gxDeviceBucketCache buckets.
general_disk_file_classtestprog.cppC++17C++ standard library onlyModern equivalent of the DiskFileB test program.
general_doubly_linked_listtestprog.cppC++11C++ standard library onlyModern equivalent of the doubly linked list test.
general_file_utilstestprog.cppC++17C++ standard library onlyModern equivalent of the file utilities test.
general_fuzz_fuzz_parsersfuzz_parsers.cppC++17C++ standard library onlyModern equivalent of the libFuzzer targets for the 6.x parsers (HTML, XML, dates, IP and MAC addresses, CSV lines, wildcard matches).
general_fuzz_fuzz_textfuzz_text.cppC++17C++ standard library onlyModern equivalent of the libFuzzer targets for the 6.x text code (gxConfig, gxString, Base64).
general_html_parsertestprog.cppC++17C++ standard library onlyModern equivalent of the gxsHTML test.
general_logfiletestprog.cppC++17C++ standard library onlyModern equivalent of the LogFile test.
general_memory_buffertestprog.cppC++20C++ standard library onlyModern equivalent of the MemoryBuffer test program.
general_print_securitytestprog.cppC++17C++ standard library onlyModern equivalent of the 6.3.1 print driver checks.
general_security_sweeptestprog.cppC++17C++ standard library onlyModern equivalent of the 6.3 security sweep checks.
general_string_classtestprog.cppC++20C++ standard library onlyModern equivalent of the gxString (UString) test program.
general_support_securitytestprog.cppC++20C++ standard library onlyModern equivalent of the 6.3 support code checks (gxConfig, LogFile, the debug manager, thread messages, SysTime).
general_url_parsertestprog.cppC++17C++ standard library onlyModern equivalent of the gxsURL test.
general_xml_parsertestprog.cppC++17C++ standard library onlyModern equivalent of the gxsXML DOM test: build a tree, write it to a file, load the file back and write it again.

Database Examples

ProgramLegacy filesStandardLibrariesWhat it shows
database_btreetestprog.cppC++17DataReel 6.4.3Modern equivalent of the gxBtree test.
database_btree_cachedtestprog.cppC++17DataReel 6.4.3Modern equivalent of the cached B-tree test.
database_btree_nodetestprog.cppC++17DataReel 6.4.3Modern equivalent of the B-tree node test.
database_damagedtestprog.cppC++17DataReel 6.4.3Modern equivalent of the damaged database file tests.
database_databasetestprog.cppC++20DataReel 6.4.3Modern equivalent of the 32-bit/64-bit engine comparison.
database_database_cachetestprog.cppC++17DataReel 6.4.3Modern equivalent of the database file cache test.
database_defragtestprog.cppC++17DataReel 6.4.3Modern equivalent of the defrag test: allocate objects of growing size, delete them, undelete every other one, and allocate again with the best fit and the first fit methods, showing how deleted blocks are reused.
database_fuzz_fuzz_dbfuzz_db.cppC++20DataReel 6.4.3Modern equivalent of the libFuzzer targets for the object database (the .gxd data file target; the legacy file also has .btx and journal targets built the same way).
database_fuzz_gen_seedsgen_seeds.cppC++20DataReel 6.4.3Modern equivalent of the seed file generator for the database fuzz targets: a data file, an index and a journal with two committed batches, copied into gxd/, btx/ and jnl/ folders.
database_infohogtestprog.cppC++17DataReel 6.4.3Modern equivalent of the InfoHog contact database demo.
database_journaltestprog.cppC++17DataReel 6.4.3Modern equivalent of the page cache and journal tests, as an example of the modern way to use gxdJournal.
database_journal_salttestprog.cppC++17DataReel 6.4.3Modern equivalent of the journal salt test: 20 processes forked from one parent each start a journal, and every journal header must get a different salt (a salt copied into every child would let one process's journal records pass as another's).
database_layouttestprog.cppC++17DataReel 6.4.3Modern equivalent of the 6.4 on-disk layout test.
database_podtestprog.cppC++17DataReel 6.4.3Modern equivalent of the POD (Persistent Object Database) test.
database_reclaimtestprog.cppC++17DataReel 6.4.3Modern equivalent of the reclaim test (best fit and first fit reuse of freed blocks).
database_replication_6xrepl6_writer.cpp
repl6_check.cpp
C++20DataReel 6.4.3 + 7.x featuresModern equivalent of repl6_writer (primary) and repl6_check (copy): a 6.x program replicating its records with the DataReel 7.x object replication (gxv7ObjRepl, dr7features.h).
database_simpletestprog.cppC++17DataReel 6.4.3Modern equivalent of the simple gxDatabase demo.
database_vector_indextestprog.cppC++20DataReel 6.4.3 + 7.x featuresModern equivalent of the 6.4 vector index example: records in a 6.x gxDatabase file, found by vector similarity with the DataReel 7.x vector index (gxv7VectorIndex, dr7features.h).

Socket Examples

ProgramLegacy filesStandardLibrariesWhat it shows
socket_broadcastclient.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the UDP broadcast client and server.
socket_comm_securitytestprog.cppC++20DataReel 6.4.3Modern equivalent of the serial port, telnet and ping checks.
socket_echo_serverclient.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the TCP echo client and server.
socket_ftp_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the FTP client example.
socket_fuzz_fuzz_protofuzz_proto.cppC++20C++ standard library onlyModern equivalent of the libFuzzer targets for the 6.x HTTP, URL, SMTP, POP3 and FTP readers, aimed at the modern parsers in common/proto_parse.h: every input must give a value or a refusal, never a crash or a read out of bounds.
socket_hostinfotestprog.cppC++17DataReel 6.4.3Modern equivalent of the host name information example.
socket_http_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the HTTP client example.
socket_http_serverhttpserv.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the multi-threaded HTTP server framework.
socket_https_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the HTTPS client example.
socket_imap_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the IMAP client example (6.4).
socket_multi_threaded_serverclient.cpp
m_thread.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the multi-threaded client and server.
socket_multicastclient.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the UDP multicast client and server.
socket_pingtestprog.cppC++20C++ standard library onlyModern equivalent of the ping example.
socket_pop3_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the POP3 client example.
socket_proto_securitytestprog.cppC++20DataReel 6.4.3Modern equivalent of the 6.3.1 protocol parser checks.
socket_simpleclient.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the simple TCP client and server, in one program.
socket_smtp_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the SMTP client example.
socket_socket_cacheclient.cpp
gxsfile.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the device cache client and server, which move a file through cache buckets over a gxStream connection.
socket_socket_securitytestprog.cppC++20DataReel 6.4.3Modern equivalent of the gxSocket security checks.
socket_ssl_securitytestprog.cppC++20DataReel 6.4.3Modern equivalent of the 6.3.1 gxSSL checks.
socket_ssl_serverm_thread.cpp
server.cpp
C++20DataReel 6.4.3Modern equivalent of the multi-threaded HTTPS server.
socket_ssl_verify_certtestprog.cppC++20DataReel 6.4.3Modern equivalent of the client side certificate check.
socket_stream_fuzz_fuzz_streamfuzz_stream.cppC++20C++ standard library onlyModern equivalent of the libFuzzer target for the gxStream peer data: the fuzz input is what a peer sends over a socket pair (closed after the input), and the reader in common/block_frame.h must return good blocks or nothing, never crash, hang or allocate more than its maximum.
socket_stream_securitytestprog.cppC++20C++ standard library onlyModern equivalent of the gxStream data path checks, applied to the modern block code in common/block_frame.h over a socket pair: request A peer that announces a 4 GB block gets nothing back and nothing is allocated (the length is checked first).
socket_tcp_send_filetcp_send_file.cppC++20DataReel 6.4.3Modern equivalent of tcp_send_file: send a file over a TCP stream.
socket_telnet_clienttestprog.cppC++20DataReel 6.4.3Modern equivalent of the telnet client example.
socket_vector_clienttestprog.cppC++20DataReel 6.4.3 + 7.x featuresModern equivalent of the vector client example: VECTOR_INFO and VECTOR_SEARCH on a DataReel 7.x object server over mutual TLS (gxv7ObjectClient, dr7features.h).