gogogo
Syndetics cover image
Image from Syndetics

Redis in action / Josiah L. Carlson ; [foreword by Salvatore Sanfilippo.]

By: Material type: TextTextPublication details: Shelter Island, NY : Manning, 2013Description: xxiv, 293 p. : ill. ; 24 cmISBN:
  • 1617290858
  • 9781617290855
Subject(s): DDC classification:
  • 005.7575 CAR
Contents:
Getting to know Redis -- Anatomy of a Redis web application -- Commands in Redis -- Keeping data safe and ensuring performance -- Usint Redis for application support -- Application components in Redis -- Search-based applications -- Building a simple social network -- Reducing memory use -- Scaling Redis -- Scripting Redis with Lua.
Summary: Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by other databases.
Holdings
Item type Current library Call number Copy number Status Date due Barcode
Standard Loan Thurles Library Main Collection 005.7575 CAR (Browse shelf(Opens below)) 1 Available 39002100655662

Enhanced descriptions from Syndetics:

Summary

Redis in Action introduces Redis and walks you through examples that demonstrate how to use it effectively. You'll begin by getting Redis set up properly and then exploring the key-value model. Then, you'll dive into real use cases including simple caching, distributed ad targeting, and more. You'll learn how to scale Redis from small jobs to massive datasets. Experienced developers will appreciate chapters on clustering and internal scripting to make Redis easier to use.

About the Technology

When you need near-real-time access to a fast-moving data stream, key-value stores like Redis are the way to go. Redis expands on the key-value pattern by accepting a wide variety of data types, including hashes, strings, lists, and other structures. It provides lightning-fast operations on in-memory datasets, and also makes it easy to persist to disk on the fly. Plus, it's free and open source.

About this book

Redis in Action introduces Redis and the key-value model. You'll quickly dive into real use cases including simple caching, distributed ad targeting, and more. You'll learn how to scale Redis from small jobs to massive datasets and discover how to integrate with traditional RDBMS or other NoSQL stores. Experienced developers will appreciate the in-depth chapters on clustering and internal scripting.

Written for developers familiar with database concepts. No prior exposure to NoSQL database concepts nor to Redis itself is required. Appropriate for systems administrators comfortable with programming.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

What's Inside
Redis from the ground up Preprocessing real-time data Managing in-memory datasets Pub/sub and configuration Persisting to disk
About the Author

Dr. Josiah L. Carlson is a seasoned database professional and an active contributor to the Redis community.

Table of Contents
PART 1 GETTING STARTED Getting to know Redis Anatomy of a Redis web application PART 2 CORE CONCEPTS Commands in Redis Keeping data safe and ensuring performance Using Redis for application support Application components in Redis Search-based applications Building a simple social network PART 3 NEXT STEPS Reducing memory use Scaling Redis Scripting Redis with Lua

Includes index.

Getting to know Redis -- Anatomy of a Redis web application -- Commands in Redis -- Keeping data safe and ensuring performance -- Usint Redis for application support -- Application components in Redis -- Search-based applications -- Building a simple social network -- Reducing memory use -- Scaling Redis -- Scripting Redis with Lua.

Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by other databases.

