Skip to content

Commit 682f80e

Browse files
authored
refactor: remove 60+ deprecated network interfaces, adapters, and metrics (#879)
* refactor: remove 60+ deprecated network interfaces, adapters, and metrics Remove deprecated items across 7 categories: - Un-deprecate 28 callback observer methods (set_receive/connected/ disconnected/error_callback) across client interfaces and tcp_socket - Clean 12 legacy messaging class deprecation warnings and directives - Un-deprecate no_tls policy (still used as template default) - Delete 6 protocol-specific public interface headers (i_quic/udp/ websocket_client/server.h); remove NETWORK_INCLUDE_DEPRECATED_INTERFACES - Un-deprecate 5 adapter classes (common_thread_pool/logger/monitoring, thread_system_pool_adapter, bind_thread_system_pool_into_manager) - Remove performance_metrics struct and get_performance_metrics() from messaging_bridge; replace with private impl::internal_metrics - Remove BUILD_WITH_MONITORING_SYSTEM CMake option and related integration setup; clean all deprecation suppression macros * fix(cmake): remove leftover monitoring_system references The previous commit removed the find_monitoring_system() and setup_monitoring_system_integration() function definitions but left behind their call sites, causing CMake configuration to fail with "Unknown CMake command" on all platforms. * fix(libs): update library wrappers to use generic protocol interfaces The QUIC and WebSocket library wrapper headers still referenced the deleted protocol-specific public interface headers (i_quic_client.h, i_quic_server.h, i_websocket_client.h, i_websocket_server.h). Update them to use the generic i_protocol_client.h and i_protocol_server.h interfaces instead.
1 parent bd2393b commit 682f80e

54 files changed

Lines changed: 74 additions & 2001 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
-DBUILD_WITH_LOGGER_SYSTEM=OFF \
4242
-DBUILD_WITH_THREAD_SYSTEM=OFF \
4343
-DBUILD_WITH_CONTAINER_SYSTEM=OFF \
44-
-DBUILD_WITH_MONITORING_SYSTEM=OFF \
4544
-DBUILD_TESTS=OFF \
4645
-DBUILD_EXAMPLES=OFF \
4746
-DBUILD_SAMPLES=OFF

CMakeLists.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ option(BUILD_WITH_LOGGER_SYSTEM "Build with logger_system integration (OPTIONAL
8787
# Optional dependencies
8888
option(BUILD_WITH_CONTAINER_SYSTEM "Build with container_system integration" ON)
8989

90-
# DEPRECATED: Since issue #342, monitoring integration uses EventBus pattern
91-
# instead of compile-time dependency. This option is kept for backward
92-
# compatibility but has no effect. It will be removed in a future version.
93-
option(BUILD_WITH_MONITORING_SYSTEM "DEPRECATED - monitoring uses EventBus pattern (no compile-time dep)" OFF)
9490

9591
# Official gRPC library integration (issue #360)
9692
# When enabled, wraps the official grpc++ library for production use.
@@ -119,19 +115,6 @@ else()
119115
message(STATUS "logger_system integration is DISABLED (default - uses common_system's ILogger)")
120116
endif()
121117

122-
# Monitoring integration status message
123-
# Note: Since issue #342, monitoring uses EventBus pattern - no compile-time dependency
124-
if(BUILD_WITH_MONITORING_SYSTEM)
125-
message(STATUS "")
126-
message(STATUS "========================================")
127-
message(STATUS "BUILD_WITH_MONITORING_SYSTEM is DEPRECATED")
128-
message(STATUS "")
129-
message(STATUS "Since issue #342, network_system uses EventBus-based metric")
130-
message(STATUS "publishing. No compile-time monitoring_system dependency needed.")
131-
message(STATUS "External consumers subscribe to network_metric_event via EventBus.")
132-
message(STATUS "========================================")
133-
message(STATUS "")
134-
endif()
135118
message(STATUS "Monitoring: EventBus-based metric publishing (no compile-time dependency)")
136119

137120
# Respect global BUILD_INTEGRATION_TESTS flag if set

benchmarks/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ if(benchmark_FOUND OR BENCHMARK_FOUND)
6868
target_compile_definitions(network_benchmarks PRIVATE BUILD_MESSAGING_BRIDGE)
6969
endif()
7070

71-
# Suppress deprecation warnings for benchmark access to internal APIs
72-
target_compile_definitions(network_benchmarks PRIVATE NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS)
73-
7471
target_compile_features(network_benchmarks PRIVATE cxx_std_20)
7572

7673
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")

cmake/NetworkSystemDependencies.cmake

Lines changed: 0 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -562,108 +562,6 @@ function(find_common_system)
562562
endif()
563563
endfunction()
564564

565-
##################################################
566-
# Find monitoring_system
567-
##################################################
568-
function(find_monitoring_system)
569-
if(NOT BUILD_WITH_MONITORING_SYSTEM)
570-
return()
571-
endif()
572-
573-
message(STATUS "Looking for monitoring_system...")
574-
575-
foreach(_candidate monitoring_system MonitoringSystem)
576-
if(TARGET ${_candidate})
577-
message(STATUS "Found monitoring_system CMake target: ${_candidate}")
578-
set(MONITORING_SYSTEM_FOUND TRUE PARENT_SCOPE)
579-
set(MONITORING_SYSTEM_TARGET ${_candidate} PARENT_SCOPE)
580-
return()
581-
endif()
582-
endforeach()
583-
584-
# Check for existing CMake targets first
585-
if(TARGET monitoring_system)
586-
message(STATUS "Found monitoring_system as existing target")
587-
set(MONITORING_SYSTEM_FOUND TRUE PARENT_SCOPE)
588-
set(MONITORING_SYSTEM_TARGET monitoring_system PARENT_SCOPE)
589-
return()
590-
endif()
591-
592-
if(TARGET MonitoringSystem)
593-
message(STATUS "Found MonitoringSystem as existing target")
594-
set(MONITORING_SYSTEM_FOUND TRUE PARENT_SCOPE)
595-
set(MONITORING_SYSTEM_TARGET MonitoringSystem PARENT_SCOPE)
596-
return()
597-
endif()
598-
599-
# Prioritize environment variable, then standard paths
600-
set(_monitoring_search_paths)
601-
set(_monitoring_lib_paths)
602-
603-
# 1. Check environment variable
604-
if(DEFINED ENV{MONITORING_SYSTEM_ROOT})
605-
list(APPEND _monitoring_search_paths "$ENV{MONITORING_SYSTEM_ROOT}/include" "$ENV{MONITORING_SYSTEM_ROOT}/sources")
606-
list(APPEND _monitoring_lib_paths "$ENV{MONITORING_SYSTEM_ROOT}/build/lib")
607-
endif()
608-
609-
# 2. Check CMake variable
610-
if(DEFINED MONITORING_SYSTEM_ROOT)
611-
list(APPEND _monitoring_search_paths "${MONITORING_SYSTEM_ROOT}/include" "${MONITORING_SYSTEM_ROOT}/sources")
612-
list(APPEND _monitoring_lib_paths "${MONITORING_SYSTEM_ROOT}/build/lib")
613-
endif()
614-
615-
# 3. Standard search paths
616-
list(APPEND _monitoring_search_paths
617-
"${CMAKE_CURRENT_SOURCE_DIR}/../monitoring_system/include"
618-
"${CMAKE_CURRENT_SOURCE_DIR}/../monitoring_system/sources"
619-
"${CMAKE_SOURCE_DIR}/monitoring_system/include"
620-
"${CMAKE_SOURCE_DIR}/monitoring_system/sources"
621-
"${CMAKE_SOURCE_DIR}/../monitoring_system/include"
622-
"${CMAKE_SOURCE_DIR}/../monitoring_system/sources"
623-
"../monitoring_system/include"
624-
"../monitoring_system/sources"
625-
)
626-
627-
list(APPEND _monitoring_lib_paths
628-
"${CMAKE_CURRENT_SOURCE_DIR}/../monitoring_system/build/lib"
629-
"${CMAKE_SOURCE_DIR}/monitoring_system/build/lib"
630-
"${CMAKE_SOURCE_DIR}/../monitoring_system/build/lib"
631-
"../monitoring_system/build/lib"
632-
)
633-
634-
# Look for monitoring headers
635-
find_path(MONITORING_SYSTEM_INCLUDE_DIR
636-
NAMES kcenon/monitoring/core/performance_monitor.h monitoring/core/performance_monitor.h
637-
PATHS ${_monitoring_search_paths}
638-
NO_DEFAULT_PATH
639-
)
640-
641-
if(MONITORING_SYSTEM_INCLUDE_DIR)
642-
message(STATUS "Found monitoring_system at: ${MONITORING_SYSTEM_INCLUDE_DIR}")
643-
644-
find_library(MONITORING_SYSTEM_LIBRARY
645-
NAMES monitoring_system MonitoringSystem
646-
PATHS ${_monitoring_lib_paths}
647-
PATH_SUFFIXES Debug Release
648-
NO_DEFAULT_PATH
649-
)
650-
651-
if(MONITORING_SYSTEM_LIBRARY)
652-
message(STATUS "Found monitoring_system library: ${MONITORING_SYSTEM_LIBRARY}")
653-
else()
654-
message(WARNING "monitoring_system headers found but library not found")
655-
endif()
656-
657-
set(MONITORING_SYSTEM_FOUND TRUE PARENT_SCOPE)
658-
set(MONITORING_SYSTEM_INCLUDE_DIR ${MONITORING_SYSTEM_INCLUDE_DIR} PARENT_SCOPE)
659-
set(MONITORING_SYSTEM_LIBRARY ${MONITORING_SYSTEM_LIBRARY} PARENT_SCOPE)
660-
else()
661-
message(WARNING "monitoring_system not found, integration disabled")
662-
set(BUILD_WITH_MONITORING_SYSTEM OFF PARENT_SCOPE)
663-
set(MONITORING_SYSTEM_FOUND FALSE PARENT_SCOPE)
664-
endif()
665-
endfunction()
666-
667565
##################################################
668566
# Find gRPC library (optional - for NETWORK_ENABLE_GRPC_OFFICIAL)
669567
#
@@ -792,7 +690,6 @@ function(find_network_system_dependencies)
792690
find_container_system()
793691
find_thread_system()
794692
find_logger_system()
795-
find_monitoring_system()
796693
find_common_system()
797694
find_grpc_library()
798695

@@ -818,11 +715,6 @@ function(find_network_system_dependencies)
818715
set(LOGGER_SYSTEM_INCLUDE_DIR ${LOGGER_SYSTEM_INCLUDE_DIR} PARENT_SCOPE)
819716
set(LOGGER_SYSTEM_LIBRARY ${LOGGER_SYSTEM_LIBRARY} PARENT_SCOPE)
820717

821-
set(MONITORING_SYSTEM_FOUND ${MONITORING_SYSTEM_FOUND} PARENT_SCOPE)
822-
set(MONITORING_SYSTEM_INCLUDE_DIR ${MONITORING_SYSTEM_INCLUDE_DIR} PARENT_SCOPE)
823-
set(MONITORING_SYSTEM_LIBRARY ${MONITORING_SYSTEM_LIBRARY} PARENT_SCOPE)
824-
set(MONITORING_SYSTEM_TARGET ${MONITORING_SYSTEM_TARGET} PARENT_SCOPE)
825-
826718
set(COMMON_SYSTEM_FOUND ${COMMON_SYSTEM_FOUND} PARENT_SCOPE)
827719
set(COMMON_SYSTEM_INCLUDE_DIR ${COMMON_SYSTEM_INCLUDE_DIR} PARENT_SCOPE)
828720

@@ -840,7 +732,6 @@ function(find_network_system_dependencies)
840732
set(BUILD_WITH_CONTAINER_SYSTEM ${BUILD_WITH_CONTAINER_SYSTEM} PARENT_SCOPE)
841733
set(BUILD_WITH_THREAD_SYSTEM ${BUILD_WITH_THREAD_SYSTEM} PARENT_SCOPE)
842734
set(BUILD_WITH_LOGGER_SYSTEM ${BUILD_WITH_LOGGER_SYSTEM} PARENT_SCOPE)
843-
set(BUILD_WITH_MONITORING_SYSTEM ${BUILD_WITH_MONITORING_SYSTEM} PARENT_SCOPE)
844735
set(BUILD_WITH_COMMON_SYSTEM ${BUILD_WITH_COMMON_SYSTEM} PARENT_SCOPE)
845736
set(NETWORK_ENABLE_GRPC_OFFICIAL ${NETWORK_ENABLE_GRPC_OFFICIAL} PARENT_SCOPE)
846737

cmake/NetworkSystemIntegration.cmake

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,6 @@ function(setup_logger_system_integration target)
166166
endif()
167167
endfunction()
168168

169-
##################################################
170-
# Configure monitoring_system integration
171-
# DEPRECATED: Since issue #342, monitoring uses EventBus pattern
172-
# This function is kept for backward compatibility but has no effect.
173-
##################################################
174-
function(setup_monitoring_system_integration target)
175-
# DEPRECATED: No compile-time monitoring_system dependency needed
176-
# Metrics are published via common_system's EventBus
177-
# External consumers subscribe to network_metric_event
178-
if(BUILD_WITH_MONITORING_SYSTEM)
179-
message(STATUS "NOTE: BUILD_WITH_MONITORING_SYSTEM is deprecated")
180-
message(STATUS " Monitoring uses EventBus pattern - no compile-time dependency")
181-
endif()
182-
endfunction()
183-
184169
##################################################
185170
# Configure common_system integration
186171
##################################################
@@ -224,7 +209,6 @@ function(setup_network_system_integrations target)
224209
setup_container_system_integration(${target})
225210
setup_thread_system_integration(${target})
226211
setup_logger_system_integration(${target})
227-
setup_monitoring_system_integration(${target})
228212
setup_common_system_integration(${target})
229213

230214
# Platform-specific libraries

docs/INTEGRATION.md

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,9 @@ The logger integration provides two implementations:
185185
186186
## Monitoring System Integration
187187
188-
Provides metrics collection and observability capabilities.
188+
Provides metrics collection and observability capabilities via EventBus-based metric publishing.
189189
190-
**Important**: This integration is **OPTIONAL** (OFF by default) to prevent circular dependencies with monitoring_system.
191-
192-
### Configuration
193-
```cmake
194-
cmake .. -DBUILD_WITH_MONITORING_SYSTEM=ON
195-
```
196-
197-
### Why Optional?
198-
199-
monitoring_system (Tier 3) can optionally depend on network_system (Tier 4) for HTTP metrics export. Making monitoring_system a required dependency would create a circular dependency. Both integrations are optional and use adapter patterns to avoid compile-time cycles.
190+
No compile-time monitoring_system dependency is needed. External consumers subscribe to `network_metric_event` via EventBus.
200191
201192
### Features
202193
- **Counter metrics**: Track connection counts, bytes transferred
@@ -229,25 +220,6 @@ monitor.report_health("connection_1",
229220
0.0); // packet_loss_rate
230221
```
231222

232-
### Implementation Details
233-
234-
Two implementations are provided:
235-
236-
1. **basic_monitoring**: Standalone mode (default)
237-
- Used when BUILD_WITH_MONITORING_SYSTEM is OFF
238-
- Logs metrics to console via logger_system
239-
- No external dependencies
240-
241-
2. **monitoring_system_adapter**: Integration mode
242-
- Used when BUILD_WITH_MONITORING_SYSTEM is ON
243-
- Full monitoring_system integration
244-
- Uses performance_monitor and health_monitor
245-
246-
### Requirements
247-
- When BUILD_WITH_MONITORING_SYSTEM=ON:
248-
- monitoring_system must be built first (Tier 3)
249-
- Headers at `../monitoring_system/include`
250-
251223
For detailed documentation, see [integration/with-monitoring.md](integration/with-monitoring.md).
252224

253225
## Build Configuration
@@ -258,8 +230,7 @@ cmake .. -G Ninja \
258230
-DCMAKE_BUILD_TYPE=Release \
259231
-DBUILD_WITH_THREAD_SYSTEM=ON \
260232
-DBUILD_WITH_CONTAINER_SYSTEM=ON \
261-
-DBUILD_WITH_LOGGER_SYSTEM=ON \
262-
-DBUILD_WITH_MONITORING_SYSTEM=ON # Optional
233+
-DBUILD_WITH_LOGGER_SYSTEM=ON
263234
```
264235

265236
### Minimal Build (No External Dependencies)
@@ -310,7 +281,6 @@ The system provides macros to check which integrations are available:
310281
- `BUILD_WITH_THREAD_SYSTEM` — enable thread pool integration via `thread_integration_manager`.
311282
- `BUILD_WITH_CONTAINER_SYSTEM` — enable container adapters via `container_manager`.
312283
- `BUILD_WITH_LOGGER_SYSTEM` — use `logger_system_adapter`; otherwise falls back to `basic_logger`.
313-
- `BUILD_WITH_MONITORING_SYSTEM` — use `monitoring_system_adapter`; otherwise falls back to `basic_monitoring` (OFF by default).
314284

315285
## Versioning & Dependencies
316286

docs/integration/with-monitoring.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,9 @@ No special build flags required for metric publishing. Metrics are always publis
289289
```bash
290290
cmake .. -G Ninja \
291291
-DCMAKE_BUILD_TYPE=Release
292-
# That's it! No BUILD_WITH_MONITORING_SYSTEM needed
292+
# No special CMake flags needed for monitoring integration
293293
```
294294

295-
**Note**: `BUILD_WITH_MONITORING_SYSTEM` is deprecated and has no effect.
296-
297295
## Requirements
298296

299297
- common_system (provides EventBus)

docs/refactoring/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ Explicitly include internal headers if absolutely necessary:
128128
### Q: What if I need direct access to implementations?
129129
**A**: Most use cases are covered by facade API. If not, please open an issue describing your use case.
130130

131-
### Q: How do I suppress deprecation warnings?
132-
**A**: Define `NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS` (but you should migrate instead).
133-
134131
## Contributing
135132

136133
If you're contributing to this refactoring:

include/kcenon/network/detail/session/messaging_session.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ namespace kcenon::network::session
163163
/*!
164164
* \brief Checks if the session has been stopped.
165165
* \return true if the session is stopped, false otherwise.
166-
*
167-
* \deprecated Use is_connected() instead (returns opposite value).
168166
*/
169167
[[nodiscard]] auto is_stopped() const noexcept -> bool {
170168
return is_stopped_.load(std::memory_order_relaxed);
@@ -182,7 +180,6 @@ namespace kcenon::network::session
182180
* - Data is moved (not copied) to avoid memory allocation overhead.
183181
* - After calling this function, the original vector will be empty.
184182
*
185-
* \deprecated Use send() instead for Result-based error handling.
186183
*/
187184
auto send_packet(std::vector<uint8_t>&& data) -> void;
188185

include/kcenon/network/experimental/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ This change is part of EPIC #577 to:
5151
## See Also
5252
5353
- `kcenon/network/facade/quic_facade.h` - Recommended facade API
54-
- `kcenon/network/interfaces/i_quic_client.h` - Public interface
55-
- `kcenon/network/interfaces/i_quic_server.h` - Public interface
54+
- `kcenon/network/interfaces/i_client.h` - Client interface
55+
- `kcenon/network/interfaces/i_server.h` - Server interface

0 commit comments

Comments
 (0)