Getting Start With Redis

I want to make a video of an IT tutorial, can you arrange the text content of the video tutorial for me according to the content of the website. Let’s start with the redis tutorial first, and you first give me a list of the content to be explained.

sure! The following is an outline of a Redis tutorial, you can make your IT tutorial video based on this outline:

  1. Introduction to Redis 1.1. What is Redis? 1.2. Features and advantages of Redis 1.3. Application scenarios of Redis
  2. Installation and configuration 2.1. Redis installation method 2.1.1. Windows platform installation 2.1.2. Linux platform installation 2.1.3. MacOS platform installation 2.2. Redis configuration 2.3. Start and stop Redis service
  3. Redis Data Types 3.1. String (String) 3.2. List (List) 3.3. Set (Set) 3.4. Ordered Set (Sorted Set) 3.5. Hash (Hash)
  4. Redis command 4.1. Introduction to common commands 4.2. String commands 4.3. List commands 4.4. Set commands 4.5. Ordered set commands 4.6. Hash commands 4.7. Key management commands
  5. Redis client and connection 5.1. Introduction to Redis client 5.2. Connection to Redis 5.3. Redis connection pool
  6. Redis Persistence 6.1. RDB Persistence 6.2. AOF Persistence 6.3. Comparison of RDB and AOF
  7. Redis transaction 7.1. Concept and characteristics of transaction 7.2. Redis transaction command 7.3. Example of transaction usage
  8. Redis Publish Subscribe 8.1. Concept of Publish Subscribe 8.2. Publish Subscribe Command 8.3. Example of Publish Subscribe
  9. Advanced features of Redis 9.1. Master-slave replication 9.2. Fragmentation 9.3. Cluster
  10. Comparison between Redis and other databases 10.1. Redis and relational databases 10.2. Redis and other NoSQL databases
  11. Application cases of Redis in actual projects 11.1. Cache system 11.2. Counter 11.3. Message queue 11.4. Leaderboard 11.5. Other application scenarios

Hope this outline helps you to make quality Redis tutorial videos. If you need more details, you can always let me know.

gun tei

Please explain in detail what is Redis?

The previous model used in this conversation is unavailable. We’ve switched you to the latest default model

Redis is an open source, memory-based, high-performance key-value pair storage database system, and its data model is key-value. Redis supports a variety of data structures, including strings, hashes, lists, sets, ordered sets, etc. These data structures enable Redis to meet different business needs, such as caches, counters, message queues, leaderboards, etc.

Redis was originally developed by Salvatore Sanfilippo and first released in 2009. It is written in C language and runs very fast. One of the characteristics of Redis is that it stores all data in memory, so it is very suitable for scenarios that need to read and write data quickly. In addition, Redis also supports persistence, which can save data in memory to disk to ensure data reliability.

Redis also has other features, such as transaction support, publish and subscribe, Lua script support, distributed locks, etc. These features make Redis applicable to various scenarios. Redis also has very active community support, and developers can obtain rich information and help through the Redis community.

In short, Redis is a fast, flexible, and reliable key-value pair storage database system. Its high performance and multiple data structures make it one of the most popular cache and storage solutions for Internet applications.

gun tei

Please explain the features and advantages of Redis in detail

As an in-memory database, Redis has the following features and advantages:

  1. High performance: Redis stores all data in memory, so the reading and writing speed is very fast, which can reach hundreds of thousands to millions of QPS (query rate per second).
  2. Multiple data structures: Redis supports multiple data structures, including strings, hashes, lists, sets, ordered sets, etc. These data structures can meet different business needs, such as caches, counters, message queues, leaderboards, etc.
  3. Persistence: Redis supports data persistence, and can save data in memory to disk to ensure data reliability.
  4. High concurrency: Redis is single-threaded and uses an event-driven approach to process client requests, so it can support high concurrency.
  5. Scalability: Redis supports distributed deployment, and data can be dispersed on multiple nodes to meet the needs of larger data volume and higher concurrency.
  6. Support transactions: Redis supports transactions, and multiple commands can be packaged into one transaction to ensure the atomicity of these commands.
  7. Publish-subscribe: Redis supports publish-subscribe mode, which allows multiple clients to subscribe to a channel to broadcast and subscribe messages.
  8. Lua script support: Redis supports Lua scripts, which can execute some complex business logic through scripts.
  9. Open source and free: Redis is open source, and users are free to use and modify its source code.
  10. Active community: Redis has very active community support, and users can obtain rich information and help through the Redis community.

In short, as an in-memory database, Redis has the characteristics and advantages of high performance, multiple data structures, persistence, high concurrency, scalability, support for transactions, publish subscription, Lua script support, etc. These features make Redis an Internet application One of the most popular caching and storage solutions in .

gun tei

Please explain the application scenarios of Redis in detail

As a high-performance, multi-functional memory database, Redis can be applied to various scenarios. The following are the main application scenarios of Redis:

  1. Caching: The most common use of Redis is caching. Using Redis as a cache can greatly speed up the response speed and throughput of the application. For example, caching frequently accessed data in Redis can reduce the load on the database and improve the response speed of the application.
  2. Counter: Redis’s atomic operations and high concurrency performance make it very suitable for the implementation of counters. For example, the INCR command of Redis can be used to implement the counter function, which can ensure that there will be no competition problems when multiple clients operate on the counter at the same time.
  3. Message queue: Redis supports list data structure, and Redis can be used as a message queue. For example, you can use the LPUSH and RPUSH commands of Redis to add messages to the list, and use the BRPOP and BLPOP commands to pop messages from the list to implement a simple and efficient message queue.
  4. Leaderboard: Redis supports an ordered collection data structure, and Redis can be used as a leaderboard. For example, you can use the ZADD command of Redis to add members to the ordered set, and use the ZREVRANGE command to get the top N members to achieve an efficient leaderboard function.
  5. Distributed lock: Redis supports the SETNX command, which can be used to implement distributed locks to ensure data consistency in distributed systems.
  6. Instant messaging: Redis supports publish-subscribe mode, and Redis can be used as an implementation of instant messaging. For example, you can use Redis’s PUBLISH command to publish messages, and use SUBSCRIBE and UNSUBSCRIBE commands to subscribe and unsubscribe messages.
  7. Session cache: Redis supports string data structures, and Redis can be used as a session cache. For example, user session information can be stored in Redis to avoid frequent database queries and improve application response speed.

In short, as a high-performance, multi-functional memory database, Redis can be applied to various scenarios such as cache, counter, message queue, leaderboard, distributed lock, instant message, session cache, etc. These application scenarios make Redis a One of the most popular caching and storage solutions for Internet applications.

gun tei

Please explain in detail how to install Redis

