How ifnesi/python-kafka-microservices works
Main Components
a) Frontend Layer:
• Flask Web Application (webapp.py)
• Static assets (CSS/JS/Images)
• HTML Templates
• AJAX-based real-time status updates
b) Microservices Layer:
• Pizza Assembly Service (msvc_assemble.py)
• Pizza Baking Service (msvc_bake.py)
• Delivery Service (msvc_delivery.py)
• Status Processing Service (msvc_status.py)
c) Data Layer:
• SQLite3 State Store (for materialized views)
• Apache Kafka Topics
• ksqlDB Streams and Tables
Data Storage Layer (Bottom)
Use these specific visual elements:
• Rectangle with blue gradient: Web Application
• Hexagons with green gradient: Microservices
• Rounded rectangles with purple gradient: ksqlDB components
Detailed Component Relationships
Web Application
↓ (produces) → pizza-ordered topic
↑ (consumes via AJAX) ← Status Updates
pizza-ordered topic → [Assembly Service, Delivery Service (early warning)]
Assembly Service → pizza-assembled topic
pizza-assembled topic → Baking Service
Baking Service → pizza-baked topic
pizza-baked topic → Delivery Service
Delivery Service → pizza-status topic
Status Service ← pizza-status topic
Status Service → SQLite3 State Store
Additional Elements
Supporting components:
• Configuration management (config_kafka and config_sys)
• Error handling flows
• Graceful shutdown paths
• Consumer group relationships
• Topic partitioning strategy (murmur2)
Notes Section
Important implementation details:
• Consumer group rebalancing
• Early warning system
• SLA monitoring capabilities
• Stateful service considerations
• Schema evolution capabilities