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!

353
Articles
0
Likes
3.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 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.

IdempotencyJavaSAGA
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.

Eventual ConsistencyIdempotencyKafka
0 likes · 35 min read
Payment Callback After Order Cancellation? 3 Consistency Challenges and Practical Engineering Solutions
Ray's Galactic Tech
Ray's Galactic Tech
Aug 13, 2026 · Backend Development

Event Sourcing Primer: Rebuilding State Without a Database

This article explains how event sourcing replaces the traditional current‑state table with an immutable event log, allowing systems to reconstruct any state, handle concurrency, support auditing, and power flexible read models through projections, while outlining the necessary architectural components such as aggregates, event stores, snapshots, outbox, idempotency, and the natural transition to CQRS.

CQRSIdempotencyOutbox
0 likes · 32 min read
Event Sourcing Primer: Rebuilding State Without a Database
Ray's Galactic Tech
Ray's Galactic Tech
Aug 12, 2026 · Backend Development

Message Queue Showdown: When to Use Kafka, RabbitMQ, or Pulsar

This article dissects common MQ mis‑selections, categorises four message types, explains the five architectural roles of a message broker, compares Kafka, RabbitMQ and Pulsar on capabilities and trade‑offs, and provides a step‑by‑step selection guide with real‑world code snippets and best‑practice patterns.

Event-Driven ArchitectureKafkaMessage Queue
0 likes · 26 min read
Message Queue Showdown: When to Use Kafka, RabbitMQ, or Pulsar
Ray's Galactic Tech
Ray's Galactic Tech
Aug 11, 2026 · Cloud Native

Microservice Governance: Gateway, Config Center & Tracing to Avoid Pitfalls

Splitting a monolithic order system into separate services introduces challenges such as scattered routing, uncontrolled configuration changes, and fragmented logs, which can be mitigated by implementing a unified API Gateway, a centralized Nacos configuration center, and comprehensive SkyWalking tracing to ensure observability, fault isolation, and safe incremental releases.

API gatewayNacosObservability
0 likes · 50 min read
Microservice Governance: Gateway, Config Center & Tracing to Avoid Pitfalls
Ray's Galactic Tech
Ray's Galactic Tech
Aug 10, 2026 · Cloud Native

Destruction and Rebirth: Deep Dive into ETCD Backup and Restore for Kubernetes Clusters

This article walks through a real‑world ETCD failure, explains why ETCD is the control‑plane brain, details the three‑layer ETCD architecture, exposes common backup pitfalls, and provides a production‑grade backup‑restore workflow—including snapshot API usage, Go implementation, verification steps, and post‑restore validation—for reliable Kubernetes disaster recovery.

BackupCloud NativeGo
0 likes · 33 min read
Destruction and Rebirth: Deep Dive into ETCD Backup and Restore for Kubernetes Clusters