Skip to content

Releases: KodeBarinn/kode-bridge

Release v0.4.0

24 Apr 06:33
de31d0f

Choose a tag to compare

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_connection to ServerConfig and 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 full feature 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

18 Jan 00:34
e7dd855

Choose a tag to compare

Performance

  • Refactored IpcHttpServer to use tokio_util::codec::Framed, removing manual BufReader loops.
  • Implemented HttpIpcCodec for efficient HTTP-over-IPC protocol handling.
  • Replaced Arc<RwLock<ServerStats>> with Arc<SharedStats> using atomic counters (AtomicU64) to eliminate lock contention during request handling.
  • Improve IPC HTTP client around 8% performance by using Bytes without extra copies.
  • Reduce copying when parsing IPC HTTP requests (zero-copy slice of request body) and avoid oversized read buffers.
  • criterion benchmark ipc_http_version/version_once improved by ~25% (machine/workload dependent).

Release v0.3.5

15 Dec 05:57
23e5f81

Choose a tag to compare

Fixed

  • Avoid large stack arrays in ipc_http_server by allocating HTTP header storage on the heap (fixes Clippy large-stack-arrays).
  • Replace .clone() on Arc<T> with Arc::clone(&...) across tests and examples to satisfy Clippy clone_on_ref_ptr.
  • Address explicit auto-deref and other small Clippy warnings in ipc_http_server and related modules.
  • Improve benches/examples error handling to address unwrap_used/expect_used lints; where appropriate, replace unwrap() with expect() and add targeted #[allow(...)] for benign bench/example code.
  • Minor example fixes (e.g., replace vec! with array in examples/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, and benches/bench_version.rs.
  • Re-ran cargo clippy and iterated until the workspace was clean of the reported lints.

Release v0.3.4

10 Oct 22:10
93297d2

Choose a tag to compare

Changed

  • Retry behavior in IpcHttpClient now follows the configured max_retries and base_delay values 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

01 Oct 21:58
ac147d3

Choose a tag to compare

Added

  • Custom Headers Support in HTTP Client
    • Added .header() method to RequestBuilder for setting custom HTTP headers.
    • HTTP client requests now properly transmit custom headers to the server.

Fixed

  • Client Request Headers Bug
    • Fixed issue where custom headers added via .header() were stored but not sent with requests.
    • Updated send_request_with_optimization to accept and forward headers parameter.
    • Enhanced RequestBuilder in http_client module to support custom header insertion.
    • Documentation
      • Fixed incorrect example in README.md for HTTP client usage; updated to show correct .header() and .timeout() usage.
      • Added new request example to README.md and examples directory, demonstrating a simple GET request with custom headers and timeout using IpcHttpClient.

Changed

  • Clippy Configuration
    • Updated too-many-arguments-threshold from 7 to 10 to accommodate enhanced method signatures.

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

30 Sep 04:22
49f2697

Choose a tag to compare

Added

  • Path Parameter Routing
    • Integrated path-tree for improved route management and support for path parameters in IPC server.
  • New Dependencies
    • Added url, form_urlencoded, and path-tree crates for robust URL and path parsing.

Changed

  • Standard Library URL Parsing
    • Replaced custom URL decoding logic with standard library parsing using the url crate.
  • RequestContext Improvements
    • Refactored to include path parameters and use standard query parameter parsing.
  • Server Configuration Enhancements
    • Added max_header_size to server config and increased default header size limit.
  • Feature Flags
    • IPC server feature now enables path-tree by default.
  • 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

29 Sep 14:53
bb25514

Choose a tag to compare

Changed

  • Removed Unexpected Debug Output
    • Eliminated stray println! statements from server modules for cleaner logs and production readiness.

Internal

  • Minor Code Cleanup
    • Improved code hygiene by removing accidental debug prints.
    • No functional or API changes; purely internal maintenance.

Release v0.3.0

27 Sep 15:46
454bdd0

Choose a tag to compare

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)").
  • Dependency Update
    • Added widestring dependency for Windows platform.
    • Added libc dependency for Unix platform.

Changed

  • IpcHttpServer / IpcStreamServer Construction Improvements
    • Added listener_options field for customizable listener parameters.
  • Example Code Enhancement
    • Updated examples/http_server.rs and examples/stream_server.rs to demonstrate cross-platform permission settings.
  • 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

29 Aug 14:21
0ad40be

Choose a tag to compare

Release v0.2.1-rc2 Pre-release
Pre-release

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_size from 50 to 64 connections (power of 2 for better memory alignment)
    • Reduced Resource Usage: Decreased min_idle from 10 to 8 connections for more efficient resource utilization
    • Faster Timeouts: Reduced max_idle_time_ms from 180,000ms to 120,000ms (2 minutes) for quicker resource cleanup
    • Quicker Connection Establishment: Decreased connection_timeout_ms from 5,000ms to 3,000ms
    • Minimal Retry Delays: Reduced retry_delay_ms from 25ms to 10ms for faster recovery
    • Optimized Retry Strategy: Decreased max_retries from 3 to 2 attempts to prevent excessive waiting
    • Enhanced Concurrency: Increased max_concurrent_requests from 16 to 32 (power of 2)
    • Higher Throughput: Boosted rate limit from 50.0 to 100.0 requests per second
  • 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_connections atomic counter for lock-free connection state tracking
    • Enhanced PoolStats with active connection monitoring for better observability
    • Improved connection acquisition logic with optimized fast-path checking
    • Better integration between connection management and performance monitoring
  • 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

20 Aug 14:38
c5d0cc5

Choose a tag to compare

Release v0.2.1-rc1 Pre-release
Pre-release

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