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
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:
# bind 127.0.0.1
Then resta ...
Posted by poppy28 on Sun, 14 Jun 2020 18:13:51 -0700
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.2. Mainstream NOSQL produ ...
Posted by chriskiely on Sun, 07 Jun 2020 19:47:34 -0700
1. CAP principle of relational database
Three in two of CAP
2. Introduction to distributed and cluster
3. Introduction to redis
What is it?
4. Redis data type
5. Three ...
Posted by saku on Sun, 07 Jun 2020 03:28:48 -0700
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
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
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
1. Create project
1.1 creation steps
1.2 add pom dependency
Posted by premracer on Mon, 27 Apr 2020 07:14:31 -0700
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
pidfile /var/run/redis_ ...
Posted by DJP1986 on Sun, 19 Apr 2020 03:20:08 -0700
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