Redis Essay set-using

Source: Internet
Author: User

Redis is an open source, Key-value database that is written in C and that supports network interaction, can be memory-based, and can be persisted.

A data set:

1.list-linked list Key-value form, through the list ID can be implemented push pop at Lpush, Rpush, Lrange and other operations with all the advantages and disadvantages of the queue, such as positioning slow, fast insertion and other characteristics

Can realize the function, 1. The paging function is realized by range; 2. It is a queue, in order, can be used as a task queue; 3. Of course, press Listid into the dictionary (map) to do distributed configuration

2.set--The set unordered collection has no duplicate data. You can implement intersection, draw and set, take difference set, and so on.

Implementation: Data discharge weight, used to orthogonal difference set can be used

3.sorted set--ordered collection, which is a sequential collection, each of which has a score, sorted according to score,

can do leaderboard; priority queue; Weight queue

4.strings--Simple key-value or individual key

5.hash hash table, this store is the corresponding hash value, query fast, O (n), but take up fixed large memory.

II: Event Notification

Registers an event, and when a value is modified, it is notified accordingly.

Can do the message queue, and other purposes.

Recommend a simple to understand: http://www.jb51.net/article/56448.htm

Redis Essay set-using

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.