How It Works

DataReplicator is more than just a remote wrapper; it's a comprehensive data management pipeline. Here’s a look at the core mechanics that make it work seamlessly.

Secure Handshake & Obfuscation

When a client first listens to a key, the server generates a unique, cryptographically secure, and random "obfuscated key" for that specific player-key pair. All future communication for that data uses this obfuscated key, making it difficult for an exploiter to guess or understand your data structure. If the data is marked as encrypted, a one-time, post-quantum key exchange is also performed to establish a secure session key.

Intelligent Update Batching

Calls to :Update() and :Delete() on the server don't fire remotes immediately. Instead, all changes are intelligently queued for each player. At the very end of the current server tick (using task.defer), all queued changes are bundled into a single, compact table (a "batch") and sent in one RemoteEvent call per player. This dramatically reduces network traffic and server load.

Priority & Delta Processing

Before a batch is sent, the server performs two key optimizations. First, it sorts the queued data by Priority, ensuring critical game information is always processed first. Second, if a table is marked for Delta Compression, the server calculates only the changes from the last known state and sends a tiny "patch" instead of the full table, massively saving bandwidth.

Secure Transport & Encryption

If a piece of data is marked as encrypted, it is protected during transit using the secure session key established for that player. This makes the data content unreadable to any outside observers on the network. The entire batch, containing a mix of both plain and encrypted data, is then sent.

Client-Side Processing & Caching

The client receives the batch and processes each item. Encrypted data is decrypted, delta patches are applied to the local cache, and full updates overwrite existing data. The final, reconstructed data is then stored in the client's local cache for instant access via :GetCached().

Signal-Based Updates

After the local cache is updated, a lightweight, pure-Lua Signal fires for the corresponding realKey. Any part of your client-side code connected via :Listen() is then instantly and efficiently notified of the new data, allowing your UI and game logic to react in real-time.

Last updated