intermediateTop 30 Scenario-Based Questions
How do you implement CQRS with MongoDB as write store and Redis as read store?
CQRS implementation: Write side: 1) OrderService writes to MongoDB (normalized, ACID-like). 2) After write: publish OrderCreated event via Spring ApplicationEventPublisher or Kafka. Read side: 3) EventHandler listens for OrderCreated. 4) Updates Redis structures: ZADD orders:user:{userId} {timestamp} {orderId} (sorted by time). 5) Updates MongoDB order_summaries collection (denormalized for displa
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
How do you implement CQRS with MongoDB as write store and Redis as read store?