RFC - Interval set pull request, a revisit

14 views
Skip to first unread message

Paul L

unread,
Aug 18, 2016, 10:59:53 AM8/18/16
to Redis DB
I've been working on the original Interval Set port to Redis, which adds three specific commands to add, manage and stab at interval sets

Why when you can do this with sorted sets and manipulation client side or just pull arrays and search them on the client?  Well, you can but sorted set implementations suffer when you have overlaps and/or empty space between sets and still require client side processing.  Adding and deleting sets complicates things a lot. This aims to fix that.

This is aimed at very fast IP range lookups but could be used in any implementation.  The code in the fork supports 64bit, so can be used with ipv6 if you take just the most significant top network


redis 127.0.0.1:6379> iadd test 0 10 test1
(integer) 1
redis 127.0.0.1:6379> iadd test 0 20 test2
(integer) 1
redis 127.0.0.1:6379> iadd test 10 30 test3
(integer) 1
redis 127.0.0.1:6379> istab test 5
1) "test1"
2) "test2"
redis 127.0.0.1:6379> istab test 15
1) "test3"
2) "test2"
redis 127.0.0.1:6379> istab test 25
1) "test3"


charlie kwon

unread,
Aug 19, 2016, 2:03:59 AM8/19/16
to redi...@googlegroups.com

Its very good. Thank you.


2016. 8. 18. 오후 11:59에 "Paul L" <paul....@gmail.com>님이 작성:
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages