Redis based distributed lock implementation

From 1, Distributed lock overview In the multithreaded environment, in order to ensure that a code block can only be accessed by one thread at a time, we can generally use the synchronized syntax and ReetrantLock in Java to ensure that this is actually the way of local locking. But now companies are a ...

Posted by hillbilly928 on Fri, 19 Jun 2020 00:04:48 -0700

Java client in Redis (Jedis / Lettuce)

This article learns to use a Java client (Jedis / Lettuce) to operate Redis. 1 Open remote connection Redis does not support remote connections by default and needs to be turned on and modified manuallyRedis.confThere are three major changes: vi /usr/local/redis-5.0.8/redis.conf # bind 127.0.0.1 protected-mode no requirepass 123456 Then resta ...

Posted by poppy28 on Sun, 14 Jun 2020 18:13:51 -0700

The study of NoSql database -- the study of Redis database

Article catalog 1. Concept: redis is a high-performance NOSQL series non relational database 1.1. What is NOSQL 1.1.1. Comparison between NoSQL and relational database 1.1.2. Advantages of non relational database: 1.1.3. Advantages of relational database: 1.1.4. Summary 1.2. Mainstream NOSQL produ ...

Posted by chriskiely on Sun, 07 Jun 2020 19:47:34 -0700

Redis Learning Integration

Redis Redis 1. CAP principle of relational database CAP Three in two of CAP BASE 2. Introduction to distributed and cluster Distributed colony 3. Introduction to redis What is it? characteristic application basic operation add to Value 4. Redis data type String List Set Hash Zset 5. Three ...

Posted by saku on Sun, 07 Jun 2020 03:28:48 -0700

redis caching technology of Nosql [Java foundation]

Redis 1. Concept: redis is a high-performance NOSQL series Philippine relational database. 2. Comparison between NoSQL and relational database Relational database: mysql, Oracle 1. Data is related 2. Data is stored on the hard disk file Non relational database (NoSQL): redis, hbase 1. No associ ...

Posted by Fredric on Sat, 06 Jun 2020 03:38:48 -0700

Teach you how to implement a Java based distributed lock service

In modern programming languages, programmers who have been exposed to multithreaded programming have a certain understanding of locks. In short, the lock in multithreading is a mechanism to ensure the consistency of shared resources when multiple threads modify shared resources in multithreading environment. We will not expand here. In the dis ...

Posted by cuboidgraphix on Mon, 18 May 2020 03:25:12 -0700

Redis realizes distributed lock (design mode application practice)

I've seen all kinds of codes that use redis to implement distributed locks on the network. They are either wrong or fragmented. There is no complete example. Let me summarize two mechanisms of redis to implement distributed locks this weekend Spin lock and exclusive lock In view of the different ways of implementing locks, the policy pattern ...

Posted by Shiki on Sun, 10 May 2020 20:10:38 -0700

Introduction to the use of Redis--Jedis

1. Create project 1.1 creation steps 1.2 add pom dependency <dependencies> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> <!--test--> <dep ...

Posted by premracer on Mon, 27 Apr 2020 07:14:31 -0700

Redis Sentinel Deployment Process

Edition CentOS 8.1.1911(VMWare) redis 5.0.8 Essential information Server IP: 192.168.31.68 Redis port: 7000 (primary) 7001,7002 (slave) Sentinel port: 27000 27001 27002 The key code or command represents this Configure Redis master7000.conf bind 0.0.0.0 port 7000 daemonize yes dir /home/misty/redis-data/sentinel01 pidfile /var/run/redis_ ...

Posted by DJP1986 on Sun, 19 Apr 2020 03:20:08 -0700

How to implement redis distributed lock

Distributed lock is a way to control the synchronous access of shared resources between distributed systems. In the distributed system, they often need to coordinate their actions. If different systems or different hosts of the same system share one or a group of resources, when accessing these resources, they often need to be mutually exclusiv ...

Posted by Jeroen_nld on Fri, 10 Apr 2020 23:02:20 -0700