DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Microservices
  4. Redis 5.0 Is Here!

Redis 5.0 Is Here!

Redis reached a major milestone with the release of 5.0, which includes a variety of advancements and improvements. Explore what they are.

Kyle Davis user avatar by
Kyle Davis
·
Nov. 06, 18 · News
Like (4)
Save
Tweet
Share
6.35K Views

Join the DZone community and get the full member experience.

Join For Free

Last week, Redis reached a major milestone with the release of 5.0, which includes a variety of advancements and improvements. The big story here is the introduction of Streams as part of the release. Streams is the first entirely new data structure in Redis since HyperLogLog was introduced as part of 2.8.9 back in April 2014 (over four years ago)!

Streams

So what is Redis Streams, you may ask? A Redis Stream is a log-like data structure that allows you to store multiple fields and string values with an automatic, time-based sequence at a single key. In many ways, Streams resembles other Redis data structures - it orders data in a manner reminiscent of Lists, it stores fields and values similar to Hashes, it enables you to read ranges of values like you can with Sorted Sets, and it can behave somewhat like Pub/Sub (or Lists) with blocking behavior that waits for items to arrive, allowing for real-time reactions to the stream.

All that said, a Redis Stream is quite distinctly its own thing. It's not exactly fair to say they are like structure foo but with feature bar. There is a unique capability of Redis Streams that sets it apart from any other existing data structure: consumer groups that allow various clients to consume a stream with their own position. This enables a whole new collection of uses for Redis; tasks like event sourcing or unified log architecture are now not only possible but also optimal. As with any Redis data structure, there are also numerous commands (13, in fact) that allow you to interact with the structure - you can find a list of these commands at redis.io.

ZPOP and Friends

With the latest release, sorted sets have now gained a few new commands that allow you to remove the highest- (ZPOPMAX) or lowest- (ZPOPMIN) scoring member of a sorted set. An oft-requested feature, this enables some new patterns that were previously only accessible with Lua scripting.

Accompanying ZPOPMIN and ZPOPMAX are the blocking variants (BZPOPMIN/BZPOPMAX) that wait for a value to arrive, similar to the blocking behavior of lists (BLPOP, as an example). So not only can you now remove the highest or lowest values, but also you can wait for members to arrive.

Other Improvements

Aside from new commands and data structures, the 5.0 release includes many refinements to existing internals including:

  • New Modules API capabilities
  • Improvements in HyperLogLog implementation
  • HELP for many sub-commands
  • Enhancements to memory management and reporting
  • RDB storing frequency and recency information about keys (i.e. LFU, LRU)
  • Lua replica and AOF refinements
  • Networking and client connection management improvements
  • Client identification and blocking management between clients

For a bit of fun, we have also added the useless yet entertaining LOLWUT command, which generates some computer art using random elements and command arguments. It doesn't have a significant technical purpose, but it might be a nice thing to test to see if Redis 5.0 is running properly when connecting to an instance of an unknown version.

(From LOLWUT: a piece of art inside a database command)

For more details or background on the improvements, you are welcome to take a look at the release notes.

Redis Enterprise

We're in the process of integrating Redis 5.0 within our Redis Enterprise package and Cloud environments, but we will be releasing it shortly, so make sure to look out for that announcement. In the meantime, if you're itching to try Redis 5.0 in Enterprise - especially Streams - you can download Redis Enterprise Software 5.3 Tech Preview, which includes an earlier release candidate of Redis 5.0. And you want to run this preview on our fully managed VPC offering, just let us know at support@redislabs.com.

Happy streaming!

Redis (company)

Published at DZone with permission of Kyle Davis, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Stream Processing vs. Batch Processing: What to Know
  • Quick Pattern-Matching Queries in PostgreSQL and YugabyteDB
  • What Is Policy-as-Code? An Introduction to Open Policy Agent
  • Agile Transformation With ChatGPT or McBoston?

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: