Ray's Galactic Tech
Author

Ray's Galactic Tech

Practice together, never alone. We cover programming languages, development tools, learning methods, and pitfall notes. We simplify complex topics, guiding you from beginner to advanced. Weekly practical content—let's grow together!

339
Articles
0
Likes
2.4k
Views
0
Comments
Recent Articles

Latest from Ray's Galactic Tech

100 recent articles max
Ray's Galactic Tech
Ray's Galactic Tech
Aug 26, 2026 · Big Data

Layered Real‑Time Data Warehouse with Flink CDC, Kafka & Doris

The article explains why real‑time data‑warehouse projects often fail in production and presents a complete, production‑ready solution that layers ODS, DWD, DWS and ADS using Flink CDC to capture MySQL changes, Kafka for buffering and replay, and Doris for OLAP storage, with detailed guidance on architecture, state handling, fault‑tolerance and operations.

CDCData EngineeringDoris
0 likes · 35 min read
Layered Real‑Time Data Warehouse with Flink CDC, Kafka & Doris
Ray's Galactic Tech
Ray's Galactic Tech
Aug 25, 2026 · Backend Development

How to Secure Wallet Funds at Billion‑Scale Through Reconciliation: Balance Checks, Channel Matching, and Auto‑Repair

In high‑throughput wallet systems, reconciliation—covering internal balance validation, channel‑level matching, and controlled auto‑repair—acts as the final safeguard against fund discrepancies caused by lost callbacks, out‑of‑order events, duplicate entries, or concurrency conflicts, ensuring financial safety even with billions of daily transactions.

Distributed Systemsauto-repairbalance-validation
0 likes · 33 min read
How to Secure Wallet Funds at Billion‑Scale Through Reconciliation: Balance Checks, Channel Matching, and Auto‑Repair
Ray's Galactic Tech
Ray's Galactic Tech
Aug 24, 2026 · Backend Development

Decoupling Payments and Wallets: From Order Domain to a Unified Accounting Center

The article walks through why embedding a wallet in the order service leads to boundary violations and failures under load, and presents a step‑by‑step evolution from an order‑centric wallet to a dedicated, event‑driven accounting center that ensures consistency, auditability, and high‑throughput scalability.

Idempotencyaccountingdomain-driven design
0 likes · 42 min read
Decoupling Payments and Wallets: From Order Domain to a Unified Accounting Center
Ray's Galactic Tech
Ray's Galactic Tech
Aug 22, 2026 · Backend Development

High-Concurrency Wallet Design: Hot Accounts, Idempotent Deductions, and Sharding Practices

The article analyses why wallet balance deduction is more error‑prone than inventory, outlines the root causes of a real‑world 60 k TPS outage, and presents a production‑grade architecture that separates strong‑consistent user deductions from asynchronous hot‑account crediting using idempotent requests, unique DB constraints, sharding, outbox messaging, and comprehensive monitoring to guarantee financial correctness under extreme load.

IdempotencyOutboxTransaction
0 likes · 32 min read
High-Concurrency Wallet Design: Hot Accounts, Idempotent Deductions, and Sharding Practices
Ray's Galactic Tech
Ray's Galactic Tech
Aug 20, 2026 · Backend Development

Payment Reconciliation: Detecting Lost Orders, Over‑payments and Auto‑Repairing Them

The article explains why successful payment does not guarantee correct accounting, defines discrepancy types such as lost orders, over‑payments and shortfalls, and presents a production‑grade reconciliation architecture with T+1 bill ingestion, shard‑based diff detection, state‑machine driven error handling, automatic repair workflows, and comprehensive monitoring.

auto-repairlost ordersmonitoring
0 likes · 45 min read
Payment Reconciliation: Detecting Lost Orders, Over‑payments and Auto‑Repairing Them
Ray's Galactic Tech
Ray's Galactic Tech
Aug 20, 2026 · Backend Development

Why Wallet Balance Shouldn't Be Calculated On‑The‑Fly: Double‑Entry Accounting, Snapshots, and Immutable Ledger Practices

The article explains that a production‑grade wallet must store balance snapshots instead of summing transaction flows, using double‑entry bookkeeping, ACID guarantees, idempotent request handling, outbox messaging, sharding, and comprehensive reconciliation to ensure correctness and high‑throughput under heavy concurrency.

Idempotencybalance snapshotdouble-entry accounting
0 likes · 43 min read
Why Wallet Balance Shouldn't Be Calculated On‑The‑Fly: Double‑Entry Accounting, Snapshots, and Immutable Ledger Practices
Ray's Galactic Tech
Ray's Galactic Tech
Aug 19, 2026 · Backend Development

Designing a 12‑State Payment System State Machine from Pending to Completed

This article presents a complete design for a 12‑state payment order state machine that handles high‑concurrency scenarios such as payment callbacks arriving after an order has been cancelled, using explicit state transitions, database CAS updates, Redis + DB idempotency, Outbox pattern and Kafka‑driven asynchronous processing to achieve reliable, auditable and compensatable order lifecycle management.

IdempotencyKafkaMySQL
0 likes · 39 min read
Designing a 12‑State Payment System State Machine from Pending to Completed
Ray's Galactic Tech
Ray's Galactic Tech
Aug 17, 2026 · Backend Development

From DB Row Locks to Redis + Lua: Evolving Flash‑Sale Inventory Deduction

The article walks through the evolution of a flash‑sale inventory‑deduction system, starting with simple database row‑locking SQL, exposing its scalability limits, and progressively adding transaction trimming, Redis pre‑deduction, Lua atomic scripts, async pipelines, idempotency, reconciliation and robust engineering practices to handle extreme concurrency.

AsyncProcessingHighConcurrencyIdempotency
0 likes · 40 min read
From DB Row Locks to Redis + Lua: Evolving Flash‑Sale Inventory Deduction
Ray's Galactic Tech
Ray's Galactic Tech
Aug 16, 2026 · Backend Development

Ditch Seata: Build a Production‑Ready SAGA Orchestrator with a 500‑Line Java State Machine

This article shows how to replace heavyweight distributed‑transaction frameworks such as Seata with a lightweight, production‑grade SAGA orchestrator built from a Java state machine, MySQL persistence and Spring Boot, covering architecture, state‑machine design, database schema, core orchestration logic, recovery, exception handling and practical deployment tips.

IdempotencyJavaSpring Boot
0 likes · 46 min read
Ditch Seata: Build a Production‑Ready SAGA Orchestrator with a 500‑Line Java State Machine
Ray's Galactic Tech
Ray's Galactic Tech
Aug 14, 2026 · Backend Development

Payment Callback After Order Cancellation? 3 Consistency Challenges and Practical Engineering Solutions

The article examines why payment callbacks that arrive later than order cancellations cause money‑in‑order‑canceled anomalies, outlines the three core eventual‑consistency problems—message ordering, duplicate consumption, and message loss—and presents a complete engineering solution using business idempotency keys, a transactional outbox, state‑machine handling, and reconciliation compensation.

Distributed SystemsIdempotencyKafka
0 likes · 35 min read
Payment Callback After Order Cancellation? 3 Consistency Challenges and Practical Engineering Solutions