A Smart Retail Point-of-Sale System Using Machine Learning

Forecasting and Application-Level Failover

Sara albuainain1,*

1 School of ICT, Faculty of Engineering, Design and Information & Communications Technology (EDICT), Bahrain Polytechnic, PO

Box 33349, Isa Town, Bahrain

Email: 202003580@student.polytechnic.bh

Received: January 08, 2026 Revised: March 10, 2026 Accepted: May 12, 2026 ⋆ Corresponding author

ABSTRACT

Point-of-Sale (POS) systems support retail transaction processing, inventory management, and operational decisionmaking.

However, many traditional POS systems rely on a single centralized database, creating a critical point

of failure during server faults, database errors, or network disruptions. Conventional POS systems may also lack

intelligent forecasting capabilities, causing inventory decisions to depend on manual estimation or fixed reorder rules.

These limitations can lead to operational interruption, inventory inconsistency, and inefficient stock management.

This study proposes a high-availability smart POS system integrated with AI-based inventory forecasting. The

framework uses a dual-database architecture consisting of a primary database and a secondary backup database.

Application-level failover redirects operations automatically when the primary database becomes unavailable, while

an event-driven backup mechanism synchronizes important data after critical transactions. The forecasting

component was developed using the Rossmann Store Sales dataset. Several models were evaluated, including

Random Forest (RF), Bagging, CatBoost, XGBoost, and KNN Regressor. Optimization algorithms including

PSO, MVO, HHO, and DE were also integrated with RF. The results showed that baseline RF achieved the best

overall performance, with MSE = 0.080454, RMSE = 0.283643, MAE = 0.184264, R2 = 0.919712, and WI =

0.978542. Among optimized models, PSO + RF achieved the strongest optimizer-based result, with MSE =

0.081480 and RMSE = 0.285446. The implemented system also demonstrated successful database connectivity,

failover readiness, and automatic backup execution. The findings confirm that the proposed framework can support

continuous retail operation while providing accurate AI-based forecasting and inventory recommendations.

Keywords: Smart POS Machine learning forecasting Application-level failover Inventory management Random

Forest

1. INTRODUCTION

Point-of-Sale (POS) systems have become fundamental components

of modern retail environments because they support

transaction processing, inventory management, sales monitoring,

and operational decision-making. Contemporary POS

platforms are no longer limited to billing and payment activities;

rather, they have evolved into intelligent business management

systems that integrate transactional functions with

analytical and predictive capabilities [1, 2]. The digital transformation

of retail has increased organizational dependence

on POS infrastructures for operational continuity, customer

experience improvement, and real-time business intelligence

[3, 4]. Consequently, reliability, availability, and forecasting

74