🛠️ System Architecture Blueprint
A containerized telemetry pipeline designed to process high-frequency distributed radio-frequency identification (RFID) data streams without public internet ingress dependency. The system decouples incoming sensor tracking vectors into an isolated local messaging ring across 4 specialized .NET 8 microservices to protect data integrity under volatile operational spikes.
Microservice Topology
| Service | Role | Key Components |
|---|---|---|
| DeviceService | Core device event ingestion | DeviceEventEntity, RecordTelemetry feature, AppDbContext with EF Core migrations |
| NotificationService | Real-time alert dispatch | MetricsHub (SignalR), DeviceEventCreatedHandler, IntelligenceEventHandler |
| TelemetryIntelligenceService | Anomaly detection & analytics | Event-driven processing pipeline, threat analysis handlers |
| TelemetryDashboard.Blazor | Operator UI layer | Blazor WebAssembly with SignalR streaming telemetry at 60Hz |
Shared Contracts Layer
Cross-service communication is governed by verified event contracts from source:
DeviceEventCreated— Raised when RFID hardware events are ingested by DeviceServiceMetricsUpdated— Broadcast when telemetry thresholds are crossedTelemetryAnomalyDetected— Triggered by the intelligence pipeline on pattern deviationTelemetryAnalysisCompleted— Published after full analysis cycle
A Shared.Infrastructure library provides reusable ICacheService/CacheService abstractions and dependency injection extensions consumed by all four services.
🔄 Data Flow Matrix
The architecture organizes stream lifecycle transitions across a completely decoupled, allocation-free execution path:
- Telemetry Ingestion: Abstract edge sensor array components stream raw spatial telemetry data packets over TCP socket channels into the DeviceService.
- Asynchronous Buffering: A containerized RabbitMQ broker (via WolverineFx 3.5.0) dynamically cushions incoming spikes, enforcing transactional outbox patterns to prevent execution lockouts.
- Command Routing: WolverineFx serves as the internal CQRS message mediator, with strict separation of command and query paths across the service boundary.
- Dual-Tier Caching: Implements a strict Redis L1/L2 caching topology that handles state verification paths entirely within volatile static memory, keeping operational read latency below execution thresholds.
- Persistence Sink: PostgreSQL (via Npgsql + Entity Framework Core 8.0.10) archives processed records deterministically with migration-first schema evolution. Connection pooling tuned per-service.
- Realtime Push: A local SignalR loopback hub (
MetricsHub) broadcasts authenticated tracking vectors straight to the Blazor dashboard viewports at 60Hz. - API Documentation:
Swashbuckle.AspNetCore(6.9.0) provides OpenAPI specs for all service endpoints.
⚡ Use-Case Engineering Rationale
To guarantee deterministic throughput metrics, traditional global distributed transactions were explicitly abandoned. Instead:
- State eventual consistency managed through targeted WolverineFx outbox sweeps
- Memory allocation stalls eliminated via pooled buffer recycling in the serialization pipeline
- Connection pooling tuned per-service for PostgreSQL and Redis backends
- The entire mesh runs in Docker containers orchestrated via
docker-compose.ymlwith health checks and readiness probes ensuring self-healing under node failure