Tagged articles
15 articles
Page 1 of 1
php Courses
php Courses
Jan 21, 2026 · Backend Development

How to Implement Purchase Quantity Limits in a PHP E‑Commerce Site

This guide explains how to add purchase quantity limits to a PHP‑based online store by designing a stock field in the database, updating product detail, cart, and order pages, using Ajax for dynamic updates, and ensuring inventory consistency throughout the checkout process.

ajaxe‑commercequantity limit
0 likes · 4 min read
How to Implement Purchase Quantity Limits in a PHP E‑Commerce Site
Sohu Tech Products
Sohu Tech Products
Jul 16, 2025 · Backend Development

Designing a Scalable Lottery System: Stock Pre‑allocation, Real‑time Risk Control & Dynamic Probability

This article details the design of a reusable, configurable lottery platform for a youth‑focused social app, covering business background, pain points, a modular data model, micro‑service architecture, stock pre‑allocation with optimistic and distributed locks, real‑time risk detection, over‑issue prevention, probability calculation, and future AI‑driven enhancements.

Backend ArchitectureLottery Systemdistributed locking
0 likes · 26 min read
Designing a Scalable Lottery System: Stock Pre‑allocation, Real‑time Risk Control & Dynamic Probability
Sohu Tech Products
Sohu Tech Products
May 7, 2025 · Backend Development

Design and Implementation of a Scalable Lottery Activity Platform

The article describes how the FoxFriend team built a scalable, configurable lottery‑activity platform that replaces manual feed‑based draws with a modular micro‑service architecture, featuring a flexible prize‑tier data model, pre‑occupied inventory buckets, multi‑tenant isolation, high‑concurrency stock deduction, user risk controls, accurate probability handling, and a roadmap toward AI‑driven optimization.

Backend DevelopmentLottery Systemdistributed-lock
0 likes · 25 min read
Design and Implementation of a Scalable Lottery Activity Platform
php Courses
php Courses
Jan 17, 2025 · Backend Development

Implementing Product Purchase Quantity Limits in a PHP E‑Commerce Store

This guide explains how to design the database, modify product detail, cart, and order pages, and use PHP and Ajax to enforce stock‑based purchase quantity limits in an online store, ensuring users cannot exceed available inventory and improving overall shopping experience.

BackendPHPe‑commerce
0 likes · 4 min read
Implementing Product Purchase Quantity Limits in a PHP E‑Commerce Store
php Courses
php Courses
Aug 5, 2024 · Backend Development

Implementing Product Purchase Quantity Limits in a PHP E‑Commerce Site

This article explains how to implement product purchase quantity limits in a PHP‑based online store by designing a stock field in the database, updating product detail, cart, and order pages, using Ajax for dynamic updates, and handling inventory adjustments during order processing to improve user experience and operational efficiency.

Backende‑commercequantity limit
0 likes · 4 min read
Implementing Product Purchase Quantity Limits in a PHP E‑Commerce Site
Top Architect
Top Architect
May 27, 2024 · Backend Development

Implementing High‑Concurrency Stock Deduction with MySQL, Redis, Lua Scripts and Distributed Locks

The article analyzes common inventory‑deduction scenarios, compares three approaches—single‑row MySQL, multi‑row MySQL, and Redis INCRBY—highlights the limitations of database‑based methods under heavy load, and presents a robust Redis‑Lua solution with distributed locking and Java code examples for reliable stock management.

JavaLua scriptingredis
0 likes · 12 min read
Implementing High‑Concurrency Stock Deduction with MySQL, Redis, Lua Scripts and Distributed Locks
Architecture Digest
Architecture Digest
Mar 11, 2023 · Backend Development

Design and Evolution of the Vivo Mall Inventory System Architecture

This article details the evolution, layered architecture, stock types, deduction strategies, high‑concurrency solutions, and synchronization mechanisms of the Vivo Mall inventory system, illustrating how the backend was refactored to support diverse business scenarios and prevent overselling.

