Redis source code [sds] [redis source code]
redis string source code analysis
For details, please refer to the redis source code SDS H this file
/* Note: sdshdr5 is never used, we just access the flags byte directly.
* However is here to document the layout of type 5 SDS strings. */
/* In all structures:
* len Indicates the length used
* alloc Indicates the usable length
* ...
Posted by zzz on Tue, 18 Jan 2022 02:37:55 +0100
Understanding of redis and key value data types supported by redis
redis is a high-performance NOSQL series non relational database
NosQL(Not only sQL), "not just sQL", is a new database concept, which generally refers to non relational databases. With the development of internet web2 With the rise of 0 website, the amount of data is becoming larger and larger, especially the super large-scale and hi ...
Posted by dnast on Mon, 17 Jan 2022 21:22:32 +0100
Take you ten days to easily complete the Go micro service series
At the beginning of this article, we will publish a series of articles to show you a go zero micro service example in detail. The whole series is divided into ten articles, and the directory structure is as follows:
Environment construction (this paper)
Service splitting
User services
Product service
Order service
Payment services ...
Posted by Tim L on Mon, 17 Jan 2022 15:11:49 +0100
[redis] three ways to implement distributed locks
1, Why use distributed locks
When developing applications, if we need multi-threaded synchronous access to a shared variable, we can use the Java multi-threaded processing we learned, and it can run perfectly without bugs!
However, this is a stand-alone application, that is, all requests will be allocated to the JVM of the current server, and ...
Posted by harrymanjan on Mon, 17 Jan 2022 11:15:26 +0100
Redis can be understood by looking at this set! For connecting redis with native jedis and integrating redis with spring boot, the actual project uses redis+mysql and redis visualization tool
The first part: the native jedis is connected to redis
First, let's understand that we used jdbc to connect to the database when we used mysql. Similarly, when we connect to redis, we need to use jedis.
Step 1: create a new java project and import the package
New java project, import package
<dependency>
<groupId>redis.c ...
Posted by dancer on Mon, 17 Jan 2022 05:06:11 +0100
Redis - five data types and basic operations
Redis and other key - value caching products have the following three characteristics:
Redis supports data persistence. It can save the data in memory on disk and can be loaded again for use when restarting.Redis not only supports simple key value data, but also provides storage of list, set, zset, hash and other data structures.Redis supp ...
Posted by natbrazil on Sun, 16 Jan 2022 02:11:13 +0100
Redis cache database application concept and redis basic operation
Basic concept and deployment of redis
1. Introduction to redis
Redis is a NoSQL database based on key value pairs. Unlike many key value pair databases, the values in redis can be composed of string, hash, list, set, zset, geo and other data structures and algorithms.
redis will put all data in memory, so its read-write performance is very f ...
Posted by Crave on Sun, 16 Jan 2022 02:00:58 +0100
RabbitMQ release confirmation
Release confirmation
Release confirmation principle
The producer sets the channel to confirm mode. Once the channel enters the confirm mode, all messages published on the channel will be assigned a unique ID (starting from 1). Once the message is delivered to all matching queues, the broker will send a confirmation to the producer (including ...
Posted by mushroom on Sat, 15 Jan 2022 17:52:53 +0100
Correct implementation of Redis distributed lock
preface
Distributed locks are generally implemented in three ways: 1 Database lock; 2. Redis based distributed locks; 3. Distributed lock based on ZooKeeper. This blog will introduce the second way to implement distributed locks based on redis. Although there are various blogs on the Internet that introduce the implementation of redis distribu ...
Posted by Draco_03 on Sat, 15 Jan 2022 14:14:47 +0100
Deeply understand the principle of ThreadLocal and the problem of memory leakage
ThreadLocal principle
Before reading this article, you need to understand the concept of strong, weak and virtual in Java. The transmission address is: Detailed explanation of four references of strong, weak and virtual in Java
1, Introduction
It can solve the data security problem of multithreading and associate the current thread with a ...
Posted by Louis-Platt on Fri, 14 Jan 2022 22:06:47 +0100