Table of contents provided by Syndetics

  • Foreword (p. xv)
  • Preface (p. xvii)
  • Acknowledgments (p. xix)
  • About this book (p. xxi)
  • About the cover illustration (p. xxv)
  • Part 1 Getting Started (p. 1)
  • 1 Getting to know Redis (p. 3)
  • 1.1 What is Redis? (p. 4)
  • Redis compared to other databases and software (p. 4)
  • Other features (p. 6)
  • Why Redis? (p. 6)
  • 1.2 What Redis data structures look like (p. 7)
  • Strings in Redis (p. 9)
  • Lists in Redis (p. 10)
  • Sets in Redis (p. 11)
  • Hashes in Redis (p. 12)
  • Sorted sets in Redis (p. 13)
  • 1.3 Hello Redis (p. 15)
  • Voting on articles (p. 15)
  • Posting and fetching articles (p. 19)
  • Grouping articles (p. 20)
  • 1.4 Getting help (p. 22)
  • 1.5 Summary (p. 22)
  • 2 Anatomy of a Redis web application (p. 24)
  • 2.1 Login and cookie caching (p. 25)
  • 2.2 Shopping carts in Redis (p. 29)
  • 2.3 Web page caching (p. 30)
  • 2.4 Database row caching (p. 31)
  • 2.5 Web page analytics (p. 34)
  • 2.6 Summary (p. 36)
  • Part 2 Core Concepts (p. 37)
  • 3 Commands in Redis (p. 39)
  • 3.1 Strings (p. 40)
  • 3.2 Lists (p. 43)
  • 3.3 Sets (p. 46)
  • 3.4 Hashes (p. 48)
  • 3.5 Sorted sets (p. 50)
  • 3.6 Publish/subscribe (p. 54)
  • 3.7 Other commands (p. 57)
  • Sorting (p. 57)
  • Basic Redis transactions (p. 58)
  • Expiring keys (p. 61)
  • 3.8 Summary (p. 62)
  • 4 A Keeping data safe and ensuring performance (p. 63)
  • 4.1 Persistence options (p. 64)
  • Persisting to disk with snapshots (p. 65)
  • Append-only file persistence (p. 68)
  • Rewriting/compacting append-only files (p. 70)
  • 4.2 Replication (p. 70)
  • Configuring Redis for replication (p. 71)
  • Redis replication startup process (p. 72)
  • Master/slave chains (p. 73)
  • Verifying disk writes (p. 74)
  • 4.3 Handling system failures (p. 75)
  • Verifying snapshots and append-only files (p. 76)
  • Replacing a failed master (p. 77)
  • 4.4 Redis transactions (p. 78)
  • Defining users and their inventory (p. 79)
  • Listing items in the marketplace (p. 80)
  • Purchasing items (p. 82)
  • 4.5 Non-transactional pipelines (p. 84)
  • 4.6 Performance considerations (p. 87)
  • 4.7 Summary (p. 89)
  • 5 Using Redis for application support (p. 90)
  • 5.1 Logging to Redis (p. 91)
  • Recent logs (p. 91)
  • Common logs (p. 92)
  • 5.2 Counters and statistics (p. 93)
  • Staling counters in Redis (p. 94)
  • Storing statistics in Redis (p. 98)
  • Simplifying our statistics recording and discovery (p. 100)
  • 5.3 IP-to-city and -country lookup (p. 102)
  • Loading the location tables (p. 102)
  • Looking up cities (p. 104)
  • 5.4 Service discovery and configuration (p. 104)
  • Using Redis to store configuration information (p. 105)
  • One Redis server per application component (p. 106)
  • Automatic Redis connection management (p. 107)
  • 5.5 Summary (p. 109)
  • 6 Application components in Redis (p. 110)
  • 6.1 Autocomplete (p. 111)
  • Autocompletefor recent contacts (p. 111)
  • Address book autocomplete (p. 113)
  • 6.2 Distributed locking (p. 116)
  • Why locks are important (p. 117)
  • Simple locks (p. 119)
  • Building a lock in Redis (p. 120)
  • Fine-grained locking (p. 123)
  • Locks with timeouts (p. 126)
  • 6.3 Counting semaphores (p. 127)
  • Building a basic counting semaphore (p. 127)
  • Fair semaphores (p. 129)
  • Refreshing semapliores (p. 132)
  • Preventing race conditions (p. 132)
  • 6.4 Task queues (p. 134)
  • First-in, first-out queues (p. 134)
  • Delayed tasks (p. 137)
  • 6.5 Pull messaging (p. 140)
  • Single-recipient publish/subscribe replacement (p. 140)
  • Multiple-recipient publish/subscribe replacement (p. 141)
  • 6.6 Distributing files with Redis (p. 146)
  • Aggregating users by location (p. 146)
  • Sending files (p. 148)
  • Receiving files (p. 149)
  • Processing files (p. 150)
  • 6.7 Summary (p. 152)
  • 7 Search-based applications (p. 154)
  • 7.1 Searching in Redis (p. 155)
  • Basic search theory (p. 155)
  • Sorting search results (p. 161)
  • 7.2 Sorted indexes (p. 163)
  • Sorting search results with ZSETs (p. 163)
  • Non-numeric sorting with ZSETs (p. 165)
  • 7.3 Ad targeting (p. 167)
  • What's an ad server? (p. 168)
  • Indexing ads (p. 168)
  • Targeting ads (p. 171)
  • Learning from user behavior (p. 175)
  • 7.4 Job search (p. 181)
  • Approaching the problem one job at a time (p. 181)
  • Approaching the problem like search (p. 182)
  • 7.5 Summary (p. 183)
  • 8 Building a simple social network (p. 185)
  • 8.1 Users and statuses (p. 186)
  • User information (p. 186)
  • Status messages (p. 187)
  • 8.2 Home timeline (p. 188)
  • 8.3 Followers/following lists (p. 190)
  • 8.4 Posting or deleting a status update (p. 192)
  • 8.5 Streaming API (p. 196)
  • Data to be streamed (p. 196)
  • Serving the data (p. 197)
  • Filtering streamed messages (p. 200)
  • 8.6 Summary (p. 206)
  • Part 3 Next Steps (p. 207)
  • 9 Reducing memory use (p. 207)
  • 9.1 Short structures (p. 208)
  • The ziplist representation (p. 208)
  • The intset encoding for SETs (p. 210)
  • Performance issues for long ziplists and intsets (p. 211)
  • 9.2 Sharded structures (p. 213)
  • HASHes (p. 214)
  • SETs (p. 217)
  • 9.3 Packing bits and bytes (p. 220)
  • What location information should we store? (p. 220)
  • Storing packed data (p. 222)
  • Calculating aggregates over sharded STRINGS (p. 223)
  • 9.4 Summary (p. 225)
  • 10 Scaling Redis (p. 226)
  • 10.1 Scaling reads (p. 226)
  • 10.2 Scaling writes and memory capacity (p. 230)
  • Handling shard configuration (p. 231)
  • Creating a server-sharded connection decorator (p. 232)
  • 10.3 Scaling complex queries (p. 234)
  • Scaling search query volume (p. 234)
  • Scaling search index size (p. 234)
  • Scaling a social network (p. 239)
  • 10.4 Summary (p. 246)
  • 11 Scripting Redis with Lua (p. 247)
  • 11.1 Adding functionality without writing C (p. 248)
  • Loading Lua scripts into Redis (p. 248)
  • Creating a new status message (p. 250)
  • 11.2 Rewriting locks and semaphores with Lua (p. 253)
  • Why locks in Lua ? (p. 253)
  • Rewriting our lock (p. 254)
  • Counting semaphores in Lua (p. 256)
  • 11.9 Doing away with WATCH/MULTI/EXEG (p. 258)
  • Revisiting group autocomplete (p. 258)
  • Improving the marketplace, again (p. 260)
  • 11.4 Sharding LISTs with Lua (p. 263)
  • Structuring a sharded LIST (p. 263)
  • Pushing items onto the sharded LIST (p. 264)
  • Popping items from the sharded LIST (p. 266)
  • Performing blocking pops from the sharded LIST (p. 267)
  • 11.5 Summary (p. 269)
  • Appendix A Quick and dirty setup (p. 271)
  • Appendix B Other resources and references (p. 279)
  • Index (p. 283)

Author notes provided by Syndetics

Dr. Josiah L. Carlson is a seasoned database professional and an active contributor to the Redis community.

Powered by Koha