. NET distributed cache Redis from entry to practice,. net cache redis practice

Source: Internet
Author: User
Tags install redis

. NET distributed cache Redis from entry to practice,. net cache redis practice
I. course Introduction

Today, Alibaba Cloud stupid offers a NOSQL course. The main character of this session is Redis. I hope you will have a basic understanding of redis after completing this sharing course, and be familiar with and master the usage of Redis in. NET. This shared course contains the following knowledge points:

1. The StackExchange. Redis (SE) driver learns and uses several Redis data structures in C.

2. ServiceStack. Redis (SS) driver for learning and using Redis data structures in C.

3. Create and learn Redis master-slave cluster servers.

4. in ASP. NET, how does Redis host sessions.

5. How to Use Redis producers/consumers in C.

6. How to Use Redis's publish/subscribe function in C.

7. How to Use Redis transactions and locks in C.

If you are also interested in the course ". NET distributed cache Redis from getting started to practice", please study with Jack.

We don't need to talk much about it. We just need to get the dry goods directly. We don't make the dry goods, but we are just the porters of the dry goods.

Ii. Concepts

2.1 What is Redis?

Redis is an open-source, C-language distributed NoSQL Database System for "key/value" pairs of type data. Redis is generated purely for applications, it is a high-performance key-value database featuring high performance and persistent storage. It is applicable to high-concurrency application scenarios and provides APIs in multiple languages.

Redis Official Website: https://redis.io/

Multi-language client driver download: https://redis.io/clients

2.2 Redis features

Redis is completely open-source and free. It complies with the BSD Protocol and is a high-performance key-value database. Key-value cache products have the following three features:

● Apsaradb for Redis supports data persistence. It stores data in memory on disks and can be loaded and used again upon restart.

● Redis not only supports simple key-value data, but also provides storage of data structures such as list, set, zset, and hash.

● Redis supports data backup, that is, data backup in master-slave mode.

Iii. Install Redis For Windows

3.1 install apsaradb for Redis on Windows

Official website only provides linux Version Download Official Website: http://redis.io/download

Windows github: https://github.com/MSOpenTech/redis/tags

We recommend the following websites to learn about Redis:

Redis Chinese Network: http://www.redis.net.cn/

Websites that can write Redis instructions online: http://try.redis.io/http://doc.redisfans.com/

3.2 set up a master-slave Redis server cluster

 

Iv. Redis Data Structures

1. String (String)

This is the simplest Redis type. If you only use this type, Redis is like a persistent Memcached server.

2. List)

Redis List is implemented based on a two-way linked List and supports reverse lookup and traversal.

Common cases: Chat Systems, Obtaining users' latest posts on social networks, simple message queues, news paging lists, and blog comment systems.

3. Hash)

Hash is a ing table between fields and values of the String type. For details, see Hashtable and Dictionary in. NET. It is mainly used to store objects to avoid serialization overhead and concurrency modification control issues.

4. Set)

Set is also a list, but its special feature is that it can automatically re-arrange: When you need to store a list of data and do not want to duplicate it, set is a good choice (such as the Set of IDS ). In addition, Set provides an interface to determine whether a member is in a Set, which is not available in List.

5. Sorted Set)

Sorted Set and Set are used in similar scenarios. The difference is that Sorted Set performs automatic sorting based on the provided score parameters. When you need an ordered and non-repeated list of sets, you can select Sorted Set data structure. Common case: ranking in the game.

V. Introduction to Redis application scenarios VI. Use of Redis in. net vi. Share Redis practices and practices

1. StackExchange. Redis (SE) drives learning and using Redis data structures in C.

2. ServiceStack. Redis (SS) drives learning and using Redis data structures in C.

3. Create and learn Redis master-slave cluster servers.

4. in ASP. NET, how does Redis host sessions.

5. How to Use Redis producers/consumers in C.

6. How to Use Redis's publish/subscribe function in C.

7. How to Use Redis transactions and locks in C.

7. Online Learning and demonstration of source code

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.