Redis in Action
Josiah Carlson
Foreword by Salvatore Sanfilippo
  • June 2013
  • ISBN 9781617290855
  • 320 pages
  • printed in black & white

A great addition to the Redis ecosystem.

From the Foreword by Salvatore Sanfilippo, Creator of Redis

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.

Table of Contents detailed table of contents




about this book

about the cover illustration

Part 1 Getting started

1. Getting to know Redis

1.1. What is Redis?

1.2. What Redis data structures look like

1.3. Hello Redis

1.4. Getting help

1.5. Summary

2. Anatomy of a Redis web application

2.2. Shopping carts in Redis

2.3. Web page caching

2.4. Database row caching

2.5. Web page analytics

2.6. Summary

Part 2 Core concepts

3. Commands in Redis

3.1. Strings

3.2. Lists

3.3. Sets

3.4. Hashes

3.5. Sorted sets

3.6. Publish/subscribe

3.7. Other commands

3.8. Summary

4. Keeping data safe and ensuring performance

4.1. Persistence options

4.2. Replication

4.3. Handling system failure

4.4. Redis transactions

4.5. Non-transactional pipelines

4.6. Performance considerations

4.7. Summary

5. Using Redis for application support

5.1. Logging to Redis

5.2. Counters and statistics

5.3. IP-to-city and -country lookup

5.4. Service discovery and configuration

5.5. Summary

6. Application components in Redis

6.1. Autocomplete

6.2. Distributed locking

6.3. Counting semaphores

6.4. Task queues

6.5. Pull messaging

6.6. Distributing files with Redis

6.7. Summary

7. Search-based applications

7.1. Searching in Redis

7.2. Sorted indexes

7.3. Ad targeting

7.5. Summary

8. Building a simple social network

8.1. Users and statuses

8.2. Home timeline

8.3. Followers/following lists

8.4. Posting or deleting a status update

8.5. Streaming API

8.6. Summary

3 Next steps

9. Reducing memory use

9.1. Short structures

9.2. Sharded structures

9.3. Packing bits and bytes

9.4. Summary

10. Scaling Redis

10.1. Scaling reads

10.2. Scaling writes and memory capacity

10.3. Scaling complex queries

10.4. Summary

11. Scripting Redis with Lua

11.1. Adding functionality without writing C

11.2. Rewriting locks and semaphores with Lua

11.3. Doing away with WATCH/MULTI/EXEC

11.4. Sharding LISTs with Lua

11.5. Summary

Appendix A: Quick and dirty setup

Appendix B: Other resources and references


© 2014 Manning Publications Co.

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 reader

Written for developers familiar with database concepts. No prior exposure to Redis or other NoSQL databases required. Appropriate for systems administrators comfortable with programming.

About the author

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

placing your order...

Don't refresh or navigate away from the page.
print book $26.99 $44.99 pBook + eBook + liveBook
Additional shipping charges may apply
Prints and ships within 3-5 days
Redis in Action (print book) added to cart
continue shopping
go to cart

eBook $28.79 $35.99 3 formats + liveBook
Redis in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks