Databases are at the core of every app, playing a critical role in ensuring data consistency and transactional guarantees. With new databases being created every day , it's essential to understand their significance in modern applications.
Below you will find highlights, comments, and thoughts about that article The Modern Transactional Stack, diving into the details of databases and their various usage stacks.
Databases are known for their transactional guarantees. Also known as Online Transaction Processing (OLTP) databases, they have long been a critical component of application design. They ensure data consistency, preventing issues like loss or duplication of data and maintaining the operability of online accounts.
With scale and microservice architecture, however, we mostly get eventual consistency. The article highlights emerging systems that extend strong transactional guarantees beyond the databases into distributed apps themselves. They say that this has led to the emergence of two categories of solutions: workflow orchestration and database-centric approaches .
Workflow orchestration involves writing blocks of code that execute based on events or timers, with the workflow engine handling transactions, mutations, and idempotency . This approach simplifies the developer's job, allowing them to focus on writing the business logic while the engine takes care of the underlying transactional guarantees.
On the other hand, database-centric approaches extend traditional OLTP databases to support arbitrary code execution for workflows alongside data management. This is achieved by exposing OLTP semantics directly , allowing developers to make explicit decisions on mutations, transactions, and idempotency for regular code blocks. This is interesting with the Semantic Layer in mind.
Both workflow-centric and database-centric approaches are gaining traction in the industry and seem to be on a collision course, as developers and organizations seek the best solution for their specific needs. Despite the advances in distributed systems, databases remain the backbone of many data architectures today, ensuring reliability, consistency, and scalability in a complex and ever-changing landscape .
More key highlights from the article:
Transactions are essential in modern applications for ensuring consistency and preventing corrupt states. Distributed systems, like microservices, complicate transaction management due to the distribution of transactional needs. Many companies haven't extended transactional guarantees beyond databases, causing issues at scale, including data inconsistencies and errors. Application state and business data should be distinguished in this context, as they represent different aspects of the system. Workflow-centric approaches work on application state and provide transactional guarantees for code execution. Database-centric approaches extend databases to support code execution alongside data management, allowing for transactional compliance in regular code blocks. Workflow engines allow for gradual adoption by existing apps and can be applied piecemeal to certain workflows with minimal footprint. Application Logic Transactional Platform (ALTP) extends OLTP transactions into the application, but often requires users to rely on the database offering for benefits. Workflow-centric and database-centric approaches are converging, as managing both application state and database state is complex but necessary. The convergence raises the question of whether to bring application logic to the database or the database to the application logic.