Skip to content

Commit 02fe03c

Browse files
committed
docs: update AI integration guide and usage
1 parent 0c65db5 commit 02fe03c

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

docs/integration/AI_ROUTING_LAB.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,46 @@ This document provides comprehensive instructions for integrating **quic-test**
1010

1111
```
1212
quic-test (Go)
13-
14-
Prometheus Metrics (port 9090)
15-
13+
↓ ↑
14+
Prometheus Predictions
15+
Metrics (Feedback Loop)
16+
↓ ↑
1617
AI Routing Lab Collector
17-
18+
1819
Metrics Database (JSON/CSV)
19-
20+
2021
ML Models (LSTM, XGBoost, etc.)
21-
22-
Predictions (latency, jitter, loss)
23-
24-
CloudBridge Relay (Route Selection)
22+
↓ ↑
23+
Predictions API (FastAPI)
2524
```
2625

2726
### System Components
2827

2928
| Component | Language | Purpose |
3029
|-----------|----------|---------|
31-
| quic-test | Go | QUIC protocol testing, metrics generation |
30+
| quic-test | Go | QUIC protocol testing, metrics generation, **AI consumer** |
3231
| AI Routing Lab Collector | Python | Ingests Prometheus metrics from quic-test |
3332
| ML Models | Python (TensorFlow/PyTorch) | Trains and serves latency/jitter predictions |
3433
| CloudBridge Relay | Go | Uses ML predictions for intelligent routing |
3534

35+
## AI Consumer Integration
36+
37+
`quic-test` now includes a built-in AI consumer that closes the loop:
38+
39+
1. **Metrics Collection**: `quic-test` collects real-time metrics (RTT, Jitter, Loss).
40+
2. **Prediction Request**: Periodically sends these metrics to the AI Routing Lab Inference API.
41+
3. **Route Optimization**: Receives predictions (e.g., "High Latency Expected") and simulates route switching logic.
42+
43+
To enable this feature, use the `--ai-enabled` flag.
44+
3645
## Quick Start
3746

3847
### Step 1: Start quic-test with Prometheus Export
3948

4049
```bash
41-
# Terminal 1: Start quic-test server with metrics
50+
# Terminal 1: Start quic-test server with metrics and AI enabled
4251
cd quic-test
43-
./bin/quic-test --mode=server --addr=:9000 --prometheus-port 9090
52+
./bin/quic-test --mode=server --addr=:9000 --prometheus-port 9090 --ai-enabled --ai-service-url http://localhost:5000
4453
```
4554

4655
**Verify Prometheus endpoint:**

0 commit comments

Comments
 (0)