zjuncher/yunqi-youxiang — explained in plain English
Analysis updated 2026-05-18
Study how to build a flash sale system that prevents overselling limited vouchers.
Learn how Kafka can decouple order creation from the request that triggers it.
Practice combining local and Redis caching to reduce database load.
See a working example of sliding window API rate limiting in Java.
| zjuncher/yunqi-youxiang | kcpeppe/gcsee-jma | happynewyear1995/uba-x | |
|---|---|---|---|
| Stars | 44 | 42 | 47 |
| Language | Java | Java | Java |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 2/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires MySQL, Redis, and Kafka running locally plus manual config edits before it starts.
Yunqi Youxiang is an educational Java backend project that simulates a local life services platform, the kind of app where users browse nearby shops, claim discount vouchers, check in daily, follow businesses, and read reviews written by other users. It is built as a learning resource for Java developers who want hands on practice with real world high concurrency backend techniques, and its structure was inspired by a well known business review teaching project. The centerpiece feature is a flash sale voucher system. When a limited quantity discount coupon goes on sale, many users may try to claim it in the same instant. Handling that safely, without overselling stock or crashing the server, is a common hard problem in backend engineering. This project addresses it with Redis, a fast in memory data store, using small scripts called Lua scripts to check and deduct inventory as one uninterrupted operation. Once a claim succeeds, the order is not written to the database right away. Instead it is sent as a message to Kafka, a message queue, and a separate background process reads that message and creates the real order, keeping the database from being hit directly by every request. The project also demonstrates a two layer caching setup, combining an in process local cache with Redis to reduce load on the database for popular shops, plus a sliding window rate limiter built with custom annotations that can restrict requests globally or per user and per IP address. A scheduled job cancels orders that go unpaid past a timeout, and cache updates are handled carefully to avoid common problems like querying data that does not exist or many requests hitting the database at once when a cache entry expires. It runs on Spring Boot with MyBatis-Plus, MySQL, Redis, Kafka, and the Caffeine local caching library, and requires MySQL, Redis, and Kafka running locally before it starts. It is aimed at Java learners who want to study or copy these concurrency patterns rather than at end users of the app itself.
A Java learning project simulating a local services app, showing how to build flash sale, caching, and rate limiting systems with Redis and Kafka.
Mainly Java. The stack also includes Java, Spring Boot, MyBatis-Plus.
No license information was provided in the README, so usage rights are unclear.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.