Tag

stock deduction

0 views collected around this technical thread.

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.

BackendInventoryLua
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 LockInventoryJava
0 likes · 10 min read
Implementing Inventory Deduction and Preventing Overselling in E‑commerce with MySQL and Redis
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
Selected Java Interview Questions
Selected Java Interview Questions
Oct 25, 2022 · Backend Development

Implementing Inventory Deduction and Preventing Overselling in E‑commerce Projects

The article examines three approaches to handling inventory deduction in e‑commerce—single‑field MySQL, sharded MySQL rows, and Redis incrby—analyzes their concurrency drawbacks, and presents a robust Redis‑Lua script solution with distributed locking and Java implementation details.

BackendInventoryJava
0 likes · 9 min read
Implementing Inventory Deduction and Preventing Overselling in E‑commerce Projects
Python Programming Learning Circle
Python Programming Learning Circle
Sep 1, 2021 · Backend Development

Implementing Stock Deduction with MySQL and Redis Using Lua Scripts

This article compares MySQL‑based single and multi‑record stock deduction methods with a Redis‑based approach that uses Lua scripting and distributed locks, providing full Java implementation details and REST examples for high‑concurrency inventory management.

BackendJavaLua scripting
0 likes · 10 min read
Implementing Stock Deduction with MySQL and Redis Using Lua Scripts
Selected Java Interview Questions
Selected Java Interview Questions
Mar 9, 2021 · Backend Development

Stock Deduction Strategies: Database vs. Redis with Distributed Lock Implementation in Java

The article compares three stock‑deduction approaches—single‑record MySQL, sharded MySQL rows, and Redis INCRBY with Lua scripts—analyzes their concurrency drawbacks, and presents a complete Java implementation using Redis, distributed locks, and callback‑based stock initialization.

BackendDistributed LockJava
0 likes · 10 min read
Stock Deduction Strategies: Database vs. Redis with Distributed Lock Implementation in Java