this is just a "let's check the feelings" thread ;) Basically I think
it would be great for all the client libs to switch to the new "multi
bulk request" protocol before the 2.0 RC-1 release, so we'll get:
1) binary safe keys
2) a much more hard to desync protocol
3) clients that will work out of the box without knowing the "type" of
the commands
From the latest benchmarks I performed it seems like the performance
hit is very low compared to the old protocol, and I think I can
improve it a bit. I'll try to run some profiling and benchmark and
report back, I'm waiting for a box where I'll be able to perform
benchmarks without the fluctuations I see in the VM environments.
Redis-rb now has support for the new protocol at object creation time:
r = Redis.new(:binary_keys => true)
this will switch to the new protocol. What I think is that at some
point we can make this the default, and instead use
r = Redis.new(:use_old_protocol => true) when operating against Redis
1.0 instances...
I think this is a decent way of introducing the new protocol without
breaking old production environments, but I wonder if you have
different ideas.
At some point I would like to totally drop support for the old
protocol in Redis... maybe for 2.2.
Cheers,
Salvatore
--
Salvatore 'antirez' Sanfilippo
http://invece.org
"Once you have something that grows faster than education grows,
you’re always going to get a pop culture.", Alan Kay
--
To unsubscribe, reply using "remove me" as the subject.
As we speak, Damian and I are working on a refactoring of redis-rb
which will use the new protocol by default.
http://github.com/dpavlin/perl-Redis/tree/multi-bulk
but I have problem with setting nul values:
*3
$3
SET
$3
foo
$0
will return '' (empty string), while
*3
$3
SET
$3
foo
$-1
-ERR invalid bulk write count
doesn't work. I'm doing something wrong, but I can't figure out how to
set nul value correctly in multi-bulk protocol.
While we are at it, Salvatore could you please update link to perl
bindings to point to github repo at
http://github.com/dpavlin/perl-Redis
Thanks.
--
...2share!2flame... http://blog.rot13.org
> this is just a "let's check the feelings" thread ;) Basically I think
> it would be great for all the client libs to switch to the new "multi
> bulk request" protocol before the 2.0 RC-1 release, so we'll get:
Switching to the new protocol is totally fine with me and I shouldn't
have any problem implementing this change for Predis in a way that it
automatically uses the new protocol when a server profile for a
version of Redis >= 2.x is loaded. Predis 0.6.0 will likely be out in
a month or so (delayed for good reasons as it will ship with a ton of
internal changes and new features), which means this is indeed the
right time for me to make such a change.
I don't know if I will be able to update redis-lua in time for the RC1
(support for the commands set of Redis 2.0 is totally missing, sigh)
but I will make sure to do so by the time 2.0 hits the stable release.
> I think this is a decent way of introducing the new protocol without
> breaking old production environments, but I wonder if you have
> different ideas.
Yeah it seems a good way to progressively phase out the old protocol.
--
Daniele Alessandri
http://www.clorophilla.net/
http://twitter.com/JoL1hAHN
I like the simplicity of it.
In my case there's no equivalent to method_missing. However, I made
it easy for someone to add a command:
http://github.com/fictorial/redis-node-client/blob/master/lib/redis-client.js#L567-666
Thanks,
Brian
> Salvatore 'antirez' Sanfilippohttp://invece.org