nodepp::redux_t is a header-only C++11 library that implements Silicon-Logic Parity. It provides 64-bit opaque handles with intrinsic arithmetic validation, enabling direct memory access with the security of a managed database.
Unlike traditional Hash Maps that suffer from "Hardware Tax" — latency caused by collisions and cache misses — Redux utilizes algorithmic Pointer Authentication Codes (PAC). It transforms memory addresses into secure 8-byte tokens that validate their own integrity in
- Zero-Overhead Abstracted Memory: Memory access at silicon speeds without the risks of raw pointers.
- O(1) Self-Validating Handles: Integrated 16-bit checksum prevents Use-After-Free and data corruption.
- Green Computing Ready: Designed for 0% CPU Idle overhead, ideal for ESP32, WASM, and ultra-high-density servers.
- Agnostic Architecture: Identical behavior across embedded systems and x86_64 architectures.
- No GC / No Lookup Tables: No garbage collection pauses or search table latency.
#include <nodepp/nodepp.h>
#include <redux/redux.h>
using namespace nodepp;
struct Player { float x, y; int health; };
void onMain(){
redux_t<Player> players;
auto h_player = players.create();
players.update({ 100.0f, 200.0f, 100 }, h_player);
auto p = players.read( h_player );
if ( p.has_value() ) { auto x = p.value();
console::log( x.x, x.y, x.health );
}
players.remove( h_player );
}In traditional distributed systems, when you send a request, you store the context in a Lookup Table (HashMap) and wait for a response with a request_id. When the response arrives, the server wastes cycles searching, hashing, and resolving collisions to find the original state.
NodePP Redux changes the game:
- State to Handle: Instead of a random ID, Redux converts the actual memory pointer of your state into a PAC-Verified Handle ─ Pointer Authentication Code (64-bit token).
- Opaque Request: You send this 8-byte handle over the wire as your request_id.
- Direct Recovery: When the hook returns, the handle is the memory address.
-
Zero-Search Validation: Redux validates the handle's integrity in
$O(1)$ . If it’s valid, you have instant access to your state without a single hash table lookup.
| Feature | nodepp::redux_t |
std::unordered_map |
Raw Pointer |
|---|---|---|---|
| Access Speed |
|
|
|
| Memory Overhead | 0% (No index) | High (Hash tables) | 0% |
| Safety | PAC Verified | Key Existence | None (Risky) |
| Serializability | Native (U64) | Complex | Impossible |
| Hardware Tax | Minimal | High (Cache misses) | None |
Engineered for c10M scale, redux_t allows millions of entities to coexist in a single process with predictable latencies. It eliminates the "stop-the-world" pauses typical of managed languages like Go or Node.js.