Tarsier LabsTarsier Labs
🐡
Home
Categories
Tags
Bookmarks
About
Back to tags

Idempotency

0 articles

Redis Distributed Lock System: Decorator-Based Concurrency Control

Redis Distributed Lock System: Decorator-Based Concurrency Control

JoyMini API's distributed lock system is based on Redis SET NX PX atomic operations and Lua script unlocking, providing a declarative API through the @DistributedLock decorator, covering three modes: Cron task deduplication, API endpoint rate limiting, and nested critical sections.

00
Interface Management
Deep Dive into Payment Webhook & Callback Handling β€” Optimistic Locking, Idempotency, Atomic Wallet Operations

Deep Dive into Payment Webhook & Callback Handling β€” Optimistic Locking, Idempotency, Atomic Wallet Operations

In-depth analysis of PaymentWebhookController (single endpoint routing + callback-token authentication) β†’ handleUniversalWebhook (deposit/withdrawal routing) β†’ handleInvoiceWebhook (updateMany optimistic locking + creditCash) β†’ handlePayoutWebhook (atomic unfreeze + CRITICAL degradation) β†’ WalletService (ensureWallet / creditCash / freezeCash / unfreezeCash + beforeBalance/afterBalance audit trail)

00
Management Backend