By Josiah L. Carlson
In a nutshell
This publication covers using Redis, an in-memory database/data constitution server, initially written via Salvatore Sanfilippo, yet lately patched during the open resource approach. even though you don’t unavoidably want to know whatever approximately Redis, to get the main out of this publication you'll have no less than a modest familiarity with the Python programming language, due to the fact just about all of the examples use Python to engage with Redis.
Redis in Action introduces Redis and walks you thru examples that reveal how one can use it successfully. You'll commence via getting Redis organize accurately after which exploring the key-value version. Then, you'll dive into actual use instances together with basic caching, disbursed advert focusing on, and extra. You'll the best way to scale Redis from small jobs to large datasets. skilled builders will savour chapters on clustering and inner scripting to make Redis more uncomplicated to use.
About the Technology
When you would like near-real-time entry to a fast-moving info flow, key-value shops like Redis are tips on how to cross. Redis expands at the key-value development via accepting a large choice of information varieties, together with hashes, strings, lists, and different constructions. It offers lightning-fast operations on in-memory datasets, and in addition makes it effortless to persist to disk at the fly. Plus, it's unfastened and open source.
About this book
Redis in Action introduces Redis and the key-value version. You'll speedy dive into actual use circumstances together with basic caching, allotted advert concentrating on, and extra. You'll tips on how to scale Redis from small jobs to large datasets and notice how one can combine with conventional RDBMS or different NoSQL shops. skilled builders will delight in the in-depth chapters on clustering and inner scripting.
Written for builders accustomed to database strategies. No earlier publicity to NoSQL database recommendations nor to Redis itself is needed. acceptable for structures directors pleased with programming.
• Redis from the floor up
• Preprocessing real-time data
• coping with in-memory datasets
• Pub/sub and configuration
• Persisting to disk
About the Author
Dr. Josiah L. Carlson is a pro database specialist and an energetic contributor to the Redis neighborhood.
Read or Download Redis in Action PDF
Similar python books
Examine Python The challenging means is a e-book I wrote to educate programming to those that don't know tips on how to code. It assumes you're most likely an influence person of your desktop, after which takes you from not anything to programming uncomplicated video games. After examining my ebook you need to be prepared for plenty of of the opposite programming books available in the market.
<div style="text-align: left;">Cay Horstmann's Python for Everyone provides readers with step by step assistance, a function that is immensely valuable for construction self belief and supplying an summary for the duty to hand. “Problem Solving” sections tension the significance of layout and making plans whereas “How To” publications aid scholars with universal programming projects.
Cython is the most important mix of Python and C. utilizing Cython, you could write Python code that calls backward and forward from and to C or C++ code natively at any aspect. it's a language with additional syntax bearing in mind not obligatory static variety declarations. it's also a really renowned language because it can be utilized for multicore programming.
Python Crash path is a fast paced, thorough advent to Python that would have you ever writing courses, fixing difficulties, and making issues that paintings in no time.
In the 1st 1/2 the e-book, you’ll find out about uncomplicated programming innovations, similar to lists, dictionaries, periods, and loops, and perform writing fresh and readable code with workouts for every subject. You’ll additionally the way to make your courses interactive and the way to check your code thoroughly prior to including it to a venture. within the moment 1/2 the publication, you’ll placed your new wisdom into perform with 3 vast initiatives: an area Invaders–inspired arcade online game, facts visualizations with Python’s super-handy libraries, and an easy internet app you could install on-line.
- Pro Python System Administration (2nd Edition)
- Financial Models and Simulation
- Lightweight Django
- Python High Performance Programming
- Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers
- Python Programming Fundamentals
Extra info for Redis in Action
But even for this version, we’ve improved performance by 10–100 times over a typical relational database in this context. Over time, memory use will grow, and we’ll want to clean out old data. 1 For our cleanup, we’ll fetch the size of the ZSET in a loop. If the ZSET is too large, we’ll fetch the oldest items up to 100 at a time (because we’re using timestamps, this is just the first 100 items in the ZSET), remove them from the recent ZSET, delete the login tokens from the login HASH, and delete the relevant viewed ZSETs.
To check the login, we need to fetch the user based on the token and return it, if it’s available. The following listing shows how we check login cookies. hget('login:', token) Fetch and return the given user, if available. 27 Login and cookie caching Checking the token isn’t very exciting, because all of the interesting stuff happens when we’re updating the token itself. For the visit, we’ll update the login HASH for the user and record the current timestamp for the token in the ZSET of recent users.
In just a few weeks of effort involving testing and making the system production-worthy, performance improved 200 times. By reading this book, you can learn about many of the tips, tricks, and wellknown problems that have been solved using Redis. This chapter will help you to understand where Redis fits within the world of databases, and how Redis is useful for solving problems in multiple contexts (communicating between different components and languages, and more). Remaining chapters will show a variety of problems and their solutions using Redis.
Redis in Action by Josiah L. Carlson