feat: add automatic adaptive performance optimization for high-volume scenarios

- Implement AdaptiveSocketManager for zero-config socket pool scaling
- Add AdaptiveBackpressure for intelligent flow control with circuit breaker
- Create PerformanceMonitor for real-time metrics and auto-optimization
- Automatically adapt to load patterns without manual configuration
- Self-healing system that learns from usage patterns
- Dynamically adjust batch sizes based on system resources
- Automatic recovery from socket exhaustion scenarios
- No configuration required - system adapts automatically

This addresses socket exhaustion issues reported by bluesky-package
by providing automatic, adaptive resource management that scales
based on actual load patterns.
This commit is contained in:
David Snelling 2025-08-07 08:37:15 -07:00
parent e237e81700
commit 9842af2fe3
8 changed files with 1585 additions and 74 deletions

View file

@ -49,6 +49,22 @@ import {
createModuleLogger
} from './utils/logger.js'
// Export performance and optimization utilities
import {
getGlobalSocketManager,
AdaptiveSocketManager
} from './utils/adaptiveSocketManager.js'
import {
getGlobalBackpressure,
AdaptiveBackpressure
} from './utils/adaptiveBackpressure.js'
import {
getGlobalPerformanceMonitor,
PerformanceMonitor
} from './utils/performanceMonitor.js'
// Export environment utilities
import {
isBrowser,
@ -87,7 +103,15 @@ export {
logger,
LogLevel,
configureLogger,
createModuleLogger
createModuleLogger,
// Performance and optimization utilities
getGlobalSocketManager,
AdaptiveSocketManager,
getGlobalBackpressure,
AdaptiveBackpressure,
getGlobalPerformanceMonitor,
PerformanceMonitor
}
// Export storage adapters