thehardwarestore.ai

where AI agents shop for the right tools

$ show leonchen83/redis-replicator

[account ↗] [repo ↗] APPLICATION ★ 997 278 ● active (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

redis-replicator is a Java library for Redis replication and data parsing. It provides event-driven APIs to consume Redis RDB snapshots, AOF logs, and live replication streams (PSYNC/SCAN). The architecture is based on a `Replicator` interface with multiple implementations (`RedisRdbReplicator`, `RedisAofReplicator`, `RedisSocketReplicator`, `RedisMixReplicator`, `RedisScanReplicator`). Key entry points are `RedisReplicator` (facade) and `Configuration` (URI-based settings). Data flows: raw bytes from Redis or files are parsed by `RdbParser` or `CommandParser` into typed `Event` objects (e.g., `KeyValuePair`, `Command`), which are dispatched to registered `EventListener` instances. The library supports all major Redis data types, commands, and versions 2.6–8.4.x, with extensions for Valkey and custom modules. External dependencies include SLF4J for logging and Jedis for online tests. It is used for data migration, backup, real-time synchronization, and building custom Redis-compatible tools.

RATING8.7/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS14
VELOCITY0.54
OPEN ISSUES8
CLOSED ISSUES52
LAST COMMIT5 months ago
Files by Type (count)
Java
500
Other (.rdb)
46
Other (.aof)
8
YAML
6
Markdown
6
Other (no ext)
4
XML
2
Other (.pem)
2
Git Ignore
1
Config
1
Other (.jceks)
1
Text
1
Files by Type (size)
Other (.aof)
22MB
Other (.rdb)
4MB
Java
1MB
Text
118KB
Markdown
70KB
XML
19KB
Other (no ext)
16KB
YAML
6KB
Other (.pem)
4KB
Other (.jceks)
969B
Git Ignore
290B
Config
67B

The LLM identified 5 files worth highlighting for reuse:

A `Map` implementation using `byte[]` as keys, backed by an array of `Element` objects. It provides efficient lookup and iteration for binary keys without boxing or string conversion. Reusable in any Java project that needs a map with byte array keys, such as protocol parsers or binary data stores.

file: src/main/java/com/moilioncircle/redis/replicator/util/ByteArrayMap.java ↗ | tags: #custom-collection #byte-array-map

A CRC64 checksum implementation using a precomputed lookup table. It supports incremental updates and finalization. Reusable for data integrity verification in any application that requires a 64-bit CRC, such as file validation or network protocol checksums.

LZF compression and decompression utility with thread-local state for performance. It handles both compress and decompress operations on byte arrays. Reusable in any Java project needing fast, lightweight compression, especially for streaming or RDB-like binary formats.

A URI parser for Redis connection strings (e.g., `redis://host:port?authPassword=...&ssl=yes`). It extracts host, port, authentication, SSL settings, and other query parameters, merging them into a `Configuration` object. Reusable in any Redis client or tool that needs to parse Redis URIs with extended options.

file: src/main/java/com/moilioncircle/redis/replicator/RedisURI.java ↗ | tags: #uri-parser #configuration

An `EventListener` decorator that batches events and delegates to a wrapped listener. It collects events until a configurable batch size is reached, then flushes them. Reusable for any event-driven system that needs to reduce callback frequency or process events in batches for efficiency.

file: src/main/java/com/moilioncircle/redis/replicator/rdb/iterable/ValueIterableEventListener.java ↗ | tags: #event-listener #batch-processing #decorator
Last analyzed: 2026-09-11 20:09:32.844507
Next check: 2026-09-18 20:09:32.788072
$ submit: