Наука и технология в современном миреМирзаева Ширин Нодировна, Тахиров Чингиз Аъзамович +22026
Event Sourcing for Retail Inventory: Kafka + BigQuery Real-Time Analytics
Sandeep Reddy Gundla · Lead Software Engineer · MACYS Inc
Международный журнал по науке о данных и машинному обучению · 01 · 11-36 · 2024
Аннотация
The retail business is experiencing difficulties in maintaining accurate inventory levels with low latency because of old batch processing systems. The proposed solution is a real-time application that uses the data stream architecture based on event-sourcing with Apache Kafka and Google BigQuery to provide streaming analytics. The immutability of the events makes it possible to reliably stream to Kafka such events as sales, returns, and stock adjustments. The scalability and fault-tolerant design of Kafka and the fact that BigQuery is serverless ensure a persistent foundation and real-time analytics in a sub-second query resolution. Significant improvements were the elaborate schema design, optimal Kafka topic setup, and introduction of real-time dashboards to gain insights into inventory. The results also show less than one-second update latency up to 100,000 events per second, and cost- efficient benchmarks of cloud infrastructure. The solution improves the real-time monitoring of the stock, thus reducing instances of out-of-stock and facilitating better decision making. The possibilities are immense for retail operations, providing better control of inventory management, pricing, and forecasting of demand. This model represents a significant step away from legacy batch ETL processes towards having the correct data as needed within retail to support a high-velocity, globalised sector. Future efforts will be dedicated to multi-region deployment, automatic schema change, and incorporating edge computing in offline shop scenarios. Key words: Event Sourcing, Kafka, BigQuery, Real-Time Analytics, Retail Inventory. 1. Introduction In contemporary retailing activities, charting the most up-to-date and precise level of inventory is crucial in addressing customer demand, managing shrinkage, and ensuring effective supply-chain management. Traditional inventory management systems are also oftentimes plagued with data staleness: the inventory levels shown in a centralized database are outdated concerning what is going on in another part of the world, like a point-of-sale, stock movement, or a new shipment inwards. Such latency can cause overselling, out-of-stock, and unfulfilled customers. There is also the issue of concurrency, where multiple services or locations of a store might be trying to update duplicate stock records. Absent a sound means of serializing or reconciling multiple simultaneous writes, conflicting updates may overwrite valid values or necessitate manual intervention, which is expensive and time- consuming. With the diversification of the retail ecosystems into online and physical stores, the problems of retention of coherent, consistent, and real-time inventory state are becoming increasingly painful. Traditionally, retail analytics has deployed batch Extract, Transform, Load (ETL) to merge the data on a transactional https://www.academicpublishers.org/journals/index.php/ijdsml 11 AMERICAN ACADEMIC PUBLISHER basis into the centralized data warehouses. A typical example of a workflow is point-of-sale and warehouse systems storing transaction logs in staging tables every few hours. The records are then loaded into a fact table for reporting purposes. Although such a solution makes it possible to research trends on a daily or even hourly basis, it poses a considerable time lag between the actual instances of inventory changes and the corresponding changes in analytics solutions. Delays of several tens of minutes to a few hours imply that essential decisions (such as repricing during flash sales or relocating supplies to areas with high demand) are made based on out-of-date data. Moreover, staged ETL pipelines will need a lot of orchestration overhead, complicated dependency management, and preparation to maintain them to accommodate schema change, data quality problems, and recovery. Event-sourcing is another form of architecture where each state change is reflected as an immutable event and appended to an event log. Instead of creating updates to a mutable record in-place, the system stores separate data events, including InventoryAdded, SaleRecorded, or StockAdjusted. The present state of any entity can then be determined by replaying or aggregating its event history. The design offers several significant benefits: a complete, auditable account of all inventory-related operations; simpler recovery and temporal querying through replaying events at any point in time; and the ability to support flexible and cross-shard read models by projecting different variations (i.e., per-SKU, per-location, or global inventory) without affecting the source of truth. Event- sourcing also lends itself to concurrency control effortlessly due to the append-only nature of the storage, thereby allowing the resolution of conflicting operations at the time of ingestion. Apache Kafka is a distributed streaming system designed to make real-time event reads and writes at scale. Kafka supports ingestion of millions of events
Доказательный фрагмент
«The retail business is experiencing difficulties in maintaining accurate inventory levels with low latency because of old batch processing systems.»
Образец извлечения
Демо-превьюThe retail business is experiencing difficulties in maintaining accurate inventory levels with low latency because of old batch processing systems. Полный текст публикации CiteX не хранит — доступ к первоисточнику открывается по DOI согласно лицензии издателя и выбранному плану.
- Цитирований
- 0
- Тип
- Журнал
- Страна
- Узбекистан
- Ключевые слова
- Event Sourcing, Kafka, BigQuery, Real-Time Analytics, Retail Inventory, Retail Inventory.
Смежные источники
ЖУРНАЛ ТЕХНИЧЕСКИХ ИССЛЕДОВАНИЙЭлмурод Сотволдиевич Умаров, Зиёдбек Шавкатович Халилов +12021
Медицина и инновацииМ Сабиров, О Скосырева +12021
Научные статьиM.H.Sayidova, S.U.Pulatova2025