Advanced Android – RxJava

I. Introduction RxJava is a reactive programming framework developed by Netflix based on the Java Virtual Machine . It belongs to the ReactiveX open-source project and aims to simplify the development process of asynchronous programming and event-driven programs. This framework extends the observer pattern to support the composition of observable objects for processing data streams and … Read more

Java Distributed Lock

1. The concept of distributed locks A distributed lock is a mechanism for coordinating mutual exclusion access to shared resources by multiple processes/services in a distributed system. In a single-machine system, we can use Java’s built-in locking mechanisms (such as synchronized` synchronized` and ` ReentrantLocksynchronized`) to achieve thread synchronization. However, in a distributed environment, these native locking … Read more

JDK 21 Virtual Thread Practice

I. Refer to official documentation II. What is a virtual thread? Objective : To support massive concurrent tasks (such as 1 million requests) with a small number of platform threads, thereby increasing throughput. type illustrate Platform Thread JVM threads are mapped to operating system threads (OS threads), which are costly to create (by default, several hundred … Read more

Detailed Explanation of the Java Character Class

Introduction The Character class in Java is used to process single characters. It provides many static and instance methods to handle various character attributes, such as case conversion, comparison, and classification. Understanding the usage of the Character class is crucial when writing programs involving character processing. This article will provide a detailed analysis of the … Read more

Redis Performance Optimization Guide

I. Insufficient Memory: Redis’s “Capacity Ceiling” Problem Redis, as an in-memory database, stores all data in memory. Once memory is full, it either triggers data eviction leading to the loss of frequently accessed data, or directly causes an OutOfMemoryError (OOM) that crashes the service. I have seen incidents during major e-commerce promotions where the database … Read more

Git Basic Operation Guide

I. What is Git? 1.1 The Birth and Concept of Git Git is a distributed version control system (DVCS) developed by Linus Torvalds, the creator of Linux, in 2005, initially for managing the Linux kernel code. Unlike traditional centralized version control systems (such as SVN), Git uses a distributed architecture, where each developer has a … Read more