How programmerzamannow/oltp-olap-demo works
This repository demonstrates an e-commerce OLTP-to-OLAP CDC pipeline and includes a Spring Boot data generator with a browser-based inspector. The principal flow is generated transactions into PostgreSQL, captured by Debezium and Kafka, then ingested into ClickHouse for analytics. The README documents the pipeline, connector behavior, and analytics; the sampled JavaScript confirms browser calls to data and metric APIs. Other generator internals and deployment wiring are represented only where the README or tree supports them.
Main entry points: app.js Stream Inspector UI · init.sql PostgreSQL OLTP · controller Generator REST API · postgres-connector.json Debezium Connector
Components 11
Generator and Inspector
- Stream Inspector UI
data-generator/src/main/resources/static/app.js - Generator REST API
data-generator/src/main/java/com/example/datagen/controller - Transaction Generator
data-generator/src/main/java/com/example/datagen/service/DataGeneratorService.java - Metrics REST API
data-generator/src/main/java/com/example/datagen/controller/MetricsController.java
OLTP and CDC
- PostgreSQL OLTP
postgres/init.sql - Debezium Connector
debezium/postgres-connector.json
Event Streaming
- Kafka Topics
podman-compose.yml
OLAP and Analytics
- Kafka Ingestion and Views
clickhouse/init.sql - ClickHouse OLAP
clickhouse/init.sql
Other components
- Browser User
- Analytics User
Connections 10
- Browser User → Stream Inspector UI: opens
README.md - Stream Inspector UI → Generator REST API: requests pages
data-generator/src/main/resources/static/app.js - Stream Inspector UI → Metrics REST API: requests metrics
data-generator/src/main/resources/static/app.js - Transaction Generator → PostgreSQL OLTP: writes transactions
README.md - Generator REST API → PostgreSQL OLTP: serves OLTP records
README.md - PostgreSQL OLTP → Debezium Connector: streams WAL changes
README.md - Debezium Connector → Kafka Topics: publishes events
README.md - Kafka Topics → Kafka Ingestion and Views: feeds Kafka tables
README.md - Kafka Ingestion and Views → ClickHouse OLAP: materializes rows
README.md - Analytics User → ClickHouse OLAP: queries analytics
README.md