Ma Wei Says
Author

Ma Wei Says

Follow me! Discussing software architecture and development, AIGC and AI Agents... Sometimes sharing insights on IT professionals' life experiences.

29
Articles
0
Likes
19
Views
0
Comments
Recent Articles

Latest from Ma Wei Says

29 recent articles
Ma Wei Says
Ma Wei Says
Oct 2, 2025 · Databases

Essential Redis Best Practices: Keys, Memory, Security, and Performance

This guide outlines practical Redis best‑practice rules covering key naming conventions, data‑size limits, expiration strategies, script and transaction usage, client connection handling, and security measures to help you build fast, stable, and secure production systems.

Key DesignPerformanceRedis
0 likes · 9 min read
Essential Redis Best Practices: Keys, Memory, Security, and Performance
Ma Wei Says
Ma Wei Says
May 8, 2025 · Backend Development

Mastering Java ThreadPoolExecutor: Prevent OOM and Boost Concurrency

This article explains the fundamentals of Java threads and thread pools, details the configurable parameters of ThreadPoolExecutor, highlights the pitfalls of the Executors factory methods, and provides concrete recommendations and code examples for safely tuning thread pools across different workload types.

JavaPerformanceThreadPool
0 likes · 14 min read
Mastering Java ThreadPoolExecutor: Prevent OOM and Boost Concurrency
Ma Wei Says
Ma Wei Says
Apr 23, 2025 · Backend Development

Mastering Redis Counters: INCR/INCRBY vs DECR/DECRBY and Robust Design Patterns

This article explains Redis's atomic counter commands (INCR, INCRBY, DECR, DECRBY), highlights their pitfalls such as missing TTL and concurrency issues, and presents practical design solutions—including SET NX+EX initialization, double‑TTL compensation, retry queues, fallback strategies, and performance optimizations like Lua scripting and pipelining.)

CounterTTLdecr
0 likes · 10 min read
Mastering Redis Counters: INCR/INCRBY vs DECR/DECRBY and Robust Design Patterns
Ma Wei Says
Ma Wei Says
Apr 16, 2025 · Artificial Intelligence

How Google’s A2A Protocol Enables Seamless AI Agent Collaboration

Google’s open‑source A2A (Agent‑to‑Agent) protocol, unveiled at Google Cloud Next 2025, defines a standardized, secure, Web‑based framework that lets heterogeneous AI agents discover each other, negotiate interactions, and manage cross‑agent tasks, supporting multimodal communication, long‑running jobs, and push notifications.

A2A protocolAI AgentGoogle Cloud
0 likes · 11 min read
How Google’s A2A Protocol Enables Seamless AI Agent Collaboration
Ma Wei Says
Ma Wei Says
Apr 8, 2025 · Operations

Mastering High Availability: 4 Failover Patterns Explained

Understanding high‑availability architectures involves mastering replication and fail‑over, balancing RTO and RPO, and choosing among four patterns—Active‑Standby, Active‑Active, Cold Standby, and Hot Standby—each with distinct synchronization, load‑balancing, and cost considerations for reliable system design.

Active-ActiveFailoveractive standby
0 likes · 9 min read
Mastering High Availability: 4 Failover Patterns Explained
Ma Wei Says
Ma Wei Says
Apr 5, 2025 · Backend Development

Ensuring Accurate Inventory Deduction in High‑Concurrency Sales with Redis

This article explains why simple GET‑modify‑SET inventory updates cause overselling in flash‑sale spikes and presents several Redis‑based solutions—including Lua scripts, WATCH‑based optimistic locks, distributed SETNX locks, and asynchronous queue processing—detailing their implementation, advantages, and trade‑offs.

Distributed LockLua ScriptRedis
0 likes · 8 min read
Ensuring Accurate Inventory Deduction in High‑Concurrency Sales with Redis
Ma Wei Says
Ma Wei Says
Mar 30, 2025 · Fundamentals

How Kafka 4.0’s KRaft Replaces ZooKeeper with Raft Consensus

Kafka 4.0 introduces KRaft, a ZooKeeper‑free metadata layer built on the Raft consensus algorithm, detailing role transitions, leader election, log replication, controller and broker responsibilities, and fault‑tolerance mechanisms, enabling a more scalable and self‑managed architecture for large‑scale distributed streaming.

Consensus AlgorithmKRaftKafka
0 likes · 13 min read
How Kafka 4.0’s KRaft Replaces ZooKeeper with Raft Consensus
Ma Wei Says
Ma Wei Says
Mar 28, 2025 · Backend Development

Choosing the Right Message Queue: Kafka vs RocketMQ vs RabbitMQ Explained

This article compares Kafka, RocketMQ, and RabbitMQ, detailing their architectures, performance characteristics, strengths, and ideal use‑cases to help engineers select the most suitable message‑queue solution for high‑throughput, fault‑tolerant, and real‑time processing scenarios.

Event StreamingHigh ThroughputKafka
0 likes · 11 min read
Choosing the Right Message Queue: Kafka vs RocketMQ vs RabbitMQ Explained
Ma Wei Says
Ma Wei Says
Mar 24, 2025 · Artificial Intelligence

Master BGE Multilingual Embeddings: Models, Installation, and Quick Usage

Explore the BGE (BAAI General Embedding) family—including v1, v1.5, M3, Multilingual Gemma2, and EN‑ICL—detailing their multilingual capabilities, model variants, token limits, optimal use cases, and step‑by‑step installation and Python usage instructions with code examples for embedding generation and similarity scoring.

EmbeddingLLMPython
0 likes · 8 min read
Master BGE Multilingual Embeddings: Models, Installation, and Quick Usage