You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
Well actually WATCH is Redis's (more generic) CAS.
Cheers,
Salvatore
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
Beauty is more important in computing than anywhere else in technology
because software is so complicated. Beauty is the ultimate defence
against complexity.
— David Gelernter
Ritesh Tijoriwala
unread,
Nov 22, 2012, 4:02:26 AM11/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redi...@googlegroups.com
Hi Salvatore,
I am currently using WATCH. However, I have to do an extra GET to compare the values and this forces extra deserialization on client side and one complete roundtrip. For complex objects/values, this can be quite expensive. Is there no way to avoid this?
Thanks for help.
Regards,
Ritesh
Salvatore Sanfilippo
unread,
Nov 22, 2012, 4:26:51 AM11/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Redis DB
Hey, I'm not sure why another GET is required.
Memcached's CAS:
GET key ....
CAS key ....
Redis's WATCH:
WATCH key
GET key
MULTI
SET key ...
EXEC
There is just one get operation in both cases.
However you can use Lua script if you want to improve in the side of
number of commands to send to the server, but note that the first two
and the last three commands can be sent in two separate pipelines so
you pay latency only two times, like in the GET/CAS example.