Love it. No need for an expensive SCAN command.
Streams: a new general purpose data structure in Redis
11–20 of 154 posts
Re: Streams: a new general purpose data structure in Redis
#12After reading this I'm still not sure I understand. Time-series data I can see, but is there a use-case outside of this?
Re: Streams: a new general purpose data structure in Redis
#13Re: Streams: a new general purpose data structure in Redis
#14 The ID is composed of two parts: a millisecond time and a
sequence number. The number after the dot is the
sequence number, and is used in order to distinguish
entries added in the same millisecond.
Does this mean for example that 1506872463535.11 comes after 1506872463535.2 (because 11 > 2)? If so that means treating these as decimals (which will be easy to do inadvertently) will yield the wrong order (as would sorting them lexicographically). If so it seems like something other than a decimal point would be a better separator (colon perhaps).Re: Streams: a new general purpose data structure in Redis
#15Under what circumstances would one prefer Redis streams over Kafka and vice versa?
Re: Streams: a new general purpose data structure in Redis
#16I have a confusion about ID structure/format: The ID is composed of two parts: a millisecond time and a sequence number. The number after the dot is the sequence number, and is used in order to distinguish entries added in the same millisecond. Does this mean for example that 1506872463535.11 comes after 1506872463535.2 (because 11 > 2)? If so that means treating these as decimals (which will be easy to do inadverten…
Not sure if that's what they do, but it isn't very complex.
Re: Streams: a new general purpose data structure in Redis
#17Under what circumstances would one prefer Redis streams over Kafka and vice versa?
2 - Kafka clients are not available (or are poorly available) for every programming language. Redis has a simpler protocol, so it has more/and better clients available and even if you use an exotic language, it is easy to write a client to it (well... easier than Kafka)
3 - Kafka AFAIK does not have any internal cache implementation, so every read is served from disk (+ page cache). This means that Redis Streams will (probably) perform much better for use cases when the consumers need to fetch data from old offsets.
edit: added reason number 3.
Re: Streams: a new general purpose data structure in Redis
#18Under what circumstances would one prefer Redis streams over Kafka and vice versa?
Re: Streams: a new general purpose data structure in Redis
#19Re: Streams: a new general purpose data structure in Redis
#20I have a confusion about ID structure/format: The ID is composed of two parts: a millisecond time and a sequence number. The number after the dot is the sequence number, and is used in order to distinguish entries added in the same millisecond. Does this mean for example that 1506872463535.11 comes after 1506872463535.2 (because 11 > 2)? If so that means treating these as decimals (which will be easy to do inadverten…