high concurrencyinventorystock management
0 likes · 15 min read
Design and Evolution of the Vivo Mall Inventory System Architecture
Dada Group Technology
Dada Group Technology
Sep 19, 2022 · Backend Development

How to Build a Real‑Time Inventory Sync System that Eliminates Overselling

This article analyzes the challenges of real‑time inventory synchronization for omnichannel retail—such as sync latency, concurrent overselling, and shared stock calculation—and presents a comprehensive backend architecture featuring low‑latency syncing, dynamic throttling, safety‑stock algorithms, and a scalable calculation engine.

Backend ArchitectureDistributed SystemsSynchronization
0 likes · 11 min read
How to Build a Real‑Time Inventory Sync System that Eliminates Overselling
Top Architect
Top Architect
Jul 26, 2022 · Backend Development

Stock Deduction Strategies: Database vs Redis Implementations

This article compares three stock‑deduction approaches—single‑record MySQL, sharded MySQL, and Redis with Lua scripts—analyzes their performance and concurrency issues, and provides complete Java/Spring code for a Redis‑based solution including distributed locking and initialization callbacks.

distributed-lockinventoryspring
0 likes · 10 min read
Stock Deduction Strategies: Database vs Redis Implementations
Architect
Architect
Jul 25, 2022 · Backend Development

Stock Deduction Strategies: Database vs Redis and a Spring‑Based Implementation

This article compares three stock‑deduction approaches—single‑record MySQL, multi‑record MySQL, and Redis incrby—analyzes their concurrency drawbacks, and provides a complete Spring Java implementation using a Lua script, distributed lock, and callback for initializing inventory.

springstock management
0 likes · 11 min read
Stock Deduction Strategies: Database vs Redis and a Spring‑Based Implementation
Selected Java Interview Questions
Selected Java Interview Questions
Mar 23, 2022 · Backend Development

Stock Deduction Strategies Using MySQL and Redis with Lua Scripts

This article examines common stock‑deduction scenarios in e‑commerce and lottery systems, compares three implementation approaches—single‑row MySQL updates, sharded MySQL rows, and Redis INCRBY with Lua scripts—analyzes their concurrency issues, and provides detailed Java code for a robust Redis‑based solution with distributed locking and serialization considerations.

Luastock management
0 likes · 20 min read
Stock Deduction Strategies Using MySQL and Redis with Lua Scripts
JD Tech
JD Tech
Apr 12, 2018 · Backend Development

Designing a High‑Availability Inventory System: Stock Pre‑allocation, Duplicate Order Prevention, Rollback Mechanisms, and Concurrency Control

The article explains how JD Daojia's inventory system achieves stability and high availability for millions of items by using health‑monitoring platforms, choosing an order‑submission stock reservation strategy, preventing duplicate submissions with token and idempotent mechanisms, implementing rollback procedures, and applying various concurrency‑safe stock‑deduction techniques with code examples.

Backendconcurrencyinventory
0 likes · 12 min read
Designing a High‑Availability Inventory System: Stock Pre‑allocation, Duplicate Order Prevention, Rollback Mechanisms, and Concurrency Control
Dada Group Technology
Dada Group Technology
Aug 25, 2017 · Backend Development

Designing a High‑Availability Inventory System: Stock Pre‑allocation, Idempotency, Concurrency Control, and Rollback Strategies

The article describes how JD Daojia's inventory system serves millions of stores by using health‑monitoring platforms, pre‑allocation policies, idempotent order processing, distributed locks, and rollback mechanisms to ensure stability, prevent overselling, and handle high‑concurrency scenarios such as flash‑sales.

Idempotencydistributed-lockinventory
0 likes · 11 min read
Designing a High‑Availability Inventory System: Stock Pre‑allocation, Idempotency, Concurrency Control, and Rollback Strategies