ASP.NET  

Real-Time Inventory Updates

🔹 User Story 3 – Real-Time Inventory Updates

📌 Problem:
Inventory changes every second:

  • Item goes out of stock after purchase.

  • Supplier restocks.

  • Customers keep adding/removing items from carts.

You need near real-time stock levels (to prevent overselling).

✅ Solution with Apache Hudi

  • Hudi’s Merge-on-Read (MoR) storage allows streaming ingestion.

  • Example:

    • As soon as an order is placed, inventory for that product is updated in seconds.

    • If supplier adds stock, Hudi merges the update in near real-time.

  • It supports upserts → you can insert new rows or update existing rows (without full rewrites).

👉 This ensures customers always see the latest stock and fraud (overselling) is avoided.