snehac-miner / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

Feature wished : batch job / user-defined job #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In order to minimize the TCP/network overhead,
suggest:

Send a batch of commands to Redis server, in one network travelling.
Redis breaks down the commands and execute one by one, as usual.
Then, returns the results/errs in a batch, too.

It is similar to mget, but it includes all Redis commands.

Or, similarly,
let users to define their batches in Redis with the existing commands.
These batches are stored in Redis server.
Then, remotely call these batches from Redis clients.
Obviously, variables are required in the batch definition.

Note: the whole batch need NOT to be atomic. If it can, it is a bonus.

Original issue reported on code.google.com by laugeenk...@gmail.com on 6 Jul 2009 at 7:35

GoogleCodeExporter commented 8 years ago
If I understand you correctly, Redis already supports this.

See "Multiple commands and pipelining " in 
http://code.google.com/p/redis/wiki/ProtocolSpecification

Original comment by chris%oz...@gtempaccount.com on 15 Aug 2009 at 9:09

GoogleCodeExporter commented 8 years ago
thanks for the comment.

That's great.
Would you(or anyone) please post some examples of multiple commands and 
pipelining?
thanks in advance.

Original comment by laugeenk...@gmail.com on 24 Aug 2009 at 9:15

GoogleCodeExporter commented 8 years ago
A trivial pipelining example:

echo -n "PING\r\nPING\r\n" | nc localhost 6379

Original comment by anti...@gmail.com on 23 Oct 2009 at 12:35