MySQL as a distributed lock

Distributed lock mysql implementation Method 1: unique index Create a lock table with internal fields representing the resource name and resource description, and the same resource name uses the uniqueness restriction of the database. Multiple processes write the occupancy record of a resource to the database lock table at the same time. When a process […]

Avoid expensive locking – optimistic locking

Article directory Lock-free concurrency (optimistic locking) 1. CAS (CompareAndSet) 2. Atomic integer (class implemented with CAS method: AutomicInteger) 3. Atomic Reference (AutomicReference) 4. Atomic Arrays 5. Atomic Updater 6. Atomic accumulator (LongAdder) 6.1 Advantages of accumulators 6.2 Accumulator member variables 6.3 Avoid false sharing 6.4LongAdder operating principle Add method LongAccumulate method 7. Unsafe 7.1 Unsafe […]

Linux creates multiple pipelines to control problems in multiple processes through multiple pipelines

Introduction Recently, I learned that Linux uses anonymous pipes for inter-process communication, and I am going to write some code to consolidate this part of knowledge, and at the same time consolidate the content of file descriptors and process control. The general framework is to let the process create a batch of pipes and sub-processes, […]

7.DNS resolution failed, the oracle database could not be connected, the listener restarted and hung

The pro_db database cannot be connected, and the listener restarts and hangs to analyze the problem Solution: 1. Remove the /etc/resolv.conf configuration file so that the database cannot be restored after DNS resolution mv /etc/resolv.conf /etc/resolv.conf.bak 2. Add options timeout:1 to /etc/resolv.conf Look at the nsswitch.conf configuration file, the configuration is indeed to first resolve […]

Learn Golang scenario-based solutions in CSDN (grpc-based microservice development scaffolding)

One, use TLS encrypted communication between services In Golang’s gRPC-based microservice development, TLS encrypted communication can be used to ensure secure communication between services. Here is a simple design example: Generate certificate and key: $ openssl req -newkey rsa:2048 -nodes -keyout server.key \ -x509 -days 365 -out server.crt Define the gRPC server: func newServer() (*grpc. […]

Springboot based on javaweb+mysql is based on genetic algorithm school scheduling system (java+springboot+maven+mybatis+vue+mysql)

Springboot based on javaweb + mysql is based on genetic algorithm school scheduling system (java + springboot + maven + mybatis + vue + mysql) operating environment Java≥8, MySQL≥5.7, Node.js≥10 development tools Backend: eclipse/idea/myeclipse/sts can be configured to run Front end: WebStorm/VSCode/HBuilderX, etc. are all available Be applicable Course design, major assignments, graduation design, project […]

[C++] File operations (including special cases: spaces encountered in reading files are skipped, “files are only read once”)

author: & Carlton tag: C++ topic: [C ++] file operations (includes special cases: spaces encountered in reading files are skipped, “files are only read once”) website: Dark Horse Programmer C++ date: July 31, 2023 Directory text file write file source code file status read file source code operation result binary file write file source code […]

Simple analysis of flink sql of flink cdc (table to table)

Table of Contents 1. Parse the required dependencies 2. Define Flink SQL 3. Define the class 4. Overall analysis 1. Resolve required dependencies <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-table-planner_2.12</artifactId> <version>1.14.4</version> </dependency> The specific version depends on your project needs 2. Define Flink SQL CREATE TABLE `FLINK_CDC_DATA_SRC` ( ID STRING NOT NULL, NAME STRING PRIMARY KEY (ID) NOT ENFORCED […]

Use lightweight CDC debezium-server-databend to build real-time data synchronization

Author: Han Shanjie Databend Cloud R&D Engineer hantmac (Jeremy) GitHub Debezium Server Databend is a self-developed lightweight CDC project based on Debezium Engine, which is used to capture database changes in real time and deliver them as event streams, and finally write the data to the target database Databend. It provides an easy way to […]

Developers in practice | Intel Developer Kit + OpenVINO? (Anomalib) to build an AI defect detection development environment…

click on the blue word Follow us to make development more interesting Author: Wu Zeng, Deng Shumeng Guangdong Rongxu Intelligent Technology Co., Ltd. Introduction to this article Many readers are very interested in how to build an Anomalib + OpenVINO? development environment from scratch on the Intel Developer Kit after reading “Rongxu Intelligent Building an […]