官术网_书友最值得收藏!

Chapter 2. Advanced Key Management and Data Structures

Using Redis as data storage in your application starts by considering two sides of the solution: the keys and the data structures used as the key values in Redis. Coming up with a good Redis key schema, syntax, and naming convention can mean the difference between an effective and sustainable solution and a technological mess. Because of the flexibility that Redis gives you by allowing most string serialization as keys, much more intentional thought and design should be given to this important step in designing a Redis-based project. Likewise, using an appropriate data structure for any particular key also directly impacts the usability and functionality of any application built with Redis. This chapter covers the following:

  • Designing and managing a Redis key schema and the associated data structures
  • Using Redis client object mappers that use different strategies that hide the specific key schemas and data structures
  • Creating a simple application using a Javascript Redis object mapper and analyzing how the object mapper uses Redis commands and data structures as an example of a Redis key schema
  • Introducing the Big O notation and how this measure of worst-case algorithmic effectiveness at scale is used in evaluating the performance of Redis's commands and how this performance directly relates to Redis's underlying data structures

This focus on the Big O notation in Redis's official documentation provides a method of estimating the time complexity of an application's use of Redis and helps in evaluating your Redis-based application's performance. Together, the Redis key and values should complement and reinforce the solution, while balancing the memory efficiencies of smaller-length keys with enough verbosity for explaining the purpose of the keys to the application designer, developer, or end user.

主站蜘蛛池模板: 蒲江县| 淮北市| 万全县| 彭泽县| 平塘县| 尚义县| 镇坪县| 宁晋县| 义乌市| 吐鲁番市| 四子王旗| 延津县| 阿勒泰市| 密山市| 铁力市| 甘谷县| 巴塘县| 离岛区| 宝应县| 宁远县| 华亭县| 济阳县| 商都县| 龙川县| 江永县| 聂拉木县| 新泰市| 盐池县| 枝江市| 依安县| 阳高县| 隆昌县| 定安县| 延庆县| 灌南县| 宝坻区| 涿州市| 桂平市| 萨迦县| 铜梁县| 浦江县|