Redis can be installed and used on various operating system platforms. The following are the installation methods of Redis on Windows, Linux and MacOS platforms:

  1. Install Redis on Windows platform On the Windows platform, you can download the latest version of the Redis installation package from the Redis official website, and then follow the steps below to install it:
    1. Download the Redis installation package: Download the Windows version of the Redis installation package from the Redis official website ( https://redis.io/download).
    2. Unzip the installation package: Unzip the downloaded installation package to a specified directory, such as the D:\Redis directory.
    3. Configure Redis: In the Redis directory, find the redis.windows.conf file, open and modify the configuration information. For example, you can set the Redis port to 6379, and set the Redis log file path to D:\Redis\log\redis.log.
    4. Start Redis: In the Redis directory, double-click the redis-server.exe file to start the Redis service.
    5. Using Redis: Open a command prompt window, enter the Redis directory, enter the redis-cli.exe command, enter the Redis command line interface, and you can use Redis.
  2. Install Redis on the Linux platform On the Linux platform, you can use the package management tool to install Redis. For example, on Ubuntu, you can use the apt-get command to install Redis. The specific steps are as follows:
    1. Update the package manager: Update the package manager with the following command: sqlCopy codesudo apt-get update
    2. Install Redis: Install Redis using the following command: arduinoCopy codesudo apt-get install redis-server
    3. Start Redis: Start the Redis service with the following command: sqlCopy codesudo systemctl start redis-server
    4. Using Redis: Use the following command to enter the Redis command line interface: Copy coderedis-cli
  3. Installing Redis on the MacOS platform On the MacOS platform, you can use the Homebrew package manager to install Redis. The specific steps are as follows:
    1. Install Homebrew: Open a terminal and use the following command to install Homebrew: bashCopy code/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    2. Install Redis: Install Redis using the following command: Copy codebrew install redis
    3. Start Redis: Start the Redis service with the following command: sqlCopy codebrew services start redis
    4. Using Redis: Use the following command to enter the Redis command line interface: Copy coderedis-cli

The above are the installation methods of Redis on Windows, Linux and MacOS platforms, just choose the corresponding installation method according to actual needs.

gun tei

Please explain Redis Windows platform installation in detail

The installation of Redis on the Windows platform can be divided into the following steps:

  1. Download the Redis installation package: Download the Windows version of the Redis installation package from the Redis official website ( https://redis.io/download), and select the latest stable version (Stable) to download.
  2. Unzip the installation package: Unzip the downloaded installation package to a specified directory, such as the D:\Redis directory, and get the following files and directories: sqlCopy codeD:\Redis\ ├── redis-benchmark.exe ├── redis-check-aof.exe ├── redis-check-rdb.exe ├── redis-cli.exe ├── redis-server.exe ├── redis.windows.conf ├── 00-RELEASENOTES ├── BUGS ├── COPYING ├── INSTALL ├── README.md ├── UPGRADE ├── CONTRIB ├── deps ├── redis-trib.rb ├── runtest ├── sentinel.conf ├── tests └── utils
  3. Configure Redis: In the Redis directory, find the redis.windows.conf file, open it with a text editor and modify the configuration information. For example, you can set the Redis port to 6379, and set the Redis log file path to D:\Redis\log\redis.log. bashCopy code# Redis配置文件 # 绑定的IP地址,默认绑定127.0.0.1 bind 127.0.0.1 # Redis监听的端口,默认为6379 port 6379 # 日志文件的路径,默认为stdout(标准输出) logfile "D:\\Redis\\log\\redis.log" # 日志级别,共有四个级别:debug、verbose、notice、warning,默认为verbose loglevel verbose # 数据库的数量,默认为16个 databases 16 # 数据库文件的存储路径,默认为当前目录下的dump.rdb文件 dir ./ # 是否开启持久化,默认为no save 900 1 save 300 10 save 60 10000
  4. Start Redis: In the Redis directory, double-click the redis-server.exe file to start the Redis service. If all goes well, the Redis service will start and output the following information: csharpCopy code[8464] 22 Apr 21:11:03.954 # Server started, Redis version 6.0.10 [8464] 22 Apr 21:11:03.954 * DB loaded from disk: 0.000 seconds [8464] 22 Apr 21:11:03.954 * Ready to accept connections
  5. Using Redis: Open a command prompt window, enter the Redis directory, enter the redis-cli.exe command, enter the Redis command line interface, and you can use Redis. makefileCopy codeD:\Redis>redis-cli.exe 127.0.0.1:6379>

The above is the installation method of Redis on the Windows platform, just choose the corresponding installation method according to the actual needs.

gun tei

Please explain Redis Linux platform installation in detail

The installation of Redis on the Linux platform can be divided into the following steps:

  1. Update the package manager: Update the package manager with the following command: sqlCopy codesudo apt-get update
  2. Install Redis: Use the following command to install Redis: arduinoCopy code sudo apt-get install redis-server After executing this command, the system will automatically download and install Redis. During the installation process, the system may prompt the user to enter confirmation information, such as the Redis license agreement, etc., and the user needs to follow the prompts.
  3. Start Redis: Use the following command to start the Redis service: sqlCopy code sudo systemctl start redis-server If the Redis service has been started successfully, there will be no output.
  4. Set Redis to start automatically at boot: Use the following command to set the Redis service to start automatically when the system starts: bashCopy codesudo systemctl enable redis-server
  5. Check the status of the Redis service: Use the following command to check the status of the Redis service: luaCopy code sudo systemctl status redis-server If the Redis service is running, the following information will be output: yamlCopy code● redis-server.service - Advanced key-value store Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-04-27 12:34:56 CST; 10s ago Main PID: 12345 (redis-server) Tasks: 4 (limit: 4915) Memory: 2.2M CGroup: /system.slice/redis-server.service └─12345 /usr/bin/redis-server 127.0.0.1:6379
  6. Using Redis: Use the following command to enter the Redis command line interface: Copy coderedis-cli

The above is the installation method of Redis on the Linux platform, just choose the corresponding installation method according to the actual needs.

gun tei

Please explain Redis MacOS platform installation in detail

The installation of Redis on the MacOS platform can be divided into the following steps:

  1. Install Homebrew: Open a terminal and use the following command to install Homebrew: bashCopy code/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install Redis: Use the following command to install Redis: Copy code brew install redis After executing this command, the system will automatically download and install Redis. During the installation process, the system may prompt the user to enter confirmation information, such as the Redis license agreement, etc., and the user needs to follow the prompts.
  3. Start Redis: Use the following command to start the Redis service: sqlCopy code brew services start redis If the Redis service has been started successfully, there will be no output.
  4. Set Redis to start automatically at boot: The Redis service has been added as a Homebrew service, which can be automatically started and stopped without setting the boot to start automatically.
  5. Using Redis: Use the following command to enter the Redis command line interface: Copy coderedis-cli

The above is the installation method of Redis on the MacOS platform, just choose the corresponding installation method according to the actual needs.

gun tei

Please explain configuring Redis in detail

The configuration file of Redis is redis.conf, which is located in the installation directory of Redis. The configuration of Redis can be realized by modifying the configuration file. The following are some commonly used configuration items and their meanings:

  1. bind: Specifies the IP address bound to Redis, the default is 127.0.0.1. You can set this value to 0.0.0.0, indicating that Redis listens to all IP addresses.
  2. port: Specify the port that Redis listens to, the default is 6379. This value can be set to other values ​​such as 6380, 6381, etc.
  3. daemonize: Specify whether Redis runs as a daemon process, the default is no. If you need to run Redis as a service, you need to set this value to yes.
  4. pidfile: Specifies the PID file path of the Redis daemon, the default is /var/run/redis.pid.
  5. logfile: Specify the path of the Redis log file, the default is standard output (stdout).
  6. databases: Specify the number of databases supported by Redis, the default is 16. It can be adjusted according to actual needs.
  7. dbfilename: Specify the name of the Redis database file, the default is dump.rdb. This value can be set to other values.
  8. dir: Specifies the storage path of the Redis database file, which is the installation directory of Redis by default.
  9. maxclients: Specify the maximum number of clients supported by Redis at the same time, the default is 10000. It can be adjusted according to actual needs.
  10. requirepass: Specify the password that needs to be entered when the Redis client connects. You can set this value to any string, indicating that Redis requires password authentication to connect.
  11. maxmemory: Specifies the maximum amount of memory used by Redis. The default is 0, which means that the memory usage is not limited. It can be adjusted according to actual needs.
  12. appendonly: Specifies whether Redis enables AOF (Append Only File) mode, the default is no. You can set this value to yes, which means to enable the AOF mode.
  13. appendfilename: Specify the name of the Redis AOF file, the default is appendonly.aof. This value can be set to other values.
  14. appendfsync: Specifies the synchronization policy of Redis AOF files, the default is everysec, which means that AOF files are synchronized every second. The value can be set to always, which means that the AOF file is synchronized every time it is written, or set to no, which means that the AOF file is not synchronized.

The above are some commonly used Redis configuration items, which can be adjusted according to actual needs. After modifying the Redis configuration file, you need to restart the Redis service to take effect.

gun tei

Please explain in detail about starting and stopping the Redis service

The start and stop of the Redis service can be performed in different ways according to different operating system platforms.

  1. Start and stop the Redis service on the Windows platform On the Windows platform, you can use the following commands to start and stop the Redis service:
    • Start the Redis service: double-click the redis-server.exe file in the Redis installation directory, or execute the following command in the command prompt window: Copy coderedis-server.exe redis.windows.conf
    • Stop the Redis service: Execute the following command in the command prompt window: arduinoCopy coderedis-cli.exe shutdown
  2. Starting and stopping the Redis service on Linux platform On the Linux platform, you can use the following commands to start and stop the Redis service:
    • Start the Redis service: Use the following command to start the Redis service: sqlCopy codesudo systemctl start redis-server
    • Stop the Redis service: Use the following command to stop the Redis service: arduinoCopy codesudo systemctl stop redis-server
  3. Start and stop the Redis service on the MacOS platform On the MacOS platform, you can use the following commands to start and stop the Redis service:
    • Start the Redis service: Use the following command to start the Redis service: sqlCopy codebrew services start redis
    • Stop the Redis service: Use the following command to stop the Redis service: arduinoCopy codebrew services stop redis

In the above command, sudo means that you need to use administrator privileges to operate. Select the corresponding method of starting and stopping the Redis service according to actual needs.

gun tei

Please explain the Redis data type string (String) in detail

In Redis, string (String) is one of the most basic data types and one of the most commonly used data types. Strings can store any type of data, including numbers, text, binary data, and more.

In Redis, strings can be manipulated with:

  1. Set the value of a string: Use the SET command to set the value of a string. For example, the following command sets the value of the string whose key is name to Tom: sqlCopy code The SET name Tom syntax of this command is: cssCopy code SET key value [EX seconds] [PX milliseconds] [NX|XX] where key represents the name of the string and value represents the value of the string. The EX and PX options are used to set the expiration time of the string, and the NX and XX options are used to set whether to execute the command only when the key does not exist or already exists.
  2. Get the value of a string: Use the GET command to get the value of a string. For example, the following command gets the value of the string whose key is name: sqlCopy code GET name If the key does not exist, the GET command will return nil.
  3. Modify the value of a string: Use the SET command to modify the value of a string. For example, the following command changes the value of the string whose key is name to Jerry: sqlCopy code The SET name Jerry syntax of this command is the same as setting the value of a string.
  4. Get the length of a string: Use the STRLEN command to get the length of a string. For example, the following command obtains the length of the string whose key is name: Copy codeSTRLEN name
  5. Append the value of a string: Use the APPEND command to append content to the end of a string value. For example, the following command appends the string hello to the end of the value of the string whose key is greeting: Copy codeAPPEND greeting hello
  6. Self-increment and self-decrement: Use the INCR and DECR commands to perform self-increment and self-decrement operations on the value of a string. For example, the following command adds 1 to the value of the string whose key is count: Copy code INCR count Similarly, you can use the DECR command to subtract 1 from the value of a string.
  7. Set the expiration time of a string: Use the EXPIRE command to set the expiration time of a string. For example, the following command sets the expiration time of the string whose key is name to 60 seconds: Copy code EXPIRE name 60 If the key does not exist, the EXPIRE command will have no effect.

The above are some commonly used Redis string commands, which can be selected and used according to actual needs. As one of the most commonly used data types in Redis, string has high flexibility and scalability.

gun tei

Please explain the Redis data type List (List) in detail

In Redis, a list (List) is an ordered data structure that can store multiple elements of the same type. Unlike arrays, lists can dynamically add and remove elements without specifying the length of the list in advance.

In Redis, lists can be manipulated with the following commands:

  1. Adding elements: Use the LPUSH or RPUSH command to add one or more elements to the head or tail of the list. For example, the following command adds elements Tom and Jerry to the head of the list whose key is names: rCopy code The LPUSH names Tom Jerry syntax of the command is: cssCopy code LPUSH key value [value ...] RPUSH key value [value ...] Among them, LPUSH means adding elements to the head of the list, and RPUSH means adding elements to the end of the list.
  2. Get element: Use LINDEX command to get the element at the specified position in the list. For example, the following command obtains the first element in the list whose key is names: LINDEX names 0 the position of elements in the rCopy code list starts from 0, -1 indicates the last element, -2 indicates the penultimate element, and so on.
  3. Get the length of the list: Use the LLEN command to get the length of the list. For example, the following command gets the length of the list whose key is names: rCopy codeLLEN names
  4. Deleting an element: Use the LPOP or RPOP command to delete an element from the head or tail of the list. For example, the following command deletes an element from the head of the list whose key is names: rCopy code LPOP names If you need to delete an element at a specified position in the list, you can use the LREM command. For example, the following command removes the first element whose value is Tom from the list whose key is names: rCopy codeLREM names 1 Tom
  5. Get a part of the elements of the list: Use the LRANGE command to get the elements in the specified range in the list. For example, the following command obtains the first two elements in the list whose key is names: rCopy code LRANGE names 0 1 Among them, 0 indicates the start position of the interval, and 1 indicates the end position of the interval. If the end of the range exceeds the length of the list, the LRANGE command will automatically truncate.
  6. Insert element: Use the LINSERT command to insert an element at a specified position in the list. For example, the following command inserts an element Bob before Jerry in the list whose key is names: rCopy codeLINSERT names BEFORE Jerry Bob

The above are some commonly used Redis list commands, which can be selected and used according to actual needs. As one of the very useful data structures in Redis, the list can be used to implement data structures such as queues and stacks, and has high flexibility and scalability.

gun tei

Please explain the Redis data type collection (Set) in detail

In Redis, a set (Set) is an unordered data structure that can store multiple unique elements of the same type. The elements in the set are unordered and duplicates are not allowed.

In Redis, collections can be manipulated with the following commands:

  1. Adding elements: Use the SADD command to add one or more elements to the collection. For example, the following command adds elements Tom and Jerry to the collection whose key is names: rCopy code The SADD names Tom Jerry syntax of this command is: sqlCopy codeSADD key member [member ...]
  2. Get elements: Use the SMEMBERS command to get all the elements in the collection. For example, the following command obtains all elements in the collection whose key is names: rCopy code SMEMBERS names In addition, use the SISMEMBER command to determine whether the specified element exists in the collection. For example, the following command determines whether the element Tom exists in the collection whose key is names: rCopy codeSISMEMBER names Tom
  3. Obtain the length of the collection: Use the SCARD command to obtain the length of the collection. For example, the following command gets the length of the collection whose key is names: rCopy codeSCARD names
  4. Delete elements: Use the SREM command to delete one or more elements from a collection. For example, the following command deletes the element Jerry from the collection whose key is names: rCopy codeSREM names Jerry
  5. Operations between sets: Redis supports operations such as intersection, union, and difference of multiple sets.
    • Intersection operation: Use the SINTER command to obtain the intersection of multiple sets. For example, the following command obtains the intersection of two collections whose keys are names and whose keys are colors: rCopy codeSINTER names colors
    • Union set operation: Use the SUNION command to obtain the union of multiple sets. For example, the following command obtains the union of two collections whose key is names and whose key is colors: rCopy codeSUNION names colors
    • Difference operation: Use the SDIFF command to obtain the difference of multiple sets. For example, the following command obtains the difference between two collections whose key is names and whose key is colors: rCopy codeSDIFF names colors

The above are some commonly used Redis collection commands, which can be selected and used according to actual needs. Set, as one of the very useful data structures in Redis, has high flexibility and scalability, and can be used to implement some common data structures and algorithms, such as weight ranking, mutual friends, etc.

gun tei

Please explain in detail the Redis data type ordered collection (Sorted Set)

In Redis, an ordered set (Sorted Set) is an ordered data structure, each element has a score (score), and the elements can be sorted according to the size of the score. Each element in an ordered set must be unique, but scores can be repeated.

In Redis, you can use the following commands to manipulate sorted collections:

  1. Adding elements: Use the ZADD command to add one or more elements to an ordered collection. For example, the following command adds an element Tom with a score of 80 to the ordered collection whose key is students: Copy code The ZADD students 80 Tom syntax of this command is: sqlCopy codeZADD key score member [score member ...]
  2. Get elements: Use the ZRANGE command to get the elements in the specified interval in the ordered set. For example, the following command obtains the top three elements in the ordered set whose key is students: Copy code ZRANGE students 0 2 Among them, 0 indicates the starting position of the interval, and 2 indicates the end position of the interval. If you need to get the elements within the specified score range, you can use the ZRANGEBYSCORE command.
  3. Get the rank and score of an element: Use the ZRANK and ZSCORE commands to get the rank and score of a specified element in an ordered set, respectively. For example, the following command gets Tom’s rank and score in the sorted set whose key is students:ZRANK students Tom ZSCORE students Tom
  4. Delete elements: Use the ZREM command to delete one or more elements from an ordered collection. For example, the following command deletes Tom from the sorted set whose key is students: Copy codeZREM students Tom
  5. Obtain the length of the ordered collection: Use the ZCARD command to obtain the length of the ordered collection. For example, the following command gets the length of the sorted set whose key is students: Copy codeZCARD students
  6. Get elements according to the score range: Use the ZRANGEBYSCORE command to get elements within the specified score range in the sorted set. For example, the following command gets the elements whose scores are between 80 and 100 in the sorted set whose key is students: Copy codeZRANGEBYSCORE students 80 100
  7. Get the number of elements in the fractional range of the specified element: Use the ZCOUNT command to get the number of elements in the fractional range of the specified element in the sorted set. For example, the following command gets the number of elements whose scores are between 80 and 100 in the sorted set whose key is students: Copy codeZCOUNT students 80 100

The above are some commonly used Redis ordered collection commands, which can be selected and used according to actual needs. As one of the very useful data structures in Redis, ordered collections can be used to implement functions such as leaderboards and popular product lists.

gun tei

Please explain the Redis data type Hash in detail

In Redis, a hash (Hash) is a collection of key-value pairs, where each key corresponds to a value. Like strings, hashes are also a data type for storing and reading data, but hashes are more suitable for storing structured data, such as objects, than strings.

In Redis, hashes can be manipulated with:

  1. Add a key-value pair: Use the HSET command to add a key-value pair to the hash. For example, the following command adds a key-value pair to the hash whose key is student, the key is name, and the value is Tom: Copy code The HSET student name Tom syntax of this command is: vbnetCopy codeHSET key field value
  2. Get the key-value pair: Use the HGET command to get the value corresponding to the specified key in the hash. For example, the following command gets the value whose key is name in the hash whose key is student: Copy codeHGET student name
  3. Get all key-value pairs: Use the HGETALL command to get all key-value pairs in the hash. For example, the following command gets all key-value pairs in the hash whose key is student: Copy codeHGETALL student
  4. Delete key-value pairs: Use the HDEL command to delete one or more key-value pairs from the hash. For example, the following command deletes the key-value pair whose key is name from the hash whose key is student: Copy codeHDEL student name
  5. Get the number of key-value pairs: Use the HLEN command to get the number of key-value pairs in the hash. For example, the following command gets the number of key-value pairs in the hash whose key is student: Copy codeHLEN student
  6. Determine whether the key exists: Use the HEXISTS command to determine whether the specified key exists in the hash. For example, the following command determines whether the key named name exists in the hash whose key is student: Copy codeHEXISTS student name

The above are some commonly used Redis hash commands, which can be selected and used according to actual needs. As one of the very useful data structures in Redis, hash can be used to store and manipulate structured data, such as objects, user information, etc.

gun tei

Please explain in detail the introduction of common commands of Redis commands

Redis is a feature-rich key-value storage system that provides a wealth of commands for manipulating and managing data. The following are some commonly used Redis commands:

  1. KEY operation:
    • KEYS pattern: Get all key names matching the specified pattern.
    • DEL key [key …]: Delete the specified key or keys.
    • EXISTS key: Checks whether the specified key exists.
    • TYPE key: Returns the data type of the value stored at the specified key.
    • TTL key: Get the expiration time of the specified key.
    • PERSIST key: Remove the expiration time of the specified key to make it permanently valid.
    • RENAME oldkey newkey: Change the name of the specified key to the new name.
  2. String manipulation:
    • SET key value [EX seconds] [PX milliseconds] [NX|XX]: Set a key-value pair, the optional parameters EX and PX specify the expiration time respectively, NX means that it can be set only when the key does not exist, and XX means only when the key exists to be set.
    • GET key: Get the value of the specified key.
    • INCR key: Increment the value of the specified key by 1.
    • DECR key: Decrease the value of the specified key by 1.
  3. List operations:
    • LPUSH key value [value …]: Add one or more elements to the head of the list.
    • RPUSH key value [value …]: Add one or more elements to the end of the list.
    • LPOP key: Remove an element from the head of the list.
    • RPOP key: Remove an element from the end of the list.
    • LINDEX key index: Get the element at the specified position.
    • LLEN key: Get the length of the list.
  4. Collection operations:
    • SADD key member [member …]: Add one or more elements to the set.
    • SMEMBERS key: Get all elements in the collection.
    • SISMEMBER key member: Determine whether the specified element exists in the set.
    • SCARD key: Get the length of the collection.
    • SINTER key [key …]: Get the intersection of multiple sets.
    • SUNION key [key …]: Get the union of multiple collections.
    • SDIFF key [key …]: Get the difference of multiple sets.
  5. Ordered set operations:
    • ZADD key score member [score member …]: Add one or more elements to the sorted set.
    • ZRANGE key start stop [WITHSCORES]: Get the elements in the specified interval in the ordered set.
    • ZRANK key member: Get the rank of the specified element in the ordered set.
    • ZREM key member [member …]: Remove one or more elements from the sorted set.
  6. Hash operation:
    • HSET key field value: Adds a key-value pair to the hash.
    • HGET key field: Get the value of the specified key in the hash.
    • HGETALL key: Get all key-value pairs in the hash.
    • HDEL key field [field …]: Remove one or more key-value pairs from the hash.

The above are some commonly used Redis commands, which can be

gun tei

please continue

actual needs to select and use. In addition to the commands mentioned above, Redis also provides many other useful commands, such as:

  1. Publish and subscribe:
    • PUBLISH channel message: Send a message to the specified channel.
    • SUBSCRIBE channel [channel …]: Subscribe to one or more channels.
  2. Transaction processing:
    • MULTI: Start a new transaction.
    • EXEC: Execute all commands in the transaction.
    • DISCARD: Discard all commands in the transaction.
  3. other:
    • ECHO message: Returns the specified message.
    • INFO [section]: Get the information of the Redis server.
    • FLUSHALL: Delete all keys in the database.
    • SELECT index: switch to the specified database.

The above are some commonly used Redis commands, which can be selected and used according to actual needs. Redis provides a wealth of commands for operating and managing data, and developers can choose the commands that suit them according to their needs.

gun tei

Please explain the Redis command string commands in detail

In Redis, string is one of the most basic data types, and a series of commands can be used to manipulate strings. The following are some commonly used Redis string commands:

  1. SET: Set key-value pairs.
    • SET key value: Set the value of the specified key.
    • SETEX key seconds value: Set the value of the specified key and specify the expiration time.
    • SETNX key value: Set the value of the specified key only if the specified key does not exist.
  2. GET: Get the value of the specified key.
    • GET key: Get the value of the specified key.
  3. INCR/DECR: Increment or decrement the value of the specified key.
    • INCR key: Increment the value of the specified key by 1.
    • DECR key: Decrease the value of the specified key by 1.
    • INCRBY key increment: Increase the value of the specified key by the specified amount.
    • DECRBY key decrement: Decreases the value of the specified key by the specified amount.
  4. APPEND: Appends content to the end of the value for the specified key.
    • APPEND key value: Append the specified content to the end of the value of the specified key.
  5. STRLEN: Get the length of the specified key value.
    • STRLEN key: Get the length of the specified key value.
  6. MGET/MSET: Get/set multiple key-value pairs in batches.
    • MGET key [key …]: Get the values ​​of multiple specified keys.
    • MSET key value [key value …]: Set multiple key-value pairs.
  7. GETSET: Set the new value of the specified key and return the original value.
    • GETSET key value: Set the new value of the specified key and return the original value.
  8. STRALGO: Perform various string operations on the specified key value.
    • STRALGO LCS key [key …]: Find the longest common substring between specified key values.

The above are some commonly used Redis string commands, which can be selected and used according to actual needs. Redis provides a wealth of string commands, allowing developers to easily manipulate and manage string-type data.

gun tei

Please explain the Redis command list command in detail

In Redis, a list is one of the basic data types, and a series of commands can be used to manipulate the list. Here are some commonly used Redis list commands:

  1. LPUSH/RPUSH: Add one or more elements to the head or tail of the list.
    • LPUSH key value [value …]: Add one or more elements to the head of the list.
    • RPUSH key value [value …]: Add one or more elements to the end of the list.
  2. LPOP/RPOP: Remove an element from the head or tail of the list.
    • LPOP key: Remove an element from the head of the list.
    • RPOP key: Remove an element from the end of the list.
  3. LINDEX: Get the element at the specified position.
    • LINDEX key index: Get the element at the specified position.
  4. LLEN: Get the length of the list.
    • LLEN key: Get the length of the list.
  5. LRANGE: Get the elements in the specified range.
    • LRANGE key start stop: Get the elements within the specified range in the list.
  6. LREM: Remove the specified element from the list.
    • LREM key count value: Removes the specified number of specified elements from the list.
  7. LTRIM: Trim the list, keeping only the elements within the specified range.
    • LTRIM key start stop: Only keep the elements within the specified range, and delete other elements.
  8. BLPOP/BRPOP: Blockingly pop the head or tail elements of the list.
    • BLPOP key [key …] timeout: Blockingly pops the head element of the list.
    • BRPOP key [key …] timeout: Blockingly pops the tail element of the list.

The above are some commonly used Redis list commands, which can be selected and used according to actual needs. Redis provides a wealth of list commands, allowing developers to easily manipulate and manage list-type data.

gun tei

Please explain the Redis command set command in detail

In Redis, a collection is one of the basic data types, and a series of commands can be used to manipulate the collection. The following are some commonly used Redis collection commands:

  1. SADD: Adds one or more elements to a collection.
    • SADD key member [member …]: Add one or more elements to the set.
  2. SMEMBERS: Get all the elements in the collection.
    • SMEMBERS key: Get all elements in the collection.
  3. SISMEMBER: Determines whether the specified element exists in the collection.
    • SISMEMBER key member: Determine whether the specified element exists in the set.
  4. SCARD: Get the length of the collection.
    • SCARD key: Get the length of the collection.
  5. SINTER/SUNION/SDIFF: Perform intersection, union, and difference operations on multiple sets.
    • SINTER key [key …]: Get the intersection of multiple sets.
    • SUNION key [key …]: Get the union of multiple collections.
    • SDIFF key [key …]: Get the difference of multiple sets.
  6. SREM: Removes one or more elements from a collection.
    • SREM key member [member …]: Remove one or more elements from the set.
  7. SPOP: Randomly pops an element from a collection.
    • SPOP key: Randomly pops an element from the collection.

The above are some commonly used Redis collection commands, which can be selected and used according to actual needs. Redis provides a wealth of collection commands, allowing developers to easily operate and manage collection-type data.

gun tei

Please explain the Redis command ordered set command in detail

In Redis, an ordered set is one of the basic data types, and a series of commands can be used to operate the ordered set. The following are some commonly used Redis ordered collection commands:

  1. ZADD: Add one or more elements to an ordered collection.
    • ZADD key score member [score member …]: Add one or more elements to the sorted set.
  2. ZRANGE: Get the elements in the specified range in the ordered collection.
    • ZRANGE key start stop [WITHSCORES]: Get the elements in the specified interval in the ordered set. If WITHSCORES is specified, return the elements and corresponding scores.
  3. ZRANK: Get the rank of the specified element in the sorted set.
    • ZRANK key member: Get the rank of the specified element in the ordered set.
  4. ZREM: Remove one or more elements from a sorted set.
    • ZREM key member [member …]: Remove one or more elements from the sorted set.
  5. ZSCORE: Gets the score of the specified element in the sorted set.
    • ZSCORE key member: Get the score of the specified element in the sorted set.
  6. ZCOUNT: Gets the number of elements in the sorted set within the specified score range.
    • ZCOUNT key min max: Get the number of elements in the specified score range in the sorted set.
  7. ZRANGEBYSCORE: Get elements within the specified score range in an ordered collection.
    • ZRANGEBYSCORE key min max [WITHSCORES]: Get the elements within the specified score range in the sorted set. If WITHSCORES is specified, return the element and the corresponding score.

The above are some commonly used Redis ordered collection commands, which can be selected and used according to actual needs. Redis provides a wealth of ordered collection commands, allowing developers to easily operate and manage ordered collection data.

gun tei

Please explain the Redis command hash command in detail

In Redis, a hash is one of the basic data types, and a series of commands can be used to manipulate the hash. Here are some commonly used Redis hash commands:

  1. HSET: Set the value of a field in the hash table.
    • HSET key field value: Set the value of a field in the hash table.
  2. HGET: Get the value of the specified field in the hash table.
    • HGET key field: Get the value of the specified field in the hash table.
  3. HMSET/HMGET: Set/get the values ​​of multiple fields in the hash table.
    • HMSET key field value [field value …]: Set the value of multiple fields in the hash table.
    • HMGET key field [field …]: Get the values ​​of multiple fields in the hash table.
  4. HDEL: Remove one or more fields from a hash table.
    • HDEL key field [field …]: Delete one or more fields from the hash table.
  5. HEXISTS: Determine whether the specified field exists in the hash table.
    • HEXISTS key field: Determine whether the specified field exists in the hash table.
  6. HKEYS/HVALS: Get all fields/values ​​in the hash table.
    • HKEYS key: Get all the fields in the hash table.
    • HVALS key: Get all the values ​​in the hash table.
  7. HLEN: Get the number of fields in the hash table.
    • HLEN key: Get the number of fields in the hash table.
  8. HINCRBY: Increase the value of the specified field in the hash table by the specified amount.
    • HINCRBY key field increment: Increase the value of the specified field in the hash table by the specified amount.

The above are some commonly used Redis hash commands, which can be selected and used according to actual needs. Redis provides a wealth of hash commands, allowing developers to easily operate and manage hash-type data.

gun tei

Please explain the Redis command key management commands in detail

In Redis, key management is a basic operation, and a series of commands can be used to manage keys. Here are some commonly used Redis key management commands:

  1. DEL: Delete one or more keys.
    • DEL key [key …]: Delete one or more keys.
  2. EXISTS: Determine whether the specified key exists.
    • EXISTS key: Determine whether the specified key exists.
  3. KEYS: Get a list of key names matching the specified pattern.
    • KEYS pattern: Get a list of key names matching the specified pattern.
  4. EXPIRE: Set the expiration time of the specified key.
    • EXPIRE key seconds: Set the expiration time of the specified key in seconds.
  5. TTL: Get the expiration time of the specified key.
    • TTL key: Get the expiration time of the specified key in seconds.
  6. RENAME: Rename the specified key.
    • RENAME key newkey: Rename the specified key.
  7. TYPE: Get the data type of the specified key.
    • TYPE key: Get the data type of the specified key, the return value can be string, list, set, zset, hash.

The above are some commonly used Redis key management commands, which can be selected and used according to actual needs. Redis provides a wealth of key management commands, allowing developers to easily operate and manage keys.

gun tei

Please explain in detail the introduction of Redis client and connecting Redis client

A Redis client refers to a program or tool that connects to and communicates with a Redis server. Redis clients can be command-line tools, GUI tools, web applications, etc., and can be written in a variety of programming languages. The Redis client can communicate with the Redis server using the Redis protocol and perform various operations and queries.

The connection Redis client refers to the client program that establishes a connection with the Redis server. The Redis server supports multiple connection methods, including TCP connections, Unix Socket connections, and SSL/TLS encrypted connections. You can use Redis’s built-in command line tools such as redis-cli, GUI tools such as Redis Desktop Manager, and Redis client libraries in various programming languages ​​to connect to the Redis server.

When connecting to the Redis server, you need to specify the address and port number of the Redis server. If the Redis server uses password authentication, you also need to enter the authentication password to successfully connect. After a successful connection, you can use the Redis protocol to send various commands to perform various operations and queries.

It should be noted that when connecting to the Redis server, you need to follow the security configuration of the Redis server, such as only allowing specific IP addresses or using SSL/TLS encrypted connections. Otherwise, it may lead to security issues such as malicious attacks on the Redis server or data leakage.

gun tei

Please explain Redis client and connection in detail

The Redis client refers to a program or tool that reads, writes and operates data by connecting to the Redis server. It can be written in a variety of programming languages, such as Python, Java, Node.js, etc., or it can be a command line tool, a graphical interface tool, or a Web applications etc. The Redis client communicates with the Redis server by establishing a connection with the Redis server, using the Redis protocol to send commands and receive responses.

Connecting to Redis refers to establishing a connection with the Redis server. The Redis server supports multiple connection methods, including TCP connections, Unix Socket connections, and SSL/TLS encrypted connections. To connect to Redis, you can use Redis’ own command line tools such as redis-cli, Redis Desktop Manager and other GUI tools, and Redis client libraries in various programming languages.

When connecting to Redis, you need to specify the address and port number of the Redis server. If password authentication is set on the Redis server, you also need to provide a password for authentication. After the connection is successful, the client can use the Redis protocol to send various commands to perform various operations and queries. For example:

rubyCopy code$ redis-cli -h 127.0.0.1 -p 6379
127.0.0.1:6379> SET key1 value1
OK
127.0.0.1:6379> GET key1
"value1"

When connecting to Redis, you need to pay attention to the security configuration of the Redis server, such as only allowing specific IP addresses to connect, using SSL/TLS encrypted connections, and so on. Otherwise, it may lead to security issues such as malicious attacks on the Redis server or data leakage.

gun tei

Please explain Redis client and connection Redis connection pool in detail

Redis connection pool is an important part of Redis client connection management, which is used to improve the performance and concurrency of Redis client. The connection pool can make connection acquisition and release more efficient by pre-establishing a certain number of connections, and can avoid frequent creation and destruction of connections.

Connections in the connection pool are maintained by the Redis client, and the client can manage connection allocation and recycling through the connection pool. The connection pool can dynamically increase or decrease connections as needed to meet performance requirements under different loads and concurrency. In high-concurrency scenarios, the connection pool can greatly improve the concurrent processing capability and response speed of the Redis client.

The Redis client library provides some commonly used connection pool implementations, such as Jedis, Lettuce, redis-py, etc. You can choose a suitable connection pool implementation according to your specific needs. The following is an example of implementing a connection pool using the Java client library Jedis:

javaCopy codeJedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(10); // 设置最大连接数
poolConfig.setMaxIdle(5); // 设置最大空闲连接数
poolConfig.setMinIdle(1); // 设置最小空闲连接数

JedisPool jedisPool = new JedisPool(poolConfig, "localhost", 6379);

try (Jedis jedis = jedisPool.getResource()) {
    // 使用连接执行Redis操作
    jedis.set("key", "value");
    String result = jedis.get("key");
    System.out.println(result);
}

jedisPool.close(); // 关闭连接池

In the above example, the Jedis connection pool uses JedisPoolConfig to set the parameters of the connection pool, such as the maximum number of connections, the maximum number of idle connections, and the minimum number of idle connections. Then use JedisPool to create a connection pool, and use the getResource() method to obtain a connection for operation. Finally, you need to call the close() method to close the connection pool.

Connection pooling can greatly improve the performance and concurrency of Redis clients, especially in high-concurrency scenarios. The implementation of the connection pool is usually thread-safe, and provides many configuration parameters to meet different needs.

gun tei

Please explain Redis persistent RDB persistence in detail

Redis supports two persistence methods: RDB persistence and AOF persistence. Among them, RDB persistence refers to writing the data in Redis to files on the hard disk in the form of snapshots, which can be used in scenarios such as data backup, migration, and recovery. The following is a detailed explanation of RDB persistence:

RDB persistence is a snapshot persistence method, which generates a snapshot of the data in Redis within a specified time interval, and then writes the snapshot to the RDB file on the hard disk. An RDB file is a binary file that contains the data of all key-value pairs in Redis. When Redis needs to persist, it first converts the data in memory into a snapshot, and then writes the snapshot to the RDB file on the hard disk.

RDB persistence has the following advantages:

  1. An RDB file is a binary file that can be compressed, encrypted, and transferred.
  2. Since the RDB file is just a snapshot of the Redis data, the size of the RDB file is relatively small, and the data can be quickly backed up, migrated, and restored.
  3. RDB persistence will not have much impact on the performance of Redis, because it only generates snapshots at specified time intervals, rather than persisting every write operation.

The disadvantage of RDB persistence is that if Redis goes down and other abnormal conditions occur, all data after the last snapshot will be lost. Therefore, if you need higher data reliability, you can consider using AOF persistence.

In Redis, the relevant parameters of RDB persistence can be configured through the configuration file redis.conf, such as the time interval for snapshot generation, the name and path of the snapshot file, etc. At the same time, Redis also provides two commands SAVE and BGSAVE to generate snapshots manually or in the background. For example, the BGSAVE command can be used to generate snapshots in the background:

rubyCopy code127.0.0.1:6379> BGSAVE
Background saving started

When performing RDB persistence, it is necessary to consider data backup and recovery schemes, and it is also necessary to regularly check the integrity and availability of RDB files to ensure data security and reliability.

gun tei

Please explain Redis persistent AOF persistence in detail

Redis supports two persistence methods: RDB persistence and AOF persistence. Among them, AOF persistence is a log-based persistence method, which records all write operation commands, and writes these commands into the AOF file in an appended manner. AOF files can be used in scenarios such as data backup, migration, and recovery. The following is a detailed explanation of AOF persistence:

AOF persistence will record every write operation command executed by Redis into the AOF file. The AOF file is a text file that records all the write operations performed by Redis in the form of commands. When Redis needs to be persisted, all write operation commands in the AOF file will be re-executed to restore the original Redis data.

AOF persistence has the following advantages:

  1. AOF files are stored as text files that can be easily read and processed by other programs.
  2. AOF persistence can provide higher data reliability because it records every write operation command. Even if Redis crashes or other abnormal conditions, the data can be recovered by re-executing the commands in the AOF file.
  3. AOF persistence can realize real-time backup of data, because every write operation will be recorded in the AOF file.

The disadvantage of AOF persistence is that since each write operation needs to be recorded in the AOF file, the size of the AOF file will increase with the increase of write operations. If the AOF file is too large, it may take a long time to restore the data. In addition, since AOF files are text files, they cannot be compressed and encrypted, which may also cause security problems.

In Redis, related parameters of AOF persistence can be configured through the configuration file redis.conf, such as the name and path of the AOF file, AOF persistence strategy, etc. At the same time, Redis also provides two commands, BGREWRITEAOF and BGSAVE, to rewrite AOF files and generate snapshots manually or in the background. For example, you can use the BGREWRITEAOF command to rewrite an AOF file:

rubyCopy code127.0.0.1:6379> BGREWRITEAOF
Background append only file rewriting started

When performing AOF persistence, plans such as backup and recovery of AOF files need to be considered, and it is also necessary to regularly check the integrity and availability of AOF files to ensure data security and reliability.

gun tei

Please explain in detail the comparison between Redis persistent RDB and AOF

RDB persistence and AOF persistence are two commonly used persistence methods in Redis, each with its own advantages and disadvantages. The following is a detailed explanation of the comparison between RDB persistence and AOF persistence:

  1. Data reliability: AOF persistence can provide higher data reliability because it records every write operation command. Even if Redis crashes or other abnormal conditions, the data can be recovered by re-executing the commands in the AOF file. RDB persistence only records snapshots. If Redis crashes or powers off, all data after the last snapshot will be lost.
  2. File size: The file generated by RDB persistence is relatively small because it only snapshots the data in Redis. The file generated by AOF persistence is larger because it records every write operation command.
  3. Read and write performance: RDB persistence has less impact on read and write performance, because it only generates snapshots at specified time intervals, rather than persisting each write operation. AOF persistence will have a certain impact on write performance, because every write operation needs to be written to the AOF file.
  4. Data recovery speed: During data recovery, the recovery speed of AOF persistence may be slower than that of RDB persistence, because it needs to re-execute all write operation commands. The recovery speed of RDB persistence is relatively fast, because it only needs to read the snapshot file.
  5. Configuration complexity: The configuration of RDB persistence is relatively simple. You only need to set the snapshot generation interval. The configuration of AOF persistence is more complicated, and parameters such as the name and path of the AOF file and the AOF persistence strategy need to be set.

To sum up, RDB persistence is suitable for scenarios that require fast backup, migration and recovery of data, while AOF persistence is suitable for scenarios that require high data reliability. In practical applications, an appropriate persistence method can be selected according to specific requirements and scenarios. At the same time, RDB persistence and AOF persistence can also be used in combination to achieve higher data reliability and performance requirements.

gun tei

Please explain the concept and characteristics of Redis transactions in detail

Redis transaction refers to packaging a set of commands into an execution unit so that these commands can be executed atomically. Redis transactions have the following characteristics:

  1. Atomicity: All commands in a Redis transaction will be executed atomically, that is, either all of them succeed or all of them fail. If a command fails to execute, all subsequent commands will not be executed.
  2. Consistency: Before and after the execution of a Redis transaction, the data state remains consistent.
  3. Isolation: The execution of Redis transactions will not affect the execution of other transactions, and each transaction is independent of each other.
  4. Persistence: After a Redis transaction is successfully executed, the result will be permanently saved in Redis.

Redis transactions are implemented using commands such as MULTI, EXEC, DISCARD, and WATCH. Among them, the MULTI command is used to start a new transaction, the EXEC command is used to execute all commands in the transaction, the DISCARD command is used to abandon all the commands in the transaction, and the WATCH command is used to monitor a key. changes during execution, the transaction fails.

The use of Redis transactions can package multiple commands into one execution unit, improve execution efficiency, and ensure the atomicity of all commands in the transaction, avoiding data state inconsistencies caused by a command execution failure. In practical applications, you can choose whether to use Redis transactions according to specific needs and scenarios. It should be noted that Redis transactions do not support rollback operations, so when using transactions, you need to carefully handle the commands in the transactions to avoid data inconsistencies.

gun tei

Please explain Redis transaction Redis transaction command in detail

Redis transaction commands include commands such as MULTI, EXEC, DISCARD, and WATCH, which are used to open transactions, execute transactions, abandon transactions, and monitor keys.

  1. MULTI command: It is used to start a new transaction and add all subsequent commands to the current transaction. The command will return OK to indicate that the transaction is successfully opened.
rubyCopy code127.0.0.1:6379> MULTI
OK
  1. EXEC command: It is used to execute all commands in the current transaction. If a command in the transaction fails to execute, the entire transaction will fail. This command returns the execution results of all commands in the transaction.
rubyCopy code127.0.0.1:6379> EXEC
1) OK
2) OK
3) OK
  1. DISCARD command: It is used to abandon the current transaction and clear all the commands in the current transaction. The command returns OK to indicate that the transaction has been abandoned.
rubyCopy code127.0.0.1:6379> DISCARD
OK
  1. WATCH command: used to monitor a key, if the key changes during transaction execution, the transaction will fail. This command can monitor multiple keys, and the monitored keys will be saved in a watch list.
rubyCopy code127.0.0.1:6379> WATCH key1 key2
OK

During transaction execution, ordinary commands using Redis data types and transaction commands can be mixed. The following is an example of using transaction commands:

rubyCopy code127.0.0.1:6379> MULTI
OK
127.0.0.1:6379> SET key1 "Hello"
QUEUED
127.0.0.1:6379> SET key2 "World"
QUEUED
127.0.0.1:6379> GET key1
QUEUED
127.0.0.1:6379> GET key2
QUEUED
127.0.0.1:6379> EXEC
1) OK
2) OK
3) "Hello"
4) "World"

After executing the MULTI command, all subsequent commands are added to the current transaction. After executing all the commands, you can use the EXEC command to execute all the commands in the current transaction and return the execution results of the commands. In this example, first use the SET command to set values ​​to two keys key1 and key2, then use the GET command to get the values ​​of these two keys, and use the EXEC command to execute all commands in the transaction.

It should be noted that Redis transactions do not support rollback operations, so when using transactions, you need to carefully handle the commands in the transactions to avoid data inconsistencies.

gun tei

Please explain in detail the usage example of Redis transaction transaction

Here is a simple example using Redis transactions:

rubyCopy code127.0.0.1:6379> MULTI
OK
127.0.0.1:6379> INCR user:1:login_count
QUEUED
127.0.0.1:6379> INCR user:1:total_count
QUEUED
127.0.0.1:6379> EXEC
1) (integer) 1
2) (integer) 1

In this example, first use the MULTI command to start a new transaction, and then use the INCR command to increment the keys user:1:login_countand respectively. user:1:total_countNote that after using the MULTI command to start a transaction, all subsequent commands will be added to the current transaction, but not executed. Then use the EXEC command to execute all commands in the transaction. If a certain command in the transaction fails to execute, the entire transaction will fail and all commands will not be executed.

After the transaction is successfully executed, the returned result is an array. Each element of the array corresponds to the execution result of each command in the transaction. If a command fails to execute, the value of the corresponding element is nil.

Redis transactions can be used to package multiple commands into one execution unit, improve execution efficiency, and ensure the atomicity of all commands in the transaction, avoiding data state inconsistencies caused by a command execution failure. In practical applications, you can choose whether to use Redis transactions according to specific needs and scenarios. It should be noted that Redis transactions do not support rollback operations, so when using transactions, you need to carefully handle the commands in the transactions to avoid data inconsistencies.

