Critical causal events in systems based on CQRS with event sourcing architecture

Loading...
Thumbnail Image

Date

Journal Title

Journal ISSN

Volume Title

Publisher

Національний університет «Запорізька політехніка»

Abstract

EN: Context. The article addresses the problem of causal events asynchrony which appears in the service-oriented information systems that does not guarantee that the events will be delivered in the order they were published. It may cause intermittent faults occurring at intervals, usually irregular, in a system that functions normally at other times. Objective. The goal of the work is the comparison and assessment of several existing approaches and providing a new approach for solving the causal events synchronization issue in application to the systems developed using Command Query Responsibility Segregation (CQRS) with Event Sourcing (ES) architecture approach. Methods. Firstly, the method of estimation of the likelihood of causal events occurring within the systems as the foundation for choosing the solution is suggested. Based on the results of the analysis of several projects based on CQRS with ES architecture it shows that the likelihood of critical causal events depends on the relationships among entities and the use-cases connected with the entities. Secondly, the Container of Events method, which represents a variation of event with full causality history, adapted to the needs of CQRS with ES architecture systems, was proposed in this work. The variants of its practical implementation have also been discussed. Also, the different solutions, such as Synchronous Event Queues and variation of Causal Barrier method were formalized and assessed. Thirdly, the methods described have been discussed and evaluated using performance and modification complexity criteria. To make the complexity-performance comparative assessment more descriptive the integrated assessment formula was also proposed. Results. The evaluation results show that the most effective solution of the issue is to use the Container of Events method. To implement the solution, it is proposed to make the modifications of the Event Delivery Subsystem and event handling infrastructure. Conclusions. The work is focused on the solution of the critical causal events issue for the systems based on CQRS with ES architecture. The method of estimation of the likelihood of critical causal events has been provided and different solutions of the problem have been formalized and evaluated. The most effective solution based on Container of Events method was suggested. UK: Актуальність. У статті розглядається проблема асинхронності причинно-наслідкових подій, що виникає в сервісно-орієнтованих інформаційних системах, які не гарантують доставку подій у порядку їх публікації. Це може призвести до помилок, які виникають випадково, як правило нерегулярно, у системі, яка протягом основного часу функціонує без збоїв. Мета роботи. Метою роботи є порівняння та оцінка кількох існуючих підходів та пропонування нового підходу до вирішення проблеми синхронізації причинно-наслідкових подій у системах, які побудовані з застосуванням архітектури Command Query Responsibility Segregation (CQRS) з Event Sourcing (ES). Методи. По-перше, пропонується метод оцінки ймовірності виникнення причинно-наслідкових подій у системах, як основа для вибору рішення. Так, на основі результатів аналізу кількох проектів, побудованих з застосуванням архітектури CQRS з ES, показано, що ймовірність критичних причинно-наслідкових подій залежить від взаємозв’язків між сутностями та юз-кейсів, пов’язаних із сутностями. По-друге, у цій роботі пропонується метод “Container of events”, який представляє варіацію події з повною історією причинно-наслідкових зв’язків, адаптовану до потреб систем побудованих з застосуванням архітектури CQRS з ES. Також обговорено варіанти його практичного впровадження. Крім того, були формалізовані та оцінені різні рішення, такі як синхронні черги подій та варіація методу “Causal Barrier”. По-третє, представлені методи, були описані та оцінені за критеріями продуктивності та складності модифікації. Для отримання порівняльної оцінки складності та продуктивності була вперше запропонована інтегрована формула оцінки. Результати. Результати оцінки показують, що найефективнішим рішенням проблеми є використання методу “Container of events”. Для впровадження рішення необхідно внести зміни до підсистеми доставки подій та інфраструктури обробки подій. Висновки. Робота зосереджена на вирішенні проблеми критичних причинно-наслідкових подій для систем, побудованих з застосуванням архітектури CQRS з ES. Запропоновано метод оцінки ймовірності виникнення критичних причинно-наслідкових подій, а також формалізовано та оцінено різні рішення цієї проблеми. Було запропоновано найефективніше рішення на основі методу “Container of events”.

Description

Lytvynov O. A. Critical causal events in systems based on CQRS with event sourcing architecture / O. A. Lytvynov, D. L. Hruzin // Радіоелектроніка, інформатика, управління. – 2024. – № 3 (70). – C. 119-143.

Citation