Course contentsShow
← Data Engineering
Lesson 29 of 8251. Foundations of Data EngineeringFree lesson

Architecting Hybrid Transactional and Analytical Processing Systems

Learners will explore strategies for managing systems that require near real-time analytics on top of live transactional data streams.

In this lesson, you will learn how to design systems that bridge the gap between live transaction processing and immediate analytical insights.

The Challenge of Separation

Up until now, we’ve discussed keeping transactional systems (OLTP) and analytical systems (OLAP) separate. In a traditional setup, you perform an ETL process to move data from a production database to a data warehouse. While this keeps your analytical queries from slowing down your live website, it introduces latency. By the time your data is ready for analysis, it could be minutes or even hours old.

Bridging the Gap with HTAP

Hybrid Transactional and Analytical Processing (HTAP) systems aim to eliminate that delay by allowing you to run analytical queries directly on the live data store.

To achieve this without crashing your production environment, we use specialized storage engines. These engines keep a single copy of the data, but internally represent it in two ways:

  1. Row-oriented: Optimized for fast updates (transactions).
  2. Columnar-oriented: Optimized for complex aggregations (analytics).

A Conceptual Look at Data Flow

Imagine a simplified orders table. Your application is constantly adding new rows (Write Path). Simultaneously, you want to calculate the total daily revenue (Read Path).

-- Transactional Write (Fast, row-based)
INSERT INTO orders (order_id, customer_id, amount) VALUES (101, 'A', 50.00);

-- Analytical Read (Efficient, columnar-based)
SELECT SUM(amount) FROM orders WHERE date = CURRENT_DATE;

In an HTAP architecture, the system engine intelligently routes these requests. The INSERT interacts with the row-based storage to ensure ACID compliance and speed, while the SUM operation is automatically executed against a synchronized columnar replica to minimize Disk I/O.

By using this architecture, you reduce the "Data Gravity" problem—you don’t need to move massive datasets across your network to a separate warehouse. Instead, you perform your analytics where the data lives, providing your business stakeholders with near-real-time visibility into operations as they happen.

Key Takeaway: HTAP architectures enable near real-time analytics by utilizing dual-format storage engines to handle both row-based transactional writes and columnar-based analytical reads within a single system.