{"id":50418781,"url":"https://github.com/torrentg/nplex-cpp","last_synced_at":"2026-05-31T07:05:26.394Z","repository":{"id":353319662,"uuid":"896344528","full_name":"torrentg/nplex-cpp","owner":"torrentg","description":"C++ client to access the nplex database","archived":false,"fork":false,"pushed_at":"2026-05-25T04:33:49.000Z","size":1153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-25T06:40:56.440Z","etag":null,"topics":["client","cpp","database","nplex"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torrentg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-30T05:27:59.000Z","updated_at":"2026-05-25T04:33:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/torrentg/nplex-cpp","commit_stats":null,"previous_names":["torrentg/nplex-cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/torrentg/nplex-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torrentg%2Fnplex-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torrentg%2Fnplex-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torrentg%2Fnplex-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torrentg%2Fnplex-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torrentg","download_url":"https://codeload.github.com/torrentg/nplex-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torrentg%2Fnplex-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33722198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","cpp","database","nplex"],"created_at":"2026-05-31T07:05:25.758Z","updated_at":"2026-05-31T07:05:26.387Z","avatar_url":"https://github.com/torrentg.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nplex-cpp\n\nThe official C++20 client library for [nplex](https://github.com/torrentg/nplex) — a reactive,\nkey-value database with ACID guarantees designed for scenarios where low-latency reads,\nreal-time change notifications, and minimal resource consumption matter.\n\n## Features\n\n* **High performance** — A single client can sustain \u003e40,000 commits/s on modest hardware (NUC7i7BNH).\n* **Blazing-fast reads** — Data lives in client memory; reads never hit the server.\n* **Multi-thread support** — Multiple threads can create and submit transactions concurrently.\n* **Three isolation levels** — `READ_COMMITTED`, `REPEATABLE_READ`, and `SERIALIZABLE`.\n* **Reactor pattern** — Register a reactor to receive real-time change notifications on every commit.\n* **ACID transactions** — Atomic, Consistent, Isolated, and Durable.\n* **Flexible connection** — Automatic reconnection and configurable timeout/back-pressure parameters.\n* **Comprehensive tests** — Unit tests, covering messaging, transactions, storage, address parsing, and more.\n\n## Building\n\n### Prerequisites\n\nInstall the required shared libraries before building:\n\n* [libuv](https://github.com/libuv/libuv) — cross-platform asynchronous I/O.\n* [{fmt}](https://github.com/fmtlib/fmt) — string formatting library.\n* [flatbuffers](https://github.com/google/flatbuffers) — memory-efficient serialization library (including the `flatc` compiler).\n\n\n### Compilation\n\n```bash\nmkdir -p build\ncd build\n\n# Normal build (Release)\ncmake -DCMAKE_BUILD_TYPE=Release ..\nmake -j$(nproc)\n```\n\n### Other Targets\n\n```bash\n# Debug build (default)\ncmake -DCMAKE_BUILD_TYPE=Debug ..\nmake -j$(nproc)\n\n# Run unit tests\nctest -V\n\n# AddressSanitizer + UndefinedBehaviorSanitizer\ncmake -DENABLE_SANITIZERS=ON ..\nmake -j$(nproc)\nctest -V\n\n# ThreadSanitizer\ncmake -DENABLE_THREAD_SANITIZER=ON ..\nmake -j$(nproc)\nctest -V\n\n# Profiling\ncmake -DENABLE_PROFILER=ON ..\nmake -j$(nproc)\n./example1\ngprof ./example1 gmon.out\n\n# Coverage\ncmake -DENABLE_COVERAGE=ON ..\nmake -j$(nproc)\nctest -V\n\n# Valgrind — memory check\nvalgrind --tool=memcheck --leak-check=yes ./example1\n\n# Valgrind — thread check\nvalgrind --tool=helgrind --read-var-info=yes ./example1\n\n# Count lines of code (excluding generated files)\ncloc --exclude-content=\"automatically generated\" include src test\n\n# Static analysis\ncppcheck --enable=all --inconclusive --std=c++20 --force \\\n  --suppress=missingIncludeSystem --suppress=unusedFunction \\\n  --suppress=useInitializationList --suppress=noExplicitConstructor \\\n  --suppress=cstyleCast -Ideps -Isrc -Iinclude src\n\n# clang-tidy (uncomment CMAKE_CXX_CLANG_TIDY in CMakeLists.txt)\ncmake ..\nmake -j$(nproc)\n```\n\n## Examples \u0026 Tools\n\n| Binary | Type | Purpose |\n|--------|------|---------|\n| [`example1`](examples/example1.cpp) | Example | Minimal connection, read, ping and submit demo |\n| [`functests`](examples/functests.cpp) | Tool | Functional tests for isolation levels |\n| [`flooder`](examples/flooder.cpp) | Tool | Performance/load generator for write traffic |\n| [`watcher`](examples/watcher.cpp) | Tool | Prints DB/session snapshots and streams updates in JSON |\n\nAll binaries support `-h` / `--help`, where the available parameters are documented.\n\n## Dependencies\n\n### Static\n\n| Library | Description | License |\n|---------|-------------|---------|\n| [FastGlobbing](https://github.com/Robert-van-Engelen/FastGlobbing) | Wildcard pattern matching | CPOL |\n| [cstring](https://github.com/torrentg/cstring) | Immutable C-string with reference counting | LGPL-3.0 |\n| [cqueue](https://github.com/torrentg/cqueue) | Circular queue | LGPL-3.0 |\n| [base64](https://github.com/tobiaslocker/base64) | Base64 encoder / decoder | MIT |\n| [utf8.h](https://github.com/sheredom/utf8.h) | UTF-8 string functions | Unlicense |\n| [doctest](https://github.com/doctest/doctest) | Testing framework | MIT license |\n\n\n### Shared\n\n| Library | Description | License |\n|---------|-------------|---------|\n| [{fmt}](https://github.com/fmtlib/fmt) | String formatting | MIT |\n| [libuv](https://github.com/libuv/libuv) | Cross-platform async I/O | MIT |\n| [flatbuffers](https://github.com/google/flatbuffers) | Efficient binary serialization | Apache-2.0 |\n\n## Maintainers\n\nThis project is maintained by Gerard Torrent ([torrentg](https://github.com/torrentg/)).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorrentg%2Fnplex-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorrentg%2Fnplex-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorrentg%2Fnplex-cpp/lists"}