Timeseries in Redis with Streams

Redis Streams represent an append-only timeseries of key-value pairs.Any number of clients can write to a Stream and each time they do they receive a unique ascending ID of the item that was inserted into the timeseries.Clients reading data can block while listening for new data coming in, can maintain a “bookmark” of the last message read for batch processing, or can be organized into more complex “consumer groups” for sharing workloads and acknowledging messages.Streams are a large topic, so this post will just look briefly at how to use them to model timeseries data in Redis. The new data structure makes this dramatically more simple than previous approaches like using List or Sorted Set types to model timeseries.For the code examples here we’ll use redis-rb:.
Timeseries in Redis with Streams #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles