I learned about the redis key-value database after the holiday. By the way, I wrote some study notes to share with you, hoping to help anyone who wants to know about redis.
An environment for building redis learning notes
Redis Study Notes Data
Download the Windows version of redis, which contains 32-bit and 64-bit folders and other files. copy the files in the directory of 32-bit or 64-bit to D: \ redisfolder according to the system. Then, run the command to access the file and execute
First, configure the environment. Here we will not talk about the redis server and the redis PHP extension package;
View code
Require 'Redis. php '; Require 'Redis _ pool. php '; Require 'Redis _ peer. php '; Class Note Extends Redis_peer {} $
PHP Technology Exchange Group 170855791
PHP has multiple redis extensionsProgramI am using the phpredis Extension
First download the extension phpredis ,:Https://github.com/nicolasff/phpredis
After decompression, you can install the extension
I recently practiced redis In the project. I have encountered and solved several problems in the process and recorded them.
Why redisOur project is an improvement to the original cache system. The application scenarios are Forum posts,
Recently, I was busy using redis to implement a Message notification system. Today I will summarize the technical details, which demonstratesCodeUnless otherwise specified, all phpredis extensions are used. Memory
For example, if you want to push a
Mind Map
As mentioned above, I am doing data synchronization for Douban. Now the synchronization operation has been completed, and the problem is reading. The reason for using redis is that there is not enough MySQL server to support my business.
This article comes fromRedisIn a Google group issue, a student posted a post asking for help, saying that the following problem should be solved: He has a list of addresses corresponding to the IP range, now you need to give an IP address, quickly
Redis is a CS-mode TCP server that uses a request response protocol similar to HTTP. A client can initiate multiple request commands through a socket connection. After each request command is sent, the client usually blocks and waits for the redis
After learning about various redis types, this article introduces the redis sorting command. redis supports sorting list, set, and sorted set elements. The complete command format of the sort command is as follows:
Sort key [by pattern] [limit start
Pub/sub is a message communication mode. The main purpose is to decouple the coupling between the message publisher and the message subscriber, which is similar to the observer mode in the design mode. Pub/sub not only solves the Direct Problem of
This document describes various data types supported by redis, including string, list, set, sorted set, and hash. Technorati label: redis cache list Storage
1. Keys Redis is essentially a key-value dB, so let's first look at its key. First, the
Transferred from timyang: http://timyang.net/data/redis-misunderstanding/
A major system fault occurred on Weibo a few days ago, and many technical friends are concerned about it. The reason is not as high as James Hamilton's on design and
This document describes various data types supported by redis, including string, list, set, sorted set, and hash.
1.
Keys
Redis is essentially a key-value dB, so let's first look at its key. First, the key is also a string type, but the key
1. introduction redis is an open-source key-value database. It is often considered a Data Structure server. Because its value includes not only the basic string type but also the list, set, sorted set and hash types. Of course, all the elements
Preface redis is often used for persistent storage in the project, but I don't know the principle of redis persistence. I will repost a blog here, so I can take a book note. Original article address: Workshop:
The client sends write operations to
Redis_version: 2.4.16 # redis versionRedis_git_sha1: 00000000Redis_git_dirty: 0Arch_bits: 64Multiplexing_api: epollGcc_version: 4.1.2 # GCC versionProcess_id: 10629 # ID of the current redis server processUptime_in_seconds: 145830 # running time
1. Simplified commands
Analysis: commands in redis Communication Protocol use the original set, get, hset, hget, and other strings, it can be replaced by a single byte, such as 0x01, 0x02, 0x03, and 0x04.
Benefits: reduces network transmission
Many operations in node. js are asynchronous, so there are pre-and post-dependent asynchronous operations, and the subsequent operations must be written into the callback function.
For example, to operate redis, set a key and obtain the value of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service