Hi guys. I am trying to implement redis-client with node.js and I want to implement pipelining feature in my redis-client. How can I implement the pipelining feature in redis-client? How do I send multiple commands to a redis server?

Comment From: sundb

Hi, @mahdiazizzadeh You can read the pipeline document(https://redis.io/topics/pipelining) and protocol document(https://redis.io/topics/protocol).

To implement a pipe feature, you just need to implement a command parser, convert the commands to a protocol that redis can recognize, and then send the parsed command to redis.

Example

SET key 1
GET key

They will be converted to

*3
$3
SET
$3
key
$1
1
*2
$3
GET
$3
key

Comment From: mahdiazizzadeh

hello @sundb. Thank you very much for your help.