eval pipelining

58 views
Skip to first unread message

Raghava Mutharaju

unread,
Feb 27, 2012, 3:10:24 AM2/27/12
to jedis...@googlegroups.com
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.

Thanks in advance.

Regards,
Raghava.

Jonathan Leibiusky

unread,
Mar 9, 2012, 6:04:01 AM3/9/12
to jedis...@googlegroups.com
Hi Raghava,

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

Raghava Mutharaju

unread,
Mar 9, 2012, 6:08:59 PM3/9/12
to jedis...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages