Spring Data Redis Overview (i)

Source: Internet
Author: User
Tags redis server

Why use spring Data Redis

The first is the client that the Spring Data Redis Spring Framework provides to operate Redis.
The spring framework is a full stack Java program framework that DI AOP provides a lightweight container and non-intrusive programming model support through, and portable service abstraction.
NoSQL Storage provides a scale-out and speed alternative to traditional relational databases, and Key-value storage is a key member of the current NoSQL world.
Spring Data Redis(SDR)The framework enables the spring program to simply use Redis's key-value storage by eliminating redundant, repetitive, and integrated code.

Spring Data Redis currently supports two drivers: Jedis and lettuce, which can be seen as a unified package for both drives, shielding the operating details of the underlying driver in a highly uniform form, and providing a unified API to the user, with the following structure:

! [Hierarchical structure

Spring Data REDIS Monolithic structure

Spring Data RedisSpring Dataother data operations with the family such as: Spring Data JDBC , packaged in a similar structure, reduce the user's learning costs; as long as one of the Spring Data techniques used, the other data source operation can be carried out according to the gourd, the overall structure of the package is as follows:

Divide the layer of encapsulation into 4 parts:
1) The bottom of the factory layer and the connection layer, here will be different depending on the driving implementation, the connection layer can directly Redis Server interact with, using binary data and commands.
2) The template layer is a further encapsulation of the connection layer, which encapsulates an operation class for each data type of Redis, Redis Server interacting with it, such as String type, ValueOperations and RedisTemplate holding references to all types of operations, so that Redis can be manipulated directly by definition RedisTemplate ; RedisTemplateencapsulates common operations, such as deleting keys, setting expiration time, and manipulating different data types through specific action classes.
3) Key binding layer is a further encapsulation of the template layer, each type of instance can only operate a single key value (the key has been specified when instantiating)

System Requirements and learning materials

Spring Data RedisSystem requirements: Spring Data Redis 1.x to JDK 1.6 +, Redis 2.6.x +

Commonly used Redis Java clients are: Jedis, lettuce, Redison, Spring data Redis, the corresponding learning materials are as follows:
Jedis:https://github.com/xetorthio/jedis/wiki
Lettuce:https://github.com/lettuce-io/lettuce-core/wiki
Redison:https://github.com/redisson/redisson
spr:https://docs.spring.io/spring-data/redis/docs/2.0.2.release/reference/html/
More client references: http://www.redis.net.cn/clients/#java

Spring Data Redis Overview (i)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

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

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