gun tei

Please explain the concept of Redis publish and subscribe in detail

Redis publish-subscribe is a messaging pattern in which senders (publishers) send messages to specific channels, and subscribers (receivers) can subscribe to one or more channels and receive messages in specific channels. The Redis publish-subscribe mode is an asynchronous communication mode in which there is no direct interaction between publishers and subscribers, but communication through message channels.

In Redis, you can use the PUBLISH command to send a message to a specified channel, for example:

rubyCopy code127.0.0.1:6379> PUBLISH channel1 "Hello world!"
(integer) 1

In the above example, use the PUBLISH command to send a message “Hello world!” to the channel named channel1, and return 1 to indicate that 1 subscriber has received the message.

Subscribers can use the SUBSCRIBE command to subscribe to a specified channel, for example:

rubyCopy code127.0.0.1:6379> SUBSCRIBE channel1
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "channel1"
3) (integer) 1

In the above example, the SUBSCRIBE command is used to subscribe to the channel named channel1, and returns an array containing three elements. The first element is “subscribe” which means the subscription is successful, the second element is the name of the subscribed channel, and the third element is the number of subscribers who subscribe to the channel.

Subscribers can use the UNSUBSCRIBE command to unsubscribe from a specified channel, for example:

rubyCopy code127.0.0.1:6379> UNSUBSCRIBE channel1

