I was wondering if adding eval() to the list of commands that pipeline supports, is a good idea? Also, I have couple of questions on how pipelining in jedis works.
Does pipelining work the following way -- send commands one by one and collect all the responses at once in the end. Where is the time save in pipelining w.r.t unpipelined code? I took a look at the code and thought it would work in the above way but couldn't figure out how the time save is achieved.
As far as I know eval was added in @ivo_wiblo's fork, but it wasn't merged yet as I am waiting for a pull request. If you are interested in providing your version, please go ahead!
Regard how pipelining works... it is how you said. You send all the commands and at the end read all the responses. The saving is in roundtrips. By reading all responses at the end you avoid waiting for every single response to arrive. So basically by using pipelining you are being asynchronous and using the channel more efficiently.
Thanks!
Jonathan
On Mon, Feb 27, 2012 at 5:10 AM, Raghava Mutharaju <
> I was wondering if adding eval() to the list of commands that pipeline > supports, is a good idea? Also, I have couple of questions on how > pipelining in jedis works.
> Does pipelining work the following way -- send commands one by one and > collect all the responses at once in the end. Where is the time save in > pipelining w.r.t unpipelined code? I took a look at the code and thought it > would work in the above way but couldn't figure out how the time save is > achieved.
Thanks Jonathan. Glad to see you back in the mailing list.
I am actually using @ivo_wiblo's eval code -- I did a merge locally on my machine (along with couple of other patches actually). eval wasn't added to the Pipeline.java, so I was wondering if its a good idea to do that. I can work on this on my local copy.
Another question on pipelining -- if there are lot of commands to pipeline (and hence lot of responses waiting to be read), since all of them had to be read at the end, wouldn't it run out of buffer? How much is the buffer size?
Regards, Raghava.
On Fri, Mar 9, 2012 at 6:04 AM, Jonathan Leibiusky <ionat...@gmail.com>wrote:
> As far as I know eval was added in @ivo_wiblo's fork, but it wasn't merged > yet as I am waiting for a pull request. If you are interested in providing > your version, please go ahead!
> Regard how pipelining works... it is how you said. You send all the > commands and at the end read all the responses. The saving is in > roundtrips. By reading all responses at the end you avoid waiting for every > single response to arrive. So basically by using pipelining you are being > asynchronous and using the channel more efficiently.
> Thanks!
> Jonathan
> On Mon, Feb 27, 2012 at 5:10 AM, Raghava Mutharaju < > m.vijayaragh...@gmail.com> wrote:
>> Hello all,
>> I was wondering if adding eval() to the list of commands that pipeline >> supports, is a good idea? Also, I have couple of questions on how >> pipelining in jedis works.
>> Does pipelining work the following way -- send commands one by one and >> collect all the responses at once in the end. Where is the time save in >> pipelining w.r.t unpipelined code? I took a look at the code and thought it >> would work in the above way but couldn't figure out how the time save is >> achieved.