Skip to content

feat: add common_system integration adapters#22

Merged
kcenon merged 2 commits into
mainfrom
feature/common-system-adapters
Sep 28, 2025
Merged

feat: add common_system integration adapters#22
kcenon merged 2 commits into
mainfrom
feature/common-system-adapters

Conversation

@kcenon

@kcenon kcenon commented Sep 28, 2025

Copy link
Copy Markdown
Owner

Summary

  • Implemented adapter pattern to integrate thread_system with common_system standard interfaces
  • Added conditional compilation support via USE_COMMON_SYSTEM flag for optional integration
  • Updated build configuration and documentation to reflect ecosystem integration capabilities

Changes

New Adapters

  • common_system_executor_adapter: Bridges thread_pool to common::interfaces::IExecutor
  • common_system_logger_adapter: Adapts thread_system logger to common::interfaces::ILogger
  • common_system_monitoring_adapter: Exposes thread metrics through common::interfaces::IMonitoring

Build System Updates

  • Added USE_COMMON_SYSTEM CMake option for conditional compilation
  • Updated CMakeLists.txt to support common_system integration when enabled

Documentation

  • Updated ARCHITECTURE.md with ecosystem integration notes
  • Clarified that network_system integrates via adapters without hard dependencies

Purpose

This PR enables thread_system to seamlessly integrate with the broader ecosystem through common_system's standardized interfaces. Key benefits:

  • Interoperability: Thread pools can be used by any module supporting IExecutor interface
  • Consistency: Unified logging and monitoring across all ecosystem modules
  • Flexibility: Optional integration via compile flag preserves backward compatibility
  • Modularity: Adapter pattern allows gradual migration without breaking existing code

Technical Details

The adapters use conditional compilation (#ifdef USE_COMMON_SYSTEM) to:

  • Maintain zero overhead when integration is disabled
  • Allow progressive adoption across projects
  • Preserve existing thread_system APIs while adding common_system compatibility

Test Plan

  • Verify compilation with USE_COMMON_SYSTEM=OFF (default behavior)
  • Test compilation with USE_COMMON_SYSTEM=ON
  • Validate adapter implementations match interface contracts
  • Test thread_pool functionality through executor adapter
  • Verify logger adapter correctly maps log levels
  • Confirm monitoring adapter exposes accurate metrics
  • Integration test with network_system using shared interfaces

- Add executor adapter to expose thread_pool via common IExecutor interface
- Add logger adapter for bi-directional interface compatibility
- Add monitoring adapter for IMonitorable interface support
- Enable USE_COMMON_SYSTEM CMake option for conditional compilation
- Update build configuration to include common_system when available
- Document network_system integration approach with thread pools
- Clarify no hard compile-time dependency pattern
@kcenon kcenon merged commit 3a91055 into main Sep 28, 2025
8 checks passed
@kcenon kcenon deleted the feature/common-system-adapters branch September 28, 2025 09:36
kcenon added a commit that referenced this pull request Apr 13, 2026
* feat: add common_system adapters for standardized interfaces

- Add executor adapter to expose thread_pool via common IExecutor interface
- Add logger adapter for bi-directional interface compatibility
- Add monitoring adapter for IMonitorable interface support
- Enable USE_COMMON_SYSTEM CMake option for conditional compilation
- Update build configuration to include common_system when available

* docs: add ecosystem integration note in architecture documentation

- Document network_system integration approach with thread pools
- Clarify no hard compile-time dependency pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant