DATA UPDATE ALGORITHM BASED ON TIME CRITERIA
DOI:
https://doi.org/10.31673/2412-4338.2026.034920Abstract
This paper presents an enhanced approach to logging systems for business services by implementing a modified producer-consumer pattern with time-based data aggregation. Traditional logging approaches that register each business process step using individual database queries places a significant load on relational database management systems (DBMS), resulting in performance bottlenecks. The proposed solution introduces a "smart" buffer that operates in accumulation mode, aggregating log messages over a defined time interval (Tmerge) before batch processing them to the database, reducing the frequency of database operations.
The mathematical model extends the classic producer-consumer pattern by incorporating an aggregation interval that governs when accumulated data are processed. This ensures optimal buffer utilization while minimizing database transactions. The model defines stability conditions that balance production and consumption rates to prevent buffer overflow or underflow scenarios, adapting to varying loads.
Empirical testing on a web server (4 cores, 16GB RAM) and SQL database server (4 cores, 32GB RAM) demonstrated significant improvements in system performance. Analysis of Microsoft SQL Server's Query Store showed reduced query execution frequency, decreased duration, and lower logical write operations. While CPU usage remained stable, there was a minor increase in RAM usage due to batch storage requirements. These results confirm that the accumulation-based buffer effectively reduces database load without compromising logging fidelity.
The approach aligns with recent research trends in streaming data processing, which increasingly favor batch processing and adaptive interval mechanisms. The solution offers flexibility through configurable parameters like the Tmerge interval and buffer capacity. Future research directions include developing real-time adaptive aggregation mechanisms and extending the model to distributed multi-node environments.
Keywords: producer-consumer pattern, logging systems model, time-based aggregation, buffer optimization, batch processing, mathematical model, query optimization, asynchronous processing.