Java Redis(1): implement Article likes ranking

Opening chapter This article uses Redis to achieve the article's likes, and arranges from the number of likes to the low. The implementation language is JAVA, so the package to be used is jedis. Content: Introduce Redis Function realization analysis. Function realization. Introduce Redis Redis has five data type ...

Posted on Tue, 31 Mar 2020 11:57:37 -0700 by Rai_de

Java and spring connect Redis stand-alone version and cluster version respectively

Java and spring connect Redis stand-alone version and cluster version respectively 1, Java connection Redis 1.1 Java connection Redis standalone 1.2 Java connection to Redis cluster 2, spring stores Redis connection objects 2.1 interface packaging 2.2 defining implementation classes 2.3 easy to co ...

Posted on Tue, 10 Mar 2020 22:29:43 -0700 by shamoon

Redis learning note 10: redis as message queue

Redis can not only be used as a cache server, but also as a message queue. Its list type is inherently supported as a message queue. As shown in the figure below: Because Redis's list is implemented by using a two-way linked list, which saves the head and tail nodes, it is very fast to insert elements on both sides of the list. So you can d ...

Posted on Wed, 15 Jan 2020 01:59:04 -0800 by Clerma

SpringBoot 2.0 Actual | Chapter 21: Integrating Redis

Relevant knowledge Introduction to Redis Redis is an open source, in-memory, high-performance data storage system that can be used as a database, cache, and messaging middleware. Redis supports many types of data structures, such as string, hashes, lists, sets, sortedSets, and so on. Redis has built ...

Posted on Fri, 10 Jan 2020 17:16:18 -0800 by mountaindave

RedisUtil tool class encapsulation

Redis has a lot of data structures: string, hash, list, set, etc. but in the actual delivery, we often save the object in redis, so the key value pairs are more commonly used. Redis needs to satisfy serialization when saving objects. Due to the low efficiency of java's native serialization method, the protostaff serialization ...

Posted on Wed, 01 Jan 2020 14:02:53 -0800 by thedotproduct

Sharing redis with session

Because of the load balancing of multiple servers, when obtaining the sessionId of the client, it will be different for the first time and the second time. Because of the load balancing, there are at least two servers in your server. If the first request and the second request of the client are not the same server, the sessionId will change. To ...

Posted on Sun, 29 Dec 2019 09:04:08 -0800 by itaym02

linux redis building and testing

redis building under linux System configuration: cent os 7 redis version: 3.2.8 1. Use the command to download redis: wget http://download.redis.io/releases/redis-3.2.8.tar.gz 2. decompression tar zxvf redis-3.2.8.tar.gz 3. After decompression, enter the redis directory cd redis-3.2.8 4.make make 5. Set related configura ...

Posted on Mon, 16 Dec 2019 08:48:22 -0800 by danielle

[watermelon skin] Spring Boot 2.x Integrated Redis

Spring Boot 2 integrates Redis (1) Spring Boot 2.0.3 simple integration Redis IDEA Spring Initialzr creation project: select Redis dependency Maven dependence // There is no data for the artifactId under the dependency of spring boot version 1.5 <dependency> <groupId>org.springframework.boot</groupId& ...

Posted on Tue, 10 Dec 2019 08:23:29 -0800 by KaFF

Using Redis to realize high concurrency counter

In business requirements, counters are often used: for example, a mobile phone number is limited to send 5 SMS messages a day, an interface is limited to how many requests a minute, an interface is limited to how many calls a day, and so on. The above requirements can be easily realized by using the Incr auto increment command of Redis. For exa ...

Posted on Sun, 08 Dec 2019 10:06:36 -0800 by many_pets

Spring data redis

Basic use Dependencies and configuration rely on <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> To configure spring: redis: database: 0 host: localhost port: 6379 password: jedis: pool: max-a ...

Posted on Tue, 03 Dec 2019 12:17:53 -0800 by sparq