课程: Databases for Node.js Developers

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Fast and flexible basket and session management with Redis

Fast and flexible basket and session management with Redis - Node.js教程

课程: Databases for Node.js Developers

Fast and flexible basket and session management with Redis

- [Instructor] Key-value stores are a powerful and fast subset of databases. And in this chapter, we will use Redis to handle our session data along with our shopping baskets. At the core, key-value stores function like associative arrays or dictionaries in programming. Each piece of data is stored with a unique key. And the beauty of key-value stores is that they support different data types for both keys and values. So why are we using Redis? Redis is an in-memory key value store, and it only does periodic snapshots to the disc. It's known for its extreme speed with data access times often at constant times, that's an O of one notation. It's very versatile because it supports strings, lists, hashmaps, and sorted sets, and it's really ideal for ephemeral data, so data that changes often and also gets deleted very often. And this applies to sessions and also to shopping baskets. On top of this, and we won't cover this in this course, Redis also supports queue-like behavior via pops…

内容