-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Orchestration Module - Complete aggregation pipeline
📝 Description
Create an orchestration module that integrates all previous services (reception, normalization, outlier detection, aggregation, storage) into a cohesive pipeline. This module should coordinate the data flow from reception to final storage, handling errors and retries at each stage.
Context: Now that all individual components are implemented, we need an orchestrator to connect and coordinate them. This is the "brain" of the aggregator that decides what to do with each received price.
Tech Stack:
- NestJS Module with providers
- RxJS for reactive pipeline
- Event-driven architecture
- TypeScript with strict types
✅ Requirements
- Implement an
AggregatorOrchestrationServicethat coordinates the complete pipeline - Flow: Reception → Normalization → Outlier Detection → Aggregation → Storage
- Implement event-driven architecture (each stage emits events)
- Handle errors at each stage without stopping the complete pipeline
- Implement circuit breaker to prevent failure cascades
- Add detailed logging of the flow of each price
- Implement throughput and latency metrics per stage
- Configure aggregation intervals via environment variables
- Allow both real-time and batch processing
🎯 Acceptance Criteria
- The complete pipeline executes correctly from start to finish
- Each received price goes through all stages in order
- Errors at one stage are handled without crashing the pipeline
- Events are emitted at each stage for observability
- Circuit breaker is implemented that stops processing if there are many failures
- Latency and throughput metrics are logged per stage
- Integration tests of the complete pipeline exist (>75% coverage)
- The complete flow is documented with diagrams
📁 Expected files to change/structure
apps/aggregator/src/modules/aggregator-orchestration.module.ts- Main moduleapps/aggregator/src/services/orchestration.service.ts- Orchestrator serviceapps/aggregator/src/services/orchestration.service.spec.ts- Testsapps/aggregator/src/events/- Event definitionsprice-received.event.tsprice-normalized.event.tsprice-aggregated.event.ts
apps/aggregator/src/middleware/circuit-breaker.middleware.ts- Circuit breakerapps/aggregator/src/app.module.ts- Import orchestration moduleapps/aggregator/README.md- Document pipeline and architectureapps/aggregator/.env.example- Configuration variables
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program