In the above example, the subscription to the channel named channel1 was unsubscribed using the UNSUBSCRIBE command.

Redis also provides the PUNSUBSCRIBE command to unsubscribe from all channels, for example:

rubyCopy code127.0.0.1:6379> PUNSUBSCRIBE

In practical applications, the Redis publish-subscribe model can be used to implement real-time communication, event-driven and other functions. For example, the Redis publish-subscribe model can be used to implement functions such as online chat and instant messaging.

gun tei

Please explain Redis publish and subscribe commands in detail

Redis publish and subscribe commands include PUBLISH, SUBSCRIBE, UNSUBSCRIBE, and PUNSUBSCRIBE commands. The following are detailed explanations of these commands:

  1. PUBLISH command: used to send a message to the specified channel, the syntax is: Copy code PUBLISH channel message Among them, channel is the name of the channel, message is the content of the message to be sent, and this command returns the number of subscribers who have received the message.
  2. SUBSCRIBE command: used to subscribe to one or more channels, the syntax is: cssCopy code SUBSCRIBE channel [channel ...] Among them, channel is the name of one or more channels, multiple channels can be subscribed, and each channel name is separated by a space. This command returns an array, the first element of the array is “subscribe” which means the subscription is successful, the second element is the name of the subscribed channel, and the third element is the number of subscribers who subscribe to the channel.
  3. UNSUBSCRIBE command: used to unsubscribe from a specified channel, the syntax is: cssCopy code UNSUBSCRIBE [channel [channel ...]] Among them, channel is the name of one or more channels, multiple channels can be unsubscribed, and each channel name is separated by a space. If no channel name is specified, unsubscribe from all channels.
  4. PUNSUBSCRIBE command: used to unsubscribe from all channels, the syntax is: Copy code PUNSUBSCRIBE This command will cancel all subscribed channels.

