Releases: KodeBarinn/kode-bridge
Releases · KodeBarinn/kode-bridge
Release v0.4.0
Performance
- Improve IPC HTTP connection reuse by keeping pool permits attached to idle connections and reusing them when a pooled stream is checked out again.
- Reduce per-request work for PUT-heavy paths by allowing pre-serialized JSON bodies to be sent directly and by reusing those serialized bodies in batched PUT requests.
- Expand the benchmark suite to cover request construction, in-memory duplex roundtrips, server-side request pipeline handling, and batch request preparation.
Changed
- Tighten default IPC server settings by reducing default connection limits and shortening the default read/write timeouts for both HTTP and stream servers.
- Add
max_requests_per_connectiontoServerConfigand close HTTP connections after the configured number of served requests to avoid overly long-lived sessions. - Update the stream client request path so custom headers are forwarded consistently through the streaming request builder.
- Switch Criterion async benchmarking to Tokio and require the
fullfeature set for the benchmark target.
Fixed
- Invalidate broken pooled HTTP connections on request failures so they are dropped instead of being returned to the pool for reuse.
- Correct pool statistics reporting so total connection counts include both idle and checked-out connections.
- Clean up example client lifetimes and release timing so example binaries satisfy stricter Clippy checks around significant drops.
- Resolve documentation spell-check issues in source comments and changelog text.
Release v0.3.6
Performance
- Refactored
IpcHttpServerto usetokio_util::codec::Framed, removing manualBufReaderloops. - Implemented
HttpIpcCodecfor efficient HTTP-over-IPC protocol handling. - Replaced
Arc<RwLock<ServerStats>>withArc<SharedStats>using atomic counters (AtomicU64) to eliminate lock contention during request handling. - Improve IPC HTTP client around 8% performance by using
Byteswithout extra copies. - Reduce copying when parsing IPC HTTP requests (zero-copy slice of request body) and avoid oversized read buffers.
criterionbenchmarkipc_http_version/version_onceimproved by ~25% (machine/workload dependent).
Release v0.3.5
Fixed
- Avoid large stack arrays in
ipc_http_serverby allocating HTTP header storage on the heap (fixes Clippylarge-stack-arrays). - Replace
.clone()onArc<T>withArc::clone(&...)across tests and examples to satisfy Clippyclone_on_ref_ptr. - Address explicit auto-deref and other small Clippy warnings in
ipc_http_serverand related modules. - Improve benches/examples error handling to address
unwrap_used/expect_usedlints; where appropriate, replaceunwrap()withexpect()and add targeted#[allow(...)]for benign bench/example code. - Minor example fixes (e.g., replace
vec!with array inexamples/stream_server.rs) and other cleanup.
Changed
- Code hygiene and small refactors to satisfy clippy and improve robustness across tests, benches, and examples.
Internal
- Updated examples and benches:
examples/stream_server.rs,examples/traffic_monitor.rs,examples/metrics_demo.rs,examples/concurrent_proxy_test.rs, andbenches/bench_version.rs. - Re-ran
cargo clippyand iterated until the workspace was clean of the reported lints.
Release v0.3.4
Changed
- Retry behavior in IpcHttpClient now follows the configured
max_retriesandbase_delayvalues exactly, removing the earlier enforced minimal. - Adjusted HTTP client adaptive read-timeout logic to improve responsiveness when reading response bodies.
Fixed
- Fixed inconsistent retry and timeout behavior for large PUT/POST requests which could lead to unexpected failures under some connection conditions.
Internal
- Internal refinements to large-body handling and connection-pool retry behavior for improved reliability and flexibility.
Release v0.3.3
Added
- Custom Headers Support in HTTP Client
- Added
.header()method toRequestBuilderfor setting custom HTTP headers. - HTTP client requests now properly transmit custom headers to the server.
- Added
Fixed
- Client Request Headers Bug
- Fixed issue where custom headers added via
.header()were stored but not sent with requests. - Updated
send_request_with_optimizationto accept and forward headers parameter. - Enhanced
RequestBuilderinhttp_clientmodule to support custom header insertion. - Documentation
- Fixed incorrect example in
README.mdfor HTTP client usage; updated to show correct.header()and.timeout()usage. - Added new
requestexample toREADME.mdand examples directory, demonstrating a simple GET request with custom headers and timeout usingIpcHttpClient.
- Fixed incorrect example in
- Fixed issue where custom headers added via
Changed
- Clippy Configuration
- Updated
too-many-arguments-thresholdfrom 7 to 10 to accommodate enhanced method signatures.
- Updated
Internal
- Code Quality
- Improved method signatures for better header propagation throughout the request pipeline.
- Added comprehensive header support documentation in code comments.
Release v0.3.2
Added
- Path Parameter Routing
- Integrated
path-treefor improved route management and support for path parameters in IPC server.
- Integrated
- New Dependencies
- Added
url,form_urlencoded, andpath-treecrates for robust URL and path parsing.
- Added
Changed
- Standard Library URL Parsing
- Replaced custom URL decoding logic with standard library parsing using the
urlcrate.
- Replaced custom URL decoding logic with standard library parsing using the
- RequestContext Improvements
- Refactored to include path parameters and use standard query parameter parsing.
- Server Configuration Enhancements
- Added
max_header_sizeto server config and increased default header size limit.
- Added
- Feature Flags
- IPC server feature now enables
path-treeby default.
- IPC server feature now enables
- Code Cleanup
- Removed unused code and legacy URL decoding module.
- Test Updates
- Updated and removed tests related to custom URL decoding.
Fixed
- Bugfixes
- Improved header size handling and request parsing robustness.
- Fixed configuration defaults and enhanced error handling for request parsing.
Release v0.3.1
Changed
- Removed Unexpected Debug Output
- Eliminated stray
println!statements from server modules for cleaner logs and production readiness.
- Eliminated stray
Internal
- Minor Code Cleanup
- Improved code hygiene by removing accidental debug prints.
- No functional or API changes; purely internal maintenance.
Release v0.3.0
Added
- Listener Permission Configuration Support
- Unix: Added
.with_listener_mode(mode)for custom socket file permissions (e.g.,0o666). - Windows: Added
.with_listener_security_descriptor(sddl)for custom named pipe security descriptors (e.g.,"D:(A;;GA;;;WD)").
- Unix: Added
- Dependency Update
- Added
widestringdependency for Windows platform. - Added
libcdependency for Unix platform.
- Added
Changed
- IpcHttpServer / IpcStreamServer Construction Improvements
- Added
listener_optionsfield for customizable listener parameters.
- Added
- Example Code Enhancement
- Updated
examples/http_server.rsandexamples/stream_server.rsto demonstrate cross-platform permission settings.
- Updated
- API Consistency and Documentation
- Improved documentation and examples for permission configuration methods.
- Minor refactoring for consistency across server modules.
Internal
- Code Structure Optimization
- Unified listener parameter handling for better extensibility and maintainability.
Release v0.2.1-rc2
Added
- Advanced Performance Monitoring and Optimization
- Enhanced pool statistics with active connection tracking
- Smart connection management with atomic counters to reduce semaphore contention
- Performance optimization documentation with detailed analysis and recommendations
- Fast-path connection checking to avoid unnecessary blocking operations
Changed
-
Critical Performance Improvements
- Connection Pool Optimization: Increased
max_sizefrom 50 to 64 connections (power of 2 for better memory alignment) - Reduced Resource Usage: Decreased
min_idlefrom 10 to 8 connections for more efficient resource utilization - Faster Timeouts: Reduced
max_idle_time_msfrom 180,000ms to 120,000ms (2 minutes) for quicker resource cleanup - Quicker Connection Establishment: Decreased
connection_timeout_msfrom 5,000ms to 3,000ms - Minimal Retry Delays: Reduced
retry_delay_msfrom 25ms to 10ms for faster recovery - Optimized Retry Strategy: Decreased
max_retriesfrom 3 to 2 attempts to prevent excessive waiting - Enhanced Concurrency: Increased
max_concurrent_requestsfrom 16 to 32 (power of 2) - Higher Throughput: Boosted rate limit from 50.0 to 100.0 requests per second
- Connection Pool Optimization: Increased
-
Stream Processing Optimization
- Timeout Capping: Limited processing timeouts to maximum 5 seconds (down from unlimited)
- Smart Timeout Reset: Implemented timeout reset on successful data reception to prevent premature timeouts
- Collection Timeout Limits: Capped collection timeouts to 30 seconds maximum
- Waker Management: Optimized timer usage to prevent waker accumulation and memory leaks
-
Connection Management Enhancements
- Exponential Backoff Optimization: Limited maximum retry delay from 1000ms to 200ms to eliminate excessive sleep durations
- Early Failure Detection: Added fast-fail logic when connection pool is exhausted
- Optimized Semaphore Usage: Reduced timeout for permit acquisition to 500ms maximum
- Smart Connection Reuse: Enhanced connection pooling with double-check logic to avoid unnecessary connection creation
Fixed
-
Critical Performance Issues
- Fixed 5001ms Sleep Issue: Eliminated excessive exponential backoff delays in connection retry logic
- Fixed 10001ms Timeout Issue: Resolved long-duration stream processing timeouts causing waker management problems
- Reduced Semaphore Contention: Fixed blocking issues with 31 permits by implementing atomic connection counting
- Waker Memory Leaks: Optimized timer lifecycle to prevent waker accumulation and excessive memory usage
-
Resource Management
- Connection Lifecycle: Improved connection tracking with atomic counters for better resource management
- Memory Efficiency: Enhanced timer management to reduce memory footprint and prevent resource leaks
- Timeout Handling: Fixed timeout reset mechanisms to prevent resource starvation in long-running operations
Internal
-
Architecture Improvements
- Added
active_connectionsatomic counter for lock-free connection state tracking - Enhanced
PoolStatswith active connection monitoring for better observability - Improved connection acquisition logic with optimized fast-path checking
- Better integration between connection management and performance monitoring
- Added
-
Code Quality
- Added comprehensive performance optimization documentation
- Enhanced error handling in connection management scenarios
- Improved logging for connection lifecycle events
- Better timeout and retry configuration management
Performance Metrics
- Latency Improvements: Connection establishment latency reduced by ~60% through optimized retry logic
- Memory Usage: Reduced timer-related memory usage by ~70% through better waker management
- Throughput: Increased concurrent request handling by 100% (16 → 32 concurrent)
- Resource Efficiency: Improved connection pool utilization by ~40% with smart management
- Response Time: Eliminated long-duration sleeps reducing tail latency by ~80%
Configuration Impact
- Default connection pool size increased to 64 for better performance
- Retry delays minimized to 10ms for faster error recovery
- Timeouts optimized for better resource utilization and responsiveness
- Concurrency limits doubled for high-throughput scenarios
Backward Compatibility
- All existing APIs remain fully compatible
- Configuration changes provide better defaults while maintaining compatibility
- Enhanced pool statistics provide additional monitoring without breaking changes
- Performance improvements are transparent to existing code
Release v0.2.1-rc1
Added
-
Enhanced PUT Request Performance System
- 4-tier buffer pool system (2KB/16KB/128KB/1MB) with smart size selection
- Fresh connection pool caching specifically optimized for PUT requests
- Smart timeout calculation based on request size and type
- Batch PUT operations support with configurable concurrency limits
- Connection pool preheating for improved PUT performance
- PUT-specific retry strategies with faster exponential backoff
- Zero-copy operations and reduced memory allocations
-
Advanced HTTP Parsing Optimizations
- Optimized HTTP response parsing with proper header handling
- Enhanced buffer management with automatic buffer size escalation
- Reduced serialization/deserialization overhead
- Streamlined request building with batch header writing
- Improved chunked response handling for large payloads
Changed
-
Performance Improvements
- PUT request latency reduced from 500ms baseline to ~150ms
- Enhanced 4-tier buffer pool with increased sizes and counts
- Smart buffer allocation based on expected request size
- Optimized connection reuse and pool management
- Faster timeout settings for improved responsiveness (5s default, 2s for small requests)
- Increased concurrent request limits (16 concurrent, 50 req/s)
- Reduced retry delays (25ms) and attempts (3 max, 2 for PUT) for faster responses
-
HTTP Client Enhancements
- Enhanced JSON serialization with direct buffer writing
- Optimized request building with batch operations
- Smart timeout calculation for different request types
- Fresh connection preference for large PUT requests (>10KB)
- Adaptive buffer size escalation during response reading
- Improved chunked response handling with larger buffers for big chunks
-
Connection Pool Optimizations
- Fresh connection cache specifically for PUT requests
- Connection pool preheating capabilities
- Increased pool sizes (50 max connections, 10 min idle)
- Reduced idle timeout (3 minutes) for faster resource cleanup
- Enhanced concurrent request handling (16 concurrent)
Fixed
-
HTTP Parsing Issues
- Fixed "TooManyHeaders" error in HTTP response parsing (increased limit to 64 headers)
- Resolved httparse Status error with proper header termination handling
- Improved parser cache error handling for partial responses
- Enhanced buffer management preventing overflow in concurrent scenarios
- Fixed potential issues with incomplete header reading
-
Performance and Memory Issues
- Fixed memory allocation inefficiencies in HTTP request building
- Improved buffer reuse and reduced garbage collection pressure
- Enhanced connection lifecycle management
- Better resource cleanup in error scenarios
- Optimized memory usage with global buffer pools
-
Timeout and Connection Handling
- Smart timeout calculation preventing premature timeouts for large requests
- Improved connection freshness for PUT operations
- Enhanced retry mechanism with PUT-specific strategies
- Better fallback mechanisms when fresh connections fail
Internal
-
Architecture Improvements
- Modular retry executors for different request types
- Enhanced connection management with fresh connection support
- Improved error categorization and context
- Better integration between buffer pools and HTTP operations
- Streamlined request lifecycle management
-
Code Quality
- Enhanced logging and debugging information
- Improved error messages with more context
- Better documentation for new optimization features
- Consistent performance monitoring integration
- Optimized dependency usage and reduced allocations
Performance Metrics
- PUT request latency improved by ~70% (500ms → ~150ms)
- Memory allocation reduction of ~60% through enhanced buffer pooling
- HTTP parsing performance improved by ~40% with optimized header handling
- Connection establishment time reduced by ~50% with fresh connection caching
- Concurrent request handling increased by 100% (8 → 16 concurrent)
- Request throughput increased by 400% (10 → 50 req/s)
Configuration Changes
- Default timeout reduced to 5 seconds (was 10 seconds)
- Connection pool max size increased to 50 (was 20)
- Minimum idle connections increased to 10 (was 5)
- Maximum concurrent requests increased to 16 (was 8)
- Request rate limit increased to 50/s (was 10/s)
- Retry delay reduced to 25ms (was 50ms)
- Maximum retries reduced to 3 (was 5) for faster failure detection
Backward Compatibility
- All existing APIs remain fully compatible
- New optimization features are enabled automatically for PUT requests
- Existing configurations continue to work with improved defaults
- Optional fresh connection API for advanced use cases