Comments (7)
Does this mean that commands are serialized so that
client.set("key", "value");
client.set("key", "new value");
client.get("key", redis.print);
is always guaranteed to print new_value
because commands are queued and sent in order, even if the single command calls are async?
Sorry if I'm asking an obvious question, but I still have to get used to node async paradigm.
from node-redis.
Yes, the commands on a single client connection are always run in order, and
the callbacks are always invoked in order.
On Fri, Apr 1, 2011 at 12:42 AM, rjack <
[email protected]>wrote:
Does this mean that commands are serialized so that
client.set("key", "value");
client.set("key", "new value");
client.get("key", redis.print);is always guaranteed to print
new_value
because commands are queued and
sent in order, even if the single command calls are async?Sorry if I'm asking an obvious question, but I still have to get used to
node async paradigm.Reply to this email directly or view it on GitHub:
#49 (comment)
from node-redis.
Thanks :)
from node-redis.
Took a look around the source and don't see any logic to handle pipelining, and watching network activity while using node_redis I don't see any "automatic pipelining".
Might have just missed the pipelining pieces when looking around. Any chance for some quick addition to the README with a short example of pipelining a set of commands?
from node-redis.
Pipelining means sending a command without waiting for the response from the previous one. If you do this:
client.set("key1", "val1");
client.set("key2", "val2");
This will be pipelined. The second client.set command is sent before waiting for the response from the first set command .
from node-redis.
Ok so this is different than what pipelining means for redis I believe where
multiple commands can be sent simultaneously on the same connection. Then
results are delivered back together. Like a single batch of commands.
On Jun 12, 2011 5:30 PM, "mranney" <
[email protected]>
wrote:
from node-redis.
Is a single TCP connection connection used in the client.set("key1"); client.set("key2") example above, Matt? If not, then I don't think node_redis is pipelining in the technical sense of the word. Seems to me like this example results in two requests to the redis server, and two separate responses - the lack of a callback means the library simply doesn't execute a callback. Is this the correct understanding?
from node-redis.
Related Issues (20)
- Does cluster mode support pipeline?
- Unable to use +/- inf at method: zAdd HOT 2
- Create "ensure" method
- quit vs disconnect - flipped behaviour or wrong documentation HOT 1
- isolationPoolOptions have terrible defaults
- createCluster clients don't handle on('error') correctly HOT 2
- "ClientClosedError: The client is closed" error in my TypeScript application redis usage
- Quit is not getting closed HOT 1
- Detect pub sub subscription status/connection on the cluster client?
- FT.AGGREGATE _ LOAD * is not supported
- Is there a read from option in redis-cluster? HOT 2
- Successfully connected to Redis server, but did not trigger connect, ready event callback HOT 1
- sRandMember seems to not support the count argument HOT 2
- Unable to connect to literal IPv6 addresses via the `url` option
- [docs] The `sharded-channel-moved` redirection failed. HOT 1
- calling aclGetUser on none existing user throws a null error
- No way to quit a BLOCKed connection? HOT 2
- Not able to work with binary data (gzip) HOT 1
- arbitrary code execution when compiling specifically crafted malicious code
- hmset() : redisClient.hmset is not a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-redis.