An order tracking system has the following states: Placed, Confirmed, Shipped, Delivered, and Cancelled. Which state should the order transition to immediately after Placed?
Think about the logical flow of order processing after a customer places an order.
After an order is placed, it must be confirmed by the system or seller before shipping. So, the next state after Placed is Confirmed.
In designing an order tracking system, which component is best suited to manage the state transitions of orders reliably?
Consider where state and logic should be maintained to ensure consistency and reliability.
A state machine service with persistent storage ensures that order states and transitions are managed reliably and consistently, even across failures.
Your order tracking system must handle thousands of state updates per second during peak sales. Which approach best supports scaling these state transitions?
Think about how to distribute load and avoid bottlenecks.
Partitioning orders by region and using distributed state machines allows parallel processing and reduces contention, enabling better scalability.
In a distributed order tracking system, choosing between strong consistency and high availability for state updates is a key tradeoff. Which statement best describes this tradeoff?
Recall the CAP theorem and its implications for distributed systems.
Strong consistency ensures all nodes agree on the state immediately but can reduce availability if network partitions occur. This is a classic CAP theorem tradeoff.
Your system tracks the full state history of each order. Each state change record is 200 bytes. You expect 1 million orders per day, each with an average of 5 state changes. Estimate the storage needed for one month (30 days) of state history.
Calculate total records and multiply by record size, then convert bytes to GB.
1 million orders/day * 5 changes = 5 million records/day. Over 30 days = 150 million records. 150 million * 200 bytes = 30 billion bytes = 30 GB (A).