valkey-io / valkey-glide

An open source Valkey client library that supports Valkey and Redis open source 6.2, 7.0 and 7.2. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java and Python
Apache License 2.0
268 stars 56 forks source link

Node: Improve writeOrBufferCommandRequest for better maintainability #2675

Open jhpung opened 2 weeks ago

jhpung commented 2 weeks ago

Description

As this function requires additional conditional statements with each new command, leading to increased complexity, we should consider a new structure to reduce this complexity.

https://github.com/valkey-io/valkey-glide/pull/2651#discussion_r1836452388

Problems

  1. Growing complexity with each new command type
  2. Single function handling too many responsibilities

Checklist

Additional Notes

No response

avifenesh commented 2 weeks ago

Note that it will be better to wait a bit till the release branch is backport into the main branch to work on it

jhpung commented 1 week ago

Sure, I'll put this on hold for a moment!