Tagged articles
8 articles
Page 1 of 1
Top Architect
Top Architect
Sep 2, 2024 · Backend Development

Inventory Deduction Strategies: Database vs. Redis with Lua Script Implementation

This article compares three inventory deduction approaches—single‑field MySQL updates, sharded MySQL records, and Redis INCRBY with Lua scripting—analyzes their concurrency drawbacks, and provides a complete Java implementation using Redis Lua scripts, distributed locks, and callback‑based stock initialization.

BackendLuainventory
0 likes · 13 min read
Inventory Deduction Strategies: Database vs. Redis with Lua Script Implementation
Top Architect
Top Architect
Dec 14, 2022 · Backend Development

Implementing Inventory Deduction and Preventing Overselling in E‑commerce with MySQL and Redis

This article explains three common inventory‑deduction strategies for e‑commerce—single‑field MySQL, multi‑row MySQL, and Redis incrby—analyzes their drawbacks under high concurrency, and provides a complete Redis‑Lua based solution with distributed locking, including full Java code examples for the callback interface, stock service, and controller.

distributed-lockinventoryredis
0 likes · 10 min read
Implementing Inventory Deduction and Preventing Overselling in E‑commerce with MySQL and Redis
JavaEdge
JavaEdge
Nov 20, 2022 · Backend Development

Designing a Scalable E‑Commerce Inventory System: Stock Deduction & DB Strategies

This article explains how to build a reliable e‑commerce inventory system by handling concurrent stock deductions, designing inventory and flow tables, using optimistic locking and transactions, and scaling the solution with read‑write splitting and Redis caching to meet high‑QPS demands.

Database designPerformance Optimizationinventory
0 likes · 9 min read
Designing a Scalable E‑Commerce Inventory System: Stock Deduction & DB Strategies
Wukong Talks Architecture
Wukong Talks Architecture
Oct 29, 2022 · Backend Development

Design and Architecture of a High‑Concurrency Flash Sale (秒杀) System

This article presents a comprehensive analysis of flash‑sale (秒杀) system requirements, performance estimations, non‑functional constraints, and detailed architectural designs—including dynamic‑static separation, traffic layering, high‑availability, and stock‑deduction strategies—along with the key technologies needed to support million‑level concurrent traffic.

Backend Architecturecachingdynamic static separation
0 likes · 16 min read
Design and Architecture of a High‑Concurrency Flash Sale (秒杀) System