It should be noted that when using the Redis publish-subscribe mode, the publisher and the subscriber communicate asynchronously, and there is no direct interaction between the publisher and the subscriber, but the communication is carried out through the message channel. Therefore, when using the Redis publish-subscribe mode, special attention needs to be paid to the order of message delivery and operations such as channel subscription and unsubscription to avoid data inconsistency or subscription failure.

gun tei

Please explain in detail the usage examples of Redis publish subscribe

The following is a simple example using the Redis publish-subscribe pattern:

  1. Subscribe to the channel named channel1 in a terminal window: rubyCopy code 127.0.0.1:6379> SUBSCRIBE channel1 Reading messages... (press Ctrl-C to quit) In the above command, the SUBSCRIBE command is used to subscribe to the channel named channel1, and a prompt message is printed, indicating that it is waiting for news from this channel.
  2. Send a message to the channel named channel1 in another terminal window: rubyCopy code 127.0.0.1:6379> PUBLISH channel1 "Hello world!" (integer) 1 In the above command, use the PUBLISH command to send a message “Hello world!” to the channel named channel1, and return 1 to indicate that there is 1 subscription received the message.
  3. The sent message is received in the first terminal window: arduinoCopy code 1) "message" 2) "channel1" 3) "Hello world!" In the above message, the first element is “message” indicating that a message has been received, the second element is the subscribed channel name, and the third element is The received message content.

In this example, first use the SUBSCRIBE command in a terminal window to subscribe to the channel named channel1, and print a prompt message, indicating that it is waiting for messages from this channel. Then use the PUBLISH command in another terminal window to send a message “Hello world!” to the channel, and return 1 to indicate that 1 subscriber has received the message. Finally, the sent message is received in the first terminal window and the content of the message is printed.

In practical applications, the Redis publish-subscribe model can be used to implement real-time communication, event-driven and other functions. For example, in an online chat room, the Redis publish-subscribe model can be used to realize the multi-person chat function. When a user sends a message, use the PUBLISH command to send the message to the specified channel, and all users who subscribe to the channel can receive the message and display it in the chat room.

gun tei

Please explain in detail the advanced features of Redis master-slave replication

Redis master-slave replication is an advanced feature of Redis, which can realize data replication and synchronization between multiple Redis servers, and is usually used to improve the availability and performance of Redis. The basic principle of master-slave replication is to use one Redis server as the master server, called the master node, and other Redis servers as the slave servers, called the slave nodes. The master node asynchronously copies its own data to the slave nodes, and the slave nodes can provide Read operations, thereby sharing the read load of the primary node.

Redis master-slave replication has the following main features:

  1. Data replication method: Redis master-slave replication uses an asynchronous method for data replication. The master node asynchronously copies its own data to the slave node. The slave node establishes a connection with the master node and receives the data sent by the master node to realize data replication and synchronization.
  2. Slave node replication: Redis master-slave replication can support multiple slave nodes, each slave node can copy data from the master node, and the slave nodes can provide read operations to share the read load of the master node.
  3. Data synchronization method: Redis master-slave replication has two data synchronization methods, one is full replication, that is, when the slave node starts replicating data, it needs to copy all the data of the master node first; the other is incremental replication, That is, when the slave node copies data, it only needs to copy the new data added by the master node.
  4. Failure recovery: When the master node fails, one of the slave nodes can be promoted to the new master node, thereby achieving failure recovery and high availability.

Using Redis master-slave replication can improve the availability and performance of Redis, realize data backup and replication, thereby reducing the risk of data loss and business interruption caused by the failure of the master node. At the same time, the use of slave nodes can share the read load of the master node and improve the performance and throughput of Redis.

In practical applications, you can choose whether to use Redis master-slave replication according to specific needs and scenarios to improve the availability and performance of Redis. It should be noted that when using Redis master-slave replication, you need to pay attention to issues such as failure recovery and data synchronization to ensure data consistency and integrity.

gun tei

Please explain in detail the advanced features of Redis sharding

Redis sharding (sharding) is an advanced feature that can divide a Redis database into multiple shards (shards), and each shard can be deployed on a different physical server or virtual machine to achieve horizontal data splitting and Distributed storage. Redis fragmentation can improve the availability and performance of Redis, and at the same time support the storage and processing of massive data.

Redis sharding has the following main features:

  1. Data segmentation method: Redis sharding uses data sharding for data segmentation. A Redis database is divided into multiple shards. Each shard contains a part of data. The segmentation method can be selected according to different needs and scenarios, for example, according to The key value of the data is hashed and split according to the business type of the data, etc.
  2. Shard node replication: Each shard can be deployed on a different physical server or virtual machine, and each shard can use Redis master-slave replication for data backup and replication, improving the availability and reliability of Redis.
  3. Shard routing: Redis shards use shard routing for data access, and the client selects the corresponding shard nodes for data access based on the data key value and sharding rules to realize data reading, writing, and processing.
  4. Failure recovery: When a shard node fails, one of the slave nodes can be promoted to the new master node, thereby achieving failure recovery and high availability.

Using Redis sharding can realize horizontal splitting and distributed storage of data, and improve the availability and performance of Redis. At the same time, different fragmentation strategies and routing algorithms can be selected according to specific needs and scenarios to achieve optimal data segmentation and access efficiency. It should be noted that when using Redis sharding, you need to pay attention to the consistency and integrity of the data to ensure the correctness and reliability of the data.

In practical applications, you can choose whether to use Redis sharding according to business needs and data scale, so as to achieve horizontal splitting and distributed storage of data, and improve the availability and performance of Redis. It should be noted that when using Redis sharding, you need to pay attention to issues such as fault recovery, data synchronization, and data consistency to ensure data correctness and reliability.

gun tei

Please explain Redis advanced feature cluster in detail

Redis cluster is an advanced feature of Redis, which can form multiple Redis instances into a cluster, realize horizontal splitting and distributed storage of data, and improve the availability and performance of Redis. The Redis cluster adopts a decentralized architecture, there is no single point of failure, nodes can be dynamically added and deleted, and it supports the storage and processing of massive data.

Redis cluster has the following main features:

  1. Data sharding method: Redis cluster adopts data sharding method for data segmentation, and divides a Redis database into multiple slots (slots), and each slot can be assigned to a different Redis instance to achieve horizontal data splitting and Distributed storage.
  2. Cluster node replication: Each Redis instance can use Redis master-slave replication for data backup and replication, improving the availability and reliability of Redis.
  3. Automatic discovery of cluster nodes: Redis cluster supports automatic discovery of new nodes and deletion of offline nodes, and has the ability to dynamically expand and shrink.
  4. Cluster node routing: Redis cluster uses cluster node routing for data access, and the client selects the corresponding slot and Redis instance for data access according to the data key value and fragmentation rules, so as to realize data reading, writing and processing.
  5. Fault recovery: When a Redis instance or slot fails, the Redis cluster will automatically delete the instance or slot from the cluster and migrate the data to other normal Redis instances or slots to achieve fault recovery and high-speed availability.

The use of Redis clusters can achieve horizontal splitting and distributed storage of data, improving the availability and performance of Redis. At the same time, the Redis cluster has the ability to dynamically expand and shrink, and can dynamically add and delete nodes according to specific needs and scenarios to adapt to different businesses and loads. It should be noted that when using Redis cluster, you need to pay attention to the consistency and integrity of the data to ensure the correctness and reliability of the data.

In practical applications, you can choose whether to use Redis cluster according to business needs and data scale, so as to realize horizontal splitting and distributed storage of data, and improve the availability and performance of Redis. It should be noted that when using Redis cluster, you need to understand the architecture and rules of Redis cluster, as well as the mechanism of data routing and migration, so as to ensure the correctness and reliability of data.

gun tei

Please explain in detail how Redis compares to other databases

Redis is an open source in-memory database. Compared with other types of databases, it has the following main advantages and disadvantages:

  1. Fast speed: Redis is a memory-based database. All data is stored in memory, so it has extremely fast read and write speeds and response times, and is suitable for application scenarios with high performance requirements. The traditional relational database needs to read data from the hard disk, which is relatively slow.
  2. Rich data types: Redis supports multiple data types, such as strings, lists, hashes, sets, and ordered sets, etc., and can flexibly store and manipulate different types of data. Traditional relational databases only support tabular data and cannot flexibly store and manipulate different types of data.
  3. Data persistence: Redis supports a variety of data persistence methods, and can save data in memory to disk to ensure data persistence and reliability. Traditional relational databases also support data persistence, but at a high performance cost.
  4. Good scalability: Redis supports advanced features such as master-slave replication and sharding, which can realize data backup, replication, and horizontal expansion, and is suitable for high-availability and high-performance application scenarios. However, traditional relational databases are limited in scalability and require higher costs and complexity.
  5. Does not support complex queries: Redis is a key-value pair-based database that does not support complex query operations, such as multi-table joint queries and subqueries, so additional processing and conversion are required when storing and querying complex data structures.

