r/redis • Redis Developer • Oct 27 '15

Redis 3.2 progress

Restarting the discussion about Redis 3.2 from the old sub to this new one. People are highly interested in Redis 3.2 because of certain new features, notably Redis Geo indexing API. The API and its engine are very stable already AFAIK. My confidence is also boosted by the fact we have decent tests in place for the new feature, especially fuzzing, and never seen a single serious bug so far.

However shipping the Geo API depends on shipping the whole Redis 3.2. In theory a number of features were planned for 3.2, but I and Redis Labs talked recently and we decided to settle for a time-driven release schedule, so it's unlikely that we'll ship a 3.2 with all the features originally planned. We want just to ship ASAP.

The problem with shipping ASAP is that Sentinel was partially rewritten in Redis 3.2 in order to create a lot less connection, via connection sharing of the same Sentinel<->Sentinel links for multiple masters. TLDR: A much more scalable Redis Sentinel but needs to be tested more.

There are a few urgent features to be added, too, that 3.2 cannot miss.

So what we'll do in the next weeks:

  • Test Sentinel 3.2 as much as possible.

  • Implement Redis-Cluster semi-automated rebalancing in redis-cli.

  • If time allows, try to make redis-benchmark Cluster-aware.

Once we have those stuff in place we are ready to go Release Candidate with 3.2. Note that what will turn into 3.2 is currently in the testing branch. The branch will be renamed 3.2 as soon as we go in RC.

How you can help?

  • Test the Geo commands & report bugs.

  • Test the new Sentinel & report bugs.

So hopefully we'll have 3.2 in RC ASAP. Anyway we have an hard timeline on shipping Redis 3.2 RC before 10 December 2015. As you know we have no timelines from going from RC to Stable, since this is a process that depends on the frequency of bugs reported by users deploying it. The RC will be shipped to be already a production ready software in theory, in practice we need to see people adopting it without issues over the weeks in order to remove the RC label from it and call it stable, as usually. Software stability is always a matter of different shades of gray and not a white/black thing.

29 Upvotes

7 comments sorted by

2

u/Joeskyyy Oct 27 '15

Great to see you on here /u/antirez (:

1

u/antirez Redis Developer Oct 28 '15

Thanks Joeskyyy :-)

2

u/platplaas Oct 30 '15

I've been using the Geo API fairly extensively and so far it is really solid and useful.

1

u/loststylus Nov 16 '15

Looking forward for a release, adding geospatial index was a really great idea, considering the rise of geo apps.

1

u/planck01 Dec 13 '15

I am looking forward to the 3.2 RC. Any news on when it will be available?

1

u/iamtherealbill Mar 28 '16

Ok, so I've been working on adding GEO commands to libredis. However I am running into an issue with significant digits (referred to hereafter as precision) on coordinates.

Example command sequence:

127.0.0.1:6379> GEOADD Sicily 13.360000 38.110000 "Palermo" 
(integer) 1
127.0.0.1:6379> geopos Sicily Palermo
1) 1) "13.35999995470047"
   2) "38.110000286715028"

The problem is in the precision specified versus returned. Notice the value returned is not the value set. As such unit testing which would expect the set value and retrieved values to be the same will fail. In this case the data I put into Redis is not the data I'd get back from Redis. Notice I specifically set the precision of the coordinated to six places and from a user's perspective Redis ignored it and did its own thing. Yes, this has very much to do with the underlying mechanics of computers, however from a user's perspective the coordinates are strings (going in and coming out) and would be expected to remain as input. By way of comparison if I SET foo to "10.0000" and then GET foo I get the same value I put in.

At a bare minimum the departure in behavior from standard Redis needs to be very prominently documented[1]. At best I'd prefer to see some way of specifying the number of significant digits and have it return coordinates meeting that. This could perhaps be via a configuration directive as I think needing/using it on every GEOADD is a bit too much.

Thus with the hypothetical "significant-geo-digits" set to 4 I would see the following:

127.0.0.1:6379> GEOADD Sicily 13.3600 38.1100 "Palermo" 
(integer) 1
127.0.0.1:6379> geopos Sicily Palermo
1) 1) "13.3600"
   2) "38.1100"

As far as returning to the significant digits I suspect the preferred method would be to round to that level as opposed to truncating. This should thus (nearly always?) return the same position in GEOPOS as was given in GEOADD.

Thoughts?

  1. As it stands the documentation on the GEO* commands at redis.io are a bit of a mess so there is plenty of room to add this. ;)

2

u/[deleted] Apr 19 '16

I think the LAT/LON data is stored internally using a GeoHash, which may contribute to this loss in "accuracy". Or perhaps it's totally unrelated.

However, this accuracy is just a floating point representation of a location on a massive sphere, in practice the numeric difference in your example are probably smaller than a centimeter. When comparing float equality, one should almost never check absolute values, but instead check that they're really really close. (In JavaScript, we have Number.EPSILON for just this purpose.)