feat(proxy) Add commands #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This series of commits adds support for quite a few Redis commands, including transaction support. The commands added are mainly to support the ChirpStack open-source LoRaWAN(R) Network Server, as well as an internal closed-source application.
Note that client-side caching is still not supported.
This includes pull request #1. They were added as separate pull requests due the them being very different.
These changes have been running in production with no issues.
Summary
This branch adds 21 new commands (including subcommands), significantly expanding the proxy's Redis compatibility. The major feature additions include:
Detailed Command List
Transaction Support
Added in commit 9f0193b
Implementation Details:
String/Key Operations
Added in commits 16743ac and 9f0193b
Hash Operations
Added in commit 9f0193b
Redis Streams
Added in commit 16743ac
CREATE- Create a new consumer groupSETID- Set the last delivered ID for a consumer groupDESTROY- Delete a consumer groupCREATECONSUMER- Create a consumer in a groupDELCONSUMER- Delete a consumer from a groupConnection & Protocol Management
Added in commit d875fa4
HELLO - Protocol negotiation supporting RESP2 and RESP3
CLIENT - Client connection management with subcommands:
SETNAME- Set client connection nameGETNAME- Get client connection nameID- Get unique client IDLIST- List all connected clientsKILL- Kill client connectionsPAUSE- Pause client command processingREPLY- Control server reply mode (ON/OFF/SKIP)SETINFO- Set client library info (Redis 7.2+)GETINFO- Get client informationCommands Previously Supported
For reference, the master branch supports:
Basic: PING, AUTH, QUIT, SELECT, INFO, CONFIG, DBSIZE, SCAN
String: GET, SET, SETEX, INCR, DECR, DEL, EXISTS, EXPIRE
Hash: HGET, HSET, HDEL
List: LPUSH, RPUSH, LPOP, RPOP
Set: SADD, SREM, SMEMBERS
Sorted Set: ZADD, ZREM, ZRANGE
Cluster: CLUSTER, MODULE
Testing
All new commands include comprehensive unit tests. Integration tests were added for Redis Streams functionality.