Whitepapers & Research

Comparing complexity in MVC+CRUD vs. CQRS+ES

By Javier Toledo

This research explores the effectiveness of Domain-Driven Design (DDD) using Command Query Responsibility Segregation (CQRS) and Event-Sourcing (ES) patterns in simplifying and managing the complexity of large-scale software development projects. It takes a critical look at the common Model-View-Controller (MVC) pattern used in major frameworks like Spring Boot, NestJS or Ruby on Rails, which often leads to increased code complexity and difficult communication between product and engineering teams. The paper discusses the advantages of DDD, CQRS, and ES and their potential in reducing coupling, thus managing compound complexity effectively. It presents an in-depth comparison study between the MVC and the CQRS+ES approach, using quantitative metrics such as number of files created, functions/classes refactored, lines of code added or deleted, imported files and function calls. This study aims to illustrate the impact of these methodologies on the organization and interdependence of the codebase, and to offer valuable insights for improved software development practices.

Read in Github

Railway Event Processor: Abstractions for Safe Integrations in Event Sourcing

By Yeray Cabello

This whitepaper presents the Railway Event Processor, a proposed framework to handle third-party integrations in event-sourced or event-driven systems, addressing key challenges like orchestration, fault tolerance, concurrency handling, and communication. By introducing core concepts such as Task, Compromise, and Transition, the proposed language aims to bridge the gap between engineering and business teams, making the complexity of integrations visible and understandable. The design is applicable to event-oriented systems, with modifications necessary for non-event-oriented systems unless they follow the Command Query Responsibility Segregation principle. The ultimate goal is to build deterministic state machines for process orchestration.

Download full textFork in Github