From a56785f73cc3a2e09571f46941caf56133551400 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 26 May 2009 01:12:46 +0200 Subject: [PATCH] RubyRedis: set TCP_NODELAY TCP socket option to to disable the neagle algorithm. Makes a huge difference under some OS, notably Linux --- Changelog | 3 +++ TODO | 10 +++++++++- client-libraries/ruby_2/rubyredis.rb | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 6e4d93a1..4a26c5a2 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +2009-05-25 maxclients implemented, see redis.conf for details +2009-05-25 INFO command now reports replication info +2009-05-25 minor fix to RubyRedis about bulk commands sent without arguments 2009-05-24 Warns if using the default config 2009-05-24 Issue with redis-client used in scripts solved, now to check if the latest argument must come from standard input we do not check that stdin is or not a tty but the command arity 2009-05-23 RubyRedis: now sets are returned as arrays again, and not as Set objects diff --git a/TODO b/TODO index 4213b3dc..cdd50f7a 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ BEFORE REDIS 1.0.0-rc1 * Add number of keys for every DB in INFO * maxmemory support - * maxclients support * Resize the expires and Sets hash tables if needed as well? For Sets the right moment to check for this is probably in SREM * What happens if the saving child gets killed or segfaults instead of ending normally? Handle this. * check 'server.dirty' everywere. Make it proprotional to the number of objects modified. @@ -21,6 +20,15 @@ AFTER 1.0 stable release * Elapsed time in logs for SAVE when saving is going to take more than 2 seconds * LOCK / TRYLOCK / UNLOCK as described many times in the google group * Replication automated tests + * some kind of sorted type, example: + ZADD mykey foo 100 + ZADD mykey bar 50 + ZRANGE mykey 0 1 => bar foo + This is able to take elements sorted because a binary tree is used to store + the elements by 'score', with the actual value being the key. On the other + side the type also takes an hash table with key->score mapping, so that when + there is an update we lookup the current score and can traverse the tree. + * BITMAP type FUTURE HINTS diff --git a/client-libraries/ruby_2/rubyredis.rb b/client-libraries/ruby_2/rubyredis.rb index e668fcd5..ca73d817 100644 --- a/client-libraries/ruby_2/rubyredis.rb +++ b/client-libraries/ruby_2/rubyredis.rb @@ -116,6 +116,7 @@ class RedisClient else sock = TCPSocket.new(host, port, 0) end + sock.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1 # If the timeout is set we set the low level socket options in order # to make sure a blocking read will return after the specified number -- 2.45.2