In general, Redis is suitable for application scenarios with high performance requirements, small data volume, and relatively simple data structure, such as cache, counter, leaderboard, etc.; while traditional relational databases are suitable for processing complex data structures, supporting Application scenarios for complex queries and transaction processing, such as e-commerce, social networks, etc. In practical applications, it is necessary to select a suitable database according to specific needs and scenarios to ensure the correctness and reliability of data.

gun tei

Please explain in detail the comparison between Redis and other databases Redis and relational databases

Redis is a memory-based key-value storage database, while a relational database is a table-based data storage method. The main difference between the two lies in data storage, query language, transaction processing, scalability and performance.

  1. Data storage method: Redis stores data in memory, while relational databases store data on disk. Therefore, the read and write speed of Redis is very fast, but the amount of data is limited by the memory capacity; while the relational database needs to read data from the disk, the read and write speed is relatively slow, but it can store massive data.
  2. Query language: Redis stores data in the form of key-value pairs, and only supports simple search and operations, such as obtaining, setting, and deleting key-value pairs; while relational databases support complex query languages, such as SQL language, which can perform multiple Complex operations such as table union query, subquery, grouping, sorting, aggregation, etc.
  3. Transaction processing: Redis supports basic transaction processing, and can implement transaction operations through commands such as MULTI, EXEC, DISCARD, and WATCH, but does not support rollback; while relational databases support complete transaction processing, and can use commands such as BEGIN, COMMIT, and ROLLBACK Implement transactional operations, support rollback and data consistency.
  4. Scalability: Redis supports advanced features such as sharding and master-slave replication, which can realize data backup, replication, and horizontal expansion; while relational databases also support features such as distributed architecture and master-slave replication, but require higher costs and the complexity.
  5. Performance: Redis has extremely fast read and write speed and response time, and is suitable for application scenarios with high performance requirements, such as caching, counters, rankings, etc.; while the performance of relational databases is relatively slow, but it can handle complex data structures and large-scale data.

To sum up, Redis is suitable for application scenarios with small data volume, relatively simple data structure, and high performance requirements, such as cache, counter, leaderboard, etc.; while relational database is suitable for processing complex data structures and supporting complex queries and transaction processing application scenarios, such as e-commerce, social networking, etc. In practical applications, it is necessary to select a suitable database according to specific needs and scenarios to ensure the correctness and reliability of data.

gun tei

Please explain Redis vs other databases in detail Redis vs other NoSQL databases

The comparison between Redis and other NoSQL databases mainly involves the following aspects:

  1. Data storage method: Redis is a memory-based key-value storage database, while other NoSQL databases (such as MongoDB, Cassandra, etc.) support different data models, such as documents, column families, graphs, etc. Different data models are suitable for different data storage requirements, and the most suitable NoSQL database can be selected.
  2. Data consistency: Redis has high read and write performance and response time, but sacrifices some data consistency. In the case of a large amount of data or complex data processing, data inconsistency may occur. Other NoSQL databases support different data consistency models, such as eventual consistency, strong consistency, and session consistency. You can choose the most suitable data consistency model according to your specific needs.
  3. Transaction processing: Redis supports basic transaction processing, but does not support rollback operations; while other NoSQL databases support complete transaction processing, can support rollback operations, and can ensure data consistency and integrity.
  4. Scalability: Redis supports advanced features such as sharding and master-slave replication, which can realize data backup, replication, and horizontal expansion; while other NoSQL databases also support features such as distributed architecture and replica sets, which can support high-availability and high-performance applications Scenes.
  5. Application scenarios: Redis is suitable for application scenarios with high performance requirements, small data volumes, and relatively simple data structures, such as caches, counters, leaderboards, etc.; while other NoSQL databases are suitable for different application scenarios, such as document storage, time series Data storage, graph data storage, etc.

To sum up, there are certain differences and advantages and disadvantages between Redis and other NoSQL databases in terms of data storage methods, data consistency, transaction processing, scalability, and application scenarios. In practical applications, it is necessary to select a suitable database according to specific needs and scenarios to ensure the correctness and reliability of data.

gun tei

Please explain in detail the application case caching system of Redis in actual projects

Redis has a wide range of application cases in actual projects, and the most common application scenario is the cache system. In an application system, some data will be frequently read and manipulated, such as user login information, commodity information, and so on. If these data are read from the database every time, it will not only consume a lot of server resources, but also reduce the response speed of the system and affect the user experience.

Therefore, we can save these commonly used data in Redis as a cache. In this way, when the application needs to access these data, it will first go to Redis to query, if the data does not exist in Redis, then go to the database to query, and save the queried data to the Redis cache, so that it can be accessed directly next time Get data from Redis without having to query the database.

Taking an e-commerce website as an example, we can save product information in Redis, such as product name, price, inventory, and so on. In this way, when the user checks the product information on the website, the product information will be queried from Redis first, and if the product information exists in Redis, it will be directly returned to the user; if the product information does not exist in Redis, then it will be queried in the database , and save the queried product information into the Redis cache, so that it can be directly obtained from Redis during the next visit.

By using the Redis cache system, we can effectively reduce the burden on the database, improve the response speed and stability of the system, and at the same time reduce the cost and complexity of the system.

gun tei

Please explain in detail the application case counter of Redis in actual projects

The application cases of Redis in actual projects also include counter systems. In an application system, some data needs to be counted and counted, such as website visits, user clicks, and so on. If the counting of these data is carried out directly in the database, it will cause a great burden on the database and affect the performance and stability of the system.

Therefore, we can save these counter data in Redis, and use the atomic operations (such as INCRBY) provided by Redis to realize the self-increment and self-decrement of data. In this way, when you need to increase or decrease a certain counter, you can directly call the commands provided by Redis, without going to the database for operations, which greatly improves the performance and response speed of the system.

Taking online games as an example, we can save the player’s points in Redis, and whenever the player completes a task or defeats an opponent, directly call the command provided by Redis to perform an auto-increment operation on the player’s points to realize the accumulation of points and statistics.

By using the Redis counter system, we can effectively reduce the burden on the database, improve the response speed and stability of the system, and also realize real-time counting and statistics of data, helping the application system to better conduct business analysis and decision-making.

gun tei

Please explain in detail the application case message queue of Redis in actual projects

The application cases of Redis in actual projects also include message queuing systems. In an application system, there are some time-consuming operations or tasks that require asynchronous processing, such as sending emails, sending SMS messages, and so on. If these operations are performed directly in the application program, it will block the operation of the application program and reduce the performance and response speed of the system.

Therefore, we can use Redis as a message queue, encapsulate these tasks into messages, and save them in a list in Redis. Then, the task handler in the background can execute these time-consuming operations or asynchronous tasks by consuming the messages in this list, improving the concurrency and processing capabilities of the system.

Taking the e-commerce website as an example, we can use Redis as the order message queue, encapsulate the user’s order information into a message, and save it in the Redis queue. Then, the order processing program in the background can process related operations of the order by consuming messages in this queue, such as sending order confirmation emails, updating order status, and so on.

By using Redis as a message queue, we can realize the asynchronous processing of tasks, improve the performance and scalability of the system, and at the same time realize the sequential execution and idempotence of tasks to ensure the correctness and integrity of tasks.

gun tei

Please explain in detail the list of application cases of Redis in actual projects

The application cases of Redis in actual projects also include leaderboard systems. In an application system, there are often a lot of data that needs to be counted and ranked, such as popular articles on the website, popularity of commodities, and so on. If these data need to be queried and sorted from the database every time, it will consume a lot of server resources and affect the response speed of the system.

Therefore, we can save the data that needs to be counted and ranked in Redis, and use the sorted set (Sorted Set) provided by Redis to realize automatic sorting and ranking of data. Specifically, the data that needs to be counted and ranked can be used as a member of the ordered set, and the member’s score is the statistical value of the data, such as the number of clicks on articles, sales of commodities, and so on. Then, by calling the ordered collection command provided by Redis, the automatic sorting and ranking of data, as well as the query and update of ranking data can be realized.

Taking social networking sites as an example, we can save data such as the amount of attention and fans of users into an ordered collection of Redis to achieve user popularity ranking. Then, by calling the ordered collection command provided by Redis, real-time ranking and query of user popularity can be realized, so that the website can recommend and sort users.

By using the Redis leaderboard system, we can automatically sort and rank data, improve system performance and response speed, and also realize real-time data update and query, helping application systems to perform data analysis and decision-making better.

gun tei

Please explain in detail the application cases of Redis in actual projects and other application scenarios

In addition to the cache system, counter system, message queue system and leaderboard system, Redis has many other application scenarios in actual projects.

For example, Redis can also be used as a distributed lock system to solve the problem of multi-process or multi-thread concurrent operations. By creating a unique key in Redis and setting an expiration time for the key, mutually exclusive access and coordinated operations on shared resources can be achieved.

In addition, Redis can also be used as a distributed session system for session management of distributed web applications. Specifically, the user’s session information can be saved in Redis, and each time the user requests, the session information is obtained from Redis, so as to realize the sharing and management of the user state.

In addition, Redis can also be used as a real-time message push system to realize real-time communication and push functions. By creating a publish/subscribe channel in Redis, message push and real-time communication to clients can be realized.

In addition, Redis can also be used to implement functions such as current limiting, data caching, and geographic location positioning. The specific application scenarios are related to business needs.

In short, as a high-performance in-memory database, Redis has rich data structures and powerful functional features, and has a very wide range of application scenarios and use values ​​in actual projects.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です