Tổng quan Kiến trúc
Kiến trúc của NotiBoost được thiết kế để đảm bảo reliability, scalability, và determinism.
Tổng quan
NotiBoost bao gồm các components chính sau:
Các Components
Event Ingestion
Component đầu tiên trong pipeline, xử lý incoming events:
- Validate event structure
- Normalize event data
- Queue events để xử lý
- Trả về trace_id ngay lập tức
Rule Engine
Rule engine đánh giá events và quyết định flows nào được trigger:
- Condition-based matching
- Deterministic evaluation
- Versioned rules
- Hot-reloadable (không cần restart)
Workflow Engine
Workflow engine điều phối multi-step notification flows:
- Sequential và parallel steps
- Conditional branching
- Delays và scheduling
- Fallback strategies
Channel Adapters
Channel adapters xử lý giao tiếp với notification channels:
- API integration với channels
- Quota management
- Retry logic
- Delivery status tracking
Observability
Observability layer cung cấp visibility đầy đủ:
- Trace IDs cho mỗi message
- Audit logs
- Delivery status tracking
- Error logging
Data Flow
Luồng xử lý từ event đến delivery:
- Product system gửi event qua API
- Event được validate và queue
- Rule engine đánh giá và match flow
- Workflow engine thực thi orchestration
- Channel adapter gửi message
- Observability layer ghi log toàn bộ process
Reliability
NotiBoost đảm bảo reliability thông qua:
Queue-based Processing
Events được queue trước khi xử lý, đảm bảo không mất message ngay cả khi system có traffic spike.
Automatic Retry
Failed deliveries được retry tự động với exponential backoff strategy.
Fallback Strategies
Khi primary channel fail, system tự động fallback sang channel khác theo cấu hình.
Scalability
Kiến trúc được thiết kế để scale:
- Horizontal scaling cho event processing
- Queue-based architecture xử lý traffic spikes
- Stateless components dễ scale
