Application of Event-Driven Microservices in a Real-Time Product Recommendation System

Các tác giả

  • KIM KHUONG PHAM Industrial University of Ho Chi Minh City
  • MANH DUNG PHAN
  • THI HOANG KHANH NGUYEN

Từ khóa:

Event-driven architecture, Microservices, Apache Kafka, Real-time recommendation, Collaborative Filtering, Content-Based Filtering, E-commerce personalization

Tóm tắt

Abstract — This paper presents the design and implementation of a real-time product recommendation system based on an event-driven microservices architecture. Traditional recommendation engines are commonly deployed as synchronous services tightly coupled to monolithic back-end systems, which leads to scalability limitations and increased response latency under high traffic. In this work, we employ Apache Kafka as a central event log to decouple services and to stream user interaction events, such as product views, add-to-cart actions, and purchases. An event-collector service cleans and enriches click events using Kafka Streams state stores, while a recommendation engine service consumes enriched events to update a user–item interaction matrix and to generate both collaborative filtering and content-based recommendations. Recommended items are cached in a key–value store to support low-latency API queries from the front-end. Experimental results on a realistic e-commerce scenario show that the proposed architecture can handle high-throughput event ingestion while maintaining real-time recommendation latency, demonstrating the suitability of event-driven microservices for scalable personalization in modern web applications.

Tóm tắt nội dung — Bài báo này trình bày thiết kế và hiện thực một hệ thống gợi ý sản phẩm thời gian thực dựa trên kiến trúc microservices điều khiển theo sự kiện. Hệ thống sử dụng Apache Kafka làm nhật ký sự kiện trung tâm để tách rời các dịch vụ và truyền các sự kiện tương tác người dùng như xem sản phẩm, thêm vào giỏ hàng và mua hàng. Dịch vụ thu thập sự kiện chịu trách nhiệm làm sạch và làm giàu dữ liệu nhấp chuột bằng Kafka Streams, trong khi dịch vụ máy gợi ý tiêu thụ các sự kiện đã làm giàu để cập nhật ma trận tương tác người–sản phẩm và sinh ra gợi ý theo hai hướng Collaborative Filtering và Content-Based Filtering. Các danh sách gợi ý được lưu trong bộ nhớ đệm khóa–giá trị để phục vụ truy vấn thời gian thực từ phía giao diện người dùng. Thực nghiệm trên kịch bản thương mại điện tử mô phỏng cho thấy kiến trúc đề xuất có thể xử lý lượng lớn sự kiện với độ trễ gợi ý thấp, phù hợp cho các hệ thống cá nhân hóa ở quy mô lớn.

Đã Xuất bản

09-12-2025

Số

Chuyên mục

Kỹ thuật phần mềm (Software Engineering)