-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document pipelining #49
Comments
Does this mean that commands are serialized so that
is always guaranteed to print Sorry if I'm asking an obvious question, but I still have to get used to node async paradigm. |
Yes, the commands on a single client connection are always run in order, and On Fri, Apr 1, 2011 at 12:42 AM, rjack <
|
Thanks :) |
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? |
Pipelining means sending a command without waiting for the response from the previous one. If you do this:
This will be pipelined. The second client.set command is sent before waiting for the response from the first set command . |
Ok so this is different than what pipelining means for redis I believe where |
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? |
node_redis pipelines sort of automatically. This is quite a bit different than in other Redis client libraries, and it needs to be documented.
The text was updated successfully, but these errors were encountered: