diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 6baceb7b5..c9d303d5e 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -26,7 +26,6 @@ jobs: cmake \ libffi-dev \ libxml2-dev \ - libczmq-dev \ libcpputest-dev \ rapidjson-dev \ libavahi-compat-libdnssd-dev \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 435aac818..65fff36fb 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -75,7 +75,7 @@ jobs: uses: actions/checkout@v3.3.0 - name: Install dependencies run: | - brew install lcov zeromq czmq cpputest jansson rapidjson libzip ccache + brew install lcov cpputest jansson rapidjson libzip ccache - name: Prepare ccache timestamp id: ccache_cache_timestamp run: | diff --git a/conanfile.py b/conanfile.py index 66a7c8f7f..c63da2ced 100644 --- a/conanfile.py +++ b/conanfile.py @@ -53,16 +53,6 @@ class CelixConan(ConanFile): "build_log_helper": False, "build_log_service_api": False, "build_syslog_writer": False, - "build_pubsub": False, - "build_pubsub_wire_protocol_v1": False, - "build_pubsub_wire_protocol_v2": False, - "build_pubsub_json_serializer": False, - "build_pubsub_psa_zmq": False, - "build_pubsub_examples": False, - "build_pubsub_integration": False, - "build_pubsub_psa_tcp": False, - "build_pubsub_psa_ws": False, - "build_pubsub_discovery_etcd": False, "build_cxx_remote_service_admin": False, "build_cxx_rsa_integration": False, "build_remote_service_admin": False, @@ -144,8 +134,6 @@ def validate(self): def package_id(self): del self.info.options.build_all # the followings are not installed - del self.info.options.build_pubsub_integration - del self.info.options.build_pubsub_examples del self.info.options.build_cxx_rsa_integration del self.info.options.build_examples del self.info.options.enable_cmake_warning_tests @@ -194,54 +182,6 @@ def configure(self): options["build_shell"] = True options["build_shell_tui"] = True options["build_shell_api"] = True - options["build_pubsub"] = True - options["build_pubsub_wire_protocol_v2"] = True - options["build_pubsub_json_serializer"] = True - options["build_pubsub_psa_zmq"] = True - options["build_pubsub_discovery_etcd"] = True - - if options["build_pubsub_integration"]: - options["build_pubsub"] = True - options["build_shell_tui"] = True - options["build_pubsub_json_serializer"] = True - options["build_pubsub_wire_protocol_v2"] = True - options["build_pubsub_wire_protocol_v1"] = True - options["enable_testing"] = True - - if options["build_pubsub_examples"]: - options["build_log_service"] = True - options["build_shell_tui"] = True - options["build_pubsub_json_serializer"] = True - options["build_pubsub_discovery_etcd"] = True - options["build_pubsub_wire_protocol_v2"] = True - options["build_pubsub_wire_protocol_v1"] = True - - if options["build_pubsub_discovery_etcd"]: - options["build_pubsub"] = True - options["build_celix_etcdlib"] = True - - if options["build_pubsub_psa_ws"]: - options["build_http_admin"] = True - options["build_pubsub"] = True - - if options["build_pubsub_psa_zmq"] or options["build_pubsub_psa_tcp"]: - options["build_pubsub"] = True - - if options["build_pubsub_wire_protocol_v1"]: - options["build_pubsub"] = True - - if options["build_pubsub_wire_protocol_v2"]: - options["build_pubsub"] = True - - if options["build_pubsub_json_serializer"]: - options["build_pubsub"] = True - - if options["build_pubsub"]: - options["build_framework"] = True - options["build_celix_dfi"] = True - options["build_shell_api"] = True - options["build_log_helper"] = True - options["celix_install_deprecated_api"] = True if options["build_cxx_remote_service_admin"]: options["build_framework"] = True @@ -337,7 +277,7 @@ def configure(self): # https://github.com/conan-io/conan/issues/14528#issuecomment-1685344080 if self.options.build_utils: self.options['libzip'].shared = True - if self.options.build_framework or self.options.build_pubsub: + if self.options.build_framework: self.options['util-linux-libuuid'].shared = True if ((self.options.build_framework and self.options.framework_curlinit) or self.options.build_celix_etcdlib @@ -352,9 +292,6 @@ def configure(self): if (self.options.build_rsa_discovery_common or (self.options.build_rsa_remote_service_admin_dfi and self.options.enable_testing)): self.options['libxml2'].shared = True - if self.options.build_pubsub_psa_zmq: - self.options['zeromq'].shared = True - self.options['czmq'].shared = True if self.options.build_http_admin or self.options.build_rsa_discovery_common \ or self.options.build_rsa_remote_service_admin_dfi: self.options['civetweb'].shared = True @@ -367,7 +304,7 @@ def configure(self): def requirements(self): if self.options.build_utils: self.requires("libzip/[>=1.7.3 <2.0.0]") - if self.options.build_framework or self.options.build_pubsub: + if self.options.build_framework: self.requires("util-linux-libuuid/[>=2.39 <3.0.0]") if ((self.options.build_framework and self.options.framework_curlinit) or self.options.build_celix_etcdlib @@ -379,9 +316,6 @@ def requirements(self): self.requires("libxml2/[>=2.9.9 <3.0.0]") if self.options.build_cxx_remote_service_admin: self.requires("rapidjson/[>=1.1.0 <2.0.0]") - if self.options.build_pubsub_psa_zmq: - self.requires("zeromq/[>=4.3.4 <5.0.0]") - self.requires("czmq/4.2.0") if self.options.build_http_admin or self.options.build_rsa_discovery_common \ or self.options.build_rsa_remote_service_admin_dfi: self.requires("civetweb/1.16") diff --git a/documents/patterns.md b/documents/patterns.md index fbb4bbc0e..39d16027b 100644 --- a/documents/patterns.md +++ b/documents/patterns.md @@ -135,11 +135,6 @@ Some Apache Celix bundles use the SOD pattern. For example: - The `Celix::log_admin` bundle creates and registers `celix_log_service_t` services already preconfigured for a requested logger name.
![Celix Log Admin](diagrams/sod_pattern_log_service.png) - - The Celix PubSub bundles uses SOD to create and register `pubsub_publisher_t` services when these are requested - with a valid "topic.name" and "topic.scope" filter attribute. For PubSub, the Celix PubSub Topology Manager monitors - the `pubsub_publisher_t` requests and instructs the available Celix PubSub Admins to create - `pubsub_publisher_t`.
- ![Celix PubSub](diagrams/sod_pattern_publisher_service.png) - The Apache Celix / OSGi remote services uses SOD, by ad hoc imported services only when they are discovered and requested. diff --git a/examples/conan_test_package/CMakeLists.txt b/examples/conan_test_package/CMakeLists.txt index a98fd093c..0a7ef06b6 100644 --- a/examples/conan_test_package/CMakeLists.txt +++ b/examples/conan_test_package/CMakeLists.txt @@ -262,21 +262,6 @@ if (TEST_LOG_SERVICE_API) target_link_libraries(use_log_service_api PRIVATE Celix::log_service_api) endif () -option(TEST_PUBSUB_WIRE_PROTOCOL_V1 "Test pubsub wire protocol v1" OFF) -if (TEST_PUBSUB_WIRE_PROTOCOL_V1) - add_celix_container("use_pubsub_wire_protocol_v1" BUNDLES Celix::celix_pubsub_protocol_wire_v1 hello) -endif () - -option(TEST_PUBSUB_WIRE_PROTOCOL_V2 "Test pubsub wire protocol v2" OFF) -if (TEST_PUBSUB_WIRE_PROTOCOL_V2) - add_celix_container("use_pubsub_wire_protocol_v2" BUNDLES Celix::celix_pubsub_protocol_wire_v2 hello) -endif () - -option(TEST_PUBSUB_JSON_SERIALIZER "Test pubsub json serializer" OFF) -if (TEST_PUBSUB_JSON_SERIALIZER) - add_celix_container("use_pubsub_json_serializer" BUNDLES Celix::celix_pubsub_serializer_json hello) -endif () - option(TEST_CXX_REMOTE_SERVICE_ADMIN "Test C++ remote service admin" OFF) if (TEST_CXX_REMOTE_SERVICE_ADMIN) add_celix_container("use_cxx_remote_service_admin" BUNDLES Celix::RemoteServiceAdmin hello) diff --git a/examples/conan_test_package/conanfile.py b/examples/conan_test_package/conanfile.py index 8cdca8a57..c80070e3d 100644 --- a/examples/conan_test_package/conanfile.py +++ b/examples/conan_test_package/conanfile.py @@ -30,11 +30,6 @@ def build(self): cmake.definitions["TEST_HTTP_ADMIN"] = self.options["celix"].build_http_admin cmake.definitions["TEST_LOG_SERVICE"] = self.options["celix"].build_log_service cmake.definitions["TEST_SYSLOG_WRITER"] = self.options["celix"].build_syslog_writer - cmake.definitions["TEST_PUBSUB"] = self.options["celix"].build_pubsub - cmake.definitions["TEST_PSA_ZMQ"] = self.options["celix"].build_pubsub_psa_zmq - cmake.definitions["TEST_PSA_TCP"] = self.options["celix"].build_pubsub_psa_tcp - cmake.definitions["TEST_PSA_WS"] = self.options["celix"].build_pubsub_psa_ws - cmake.definitions["TEST_PSA_DISCOVERY_ETCD"] = self.options["celix"].build_pubsub_discovery_etcd cmake.definitions["TEST_RSA"] = self.options["celix"].build_remote_service_admin cmake.definitions["TEST_RSA_DFI"] = self.options["celix"].build_rsa_remote_service_admin_dfi cmake.definitions["TEST_RSA_SHM_V2"] = self.options["celix"].build_rsa_remote_service_admin_shm_v2 @@ -54,9 +49,6 @@ def build(self): cmake.definitions["TEST_PUSHSTREAMS"] = self.options["celix"].build_pushstreams cmake.definitions["TEST_LOG_HELPER"] = self.options["celix"].build_log_helper cmake.definitions["TEST_LOG_SERVICE_API"] = self.options["celix"].build_log_service_api - cmake.definitions["TEST_PUBSUB_WIRE_PROTOCOL_V1"] = self.options["celix"].build_pubsub_wire_protocol_v1 - cmake.definitions["TEST_PUBSUB_WIRE_PROTOCOL_V2"] = self.options["celix"].build_pubsub_wire_protocol_v2 - cmake.definitions["TEST_PUBSUB_JSON_SERIALIZER"] = self.options["celix"].build_pubsub_json_serializer cmake.definitions["TEST_CXX_REMOTE_SERVICE_ADMIN"] = self.options["celix"].build_cxx_remote_service_admin cmake.definitions["TEST_SHELL_API"] = self.options["celix"].build_shell_api cmake.definitions["TEST_CELIX_DFI"] = self.options["celix"].build_celix_dfi @@ -81,17 +73,6 @@ def test(self): self.run("./use_log_writer", cwd=os.path.join("deploy", "use_log_writer"), run_environment=True) if self.options["celix"].build_syslog_writer: self.run("./use_syslog_writer", cwd=os.path.join("deploy", "use_syslog_writer"), run_environment=True) - if self.options["celix"].build_pubsub: - self.run("./use_my_psa", cwd=os.path.join("deploy", "use_my_psa"), run_environment=True) - if self.options["celix"].build_pubsub_psa_zmq: - self.run("./use_psa_zmq", cwd=os.path.join("deploy", "use_psa_zmq"), run_environment=True) - if self.options["celix"].build_pubsub_psa_tcp: - self.run("./use_psa_tcp", cwd=os.path.join("deploy", "use_psa_tcp"), run_environment=True) - if self.options["celix"].build_pubsub_psa_ws: - self.run("./use_psa_ws", cwd=os.path.join("deploy", "use_psa_ws"), run_environment=True) - if self.options["celix"].build_pubsub_discovery_etcd and self.options["celix"].build_launcher: - self.run("./use_psa_discovery_etcd", - cwd=os.path.join("deploy", "use_psa_discovery_etcd"), run_environment=True) if self.options["celix"].build_remote_service_admin: self.run("./use_my_rsa", cwd=os.path.join("deploy", "use_my_rsa"), run_environment=True) self.run("./use_c_rsa_spi", run_environment=True) @@ -130,15 +111,6 @@ def test(self): self.run("./use_log_helper", run_environment=True) if self.options["celix"].build_log_service_api: self.run("./use_log_service_api", run_environment=True) - if self.options["celix"].build_pubsub_wire_protocol_v1: - self.run("./use_pubsub_wire_protocol_v1", - cwd=os.path.join("deploy", "use_pubsub_wire_protocol_v1"), run_environment=True) - if self.options["celix"].build_pubsub_wire_protocol_v2: - self.run("./use_pubsub_wire_protocol_v2", - cwd=os.path.join("deploy", "use_pubsub_wire_protocol_v2"), run_environment=True) - if self.options["celix"].build_pubsub_json_serializer: - self.run("./use_pubsub_json_serializer", - cwd=os.path.join("deploy", "use_pubsub_json_serializer"), run_environment=True) if self.options["celix"].build_cxx_remote_service_admin: self.run("./use_cxx_remote_service_admin", cwd=os.path.join("deploy", "use_cxx_remote_service_admin"), run_environment=True) diff --git a/examples/conan_test_package_v2/conanfile.py b/examples/conan_test_package_v2/conanfile.py index e7e8a948a..3eaabd65b 100644 --- a/examples/conan_test_package_v2/conanfile.py +++ b/examples/conan_test_package_v2/conanfile.py @@ -40,11 +40,6 @@ def generate(self): tc.cache_variables["TEST_HTTP_ADMIN"] = celix_options.build_http_admin tc.cache_variables["TEST_LOG_SERVICE"] = celix_options.build_log_service tc.cache_variables["TEST_SYSLOG_WRITER"] = celix_options.build_syslog_writer - tc.cache_variables["TEST_PUBSUB"] = celix_options.build_pubsub - tc.cache_variables["TEST_PSA_ZMQ"] = celix_options.build_pubsub_psa_zmq - tc.cache_variables["TEST_PSA_TCP"] = celix_options.build_pubsub_psa_tcp - tc.cache_variables["TEST_PSA_WS"] = celix_options.build_pubsub_psa_ws - tc.cache_variables["TEST_PSA_DISCOVERY_ETCD"] = celix_options.build_pubsub_discovery_etcd tc.cache_variables["TEST_RSA"] = celix_options.build_remote_service_admin tc.cache_variables["TEST_RSA_DFI"] = celix_options.build_rsa_remote_service_admin_dfi tc.cache_variables["TEST_RSA_SHM_V2"] = celix_options.build_rsa_remote_service_admin_shm_v2 @@ -64,9 +59,6 @@ def generate(self): tc.cache_variables["TEST_PUSHSTREAMS"] = celix_options.build_pushstreams tc.cache_variables["TEST_LOG_HELPER"] = celix_options.build_log_helper tc.cache_variables["TEST_LOG_SERVICE_API"] = celix_options.build_log_service_api - tc.cache_variables["TEST_PUBSUB_WIRE_PROTOCOL_V1"] = celix_options.build_pubsub_wire_protocol_v1 - tc.cache_variables["TEST_PUBSUB_WIRE_PROTOCOL_V2"] = celix_options.build_pubsub_wire_protocol_v2 - tc.cache_variables["TEST_PUBSUB_JSON_SERIALIZER"] = celix_options.build_pubsub_json_serializer tc.cache_variables["TEST_CXX_REMOTE_SERVICE_ADMIN"] = celix_options.build_cxx_remote_service_admin tc.cache_variables["TEST_SHELL_API"] = celix_options.build_shell_api tc.cache_variables["TEST_CELIX_DFI"] = celix_options.build_celix_dfi @@ -97,17 +89,6 @@ def test(self): self.run("./use_log_writer", cwd=os.path.join("deploy", "use_log_writer"), env="conanrun") if celix_options.build_syslog_writer: self.run("./use_syslog_writer", cwd=os.path.join("deploy", "use_syslog_writer"), env="conanrun") - if celix_options.build_pubsub: - self.run("./use_my_psa", cwd=os.path.join("deploy", "use_my_psa"), env="conanrun") - if celix_options.build_pubsub_psa_zmq: - self.run("./use_psa_zmq", cwd=os.path.join("deploy", "use_psa_zmq"), env="conanrun") - if celix_options.build_pubsub_psa_tcp: - self.run("./use_psa_tcp", cwd=os.path.join("deploy", "use_psa_tcp"), env="conanrun") - if celix_options.build_pubsub_psa_ws: - self.run("./use_psa_ws", cwd=os.path.join("deploy", "use_psa_ws"), env="conanrun") - if celix_options.build_pubsub_discovery_etcd and celix_options.build_launcher: - self.run("./use_psa_discovery_etcd", - cwd=os.path.join("deploy", "use_psa_discovery_etcd"), env="conanrun") if celix_options.build_remote_service_admin: self.run("./use_my_rsa", cwd=os.path.join("deploy", "use_my_rsa"), env="conanrun") self.run("./conan_test_package/use_c_rsa_spi", env="conanrun") @@ -146,15 +127,6 @@ def test(self): self.run("./conan_test_package/use_log_helper", env="conanrun") if celix_options.build_log_service_api: self.run("./conan_test_package/use_log_service_api", env="conanrun") - if celix_options.build_pubsub_wire_protocol_v1: - self.run("./use_pubsub_wire_protocol_v1", - cwd=os.path.join("deploy", "use_pubsub_wire_protocol_v1"), env="conanrun") - if celix_options.build_pubsub_wire_protocol_v2: - self.run("./use_pubsub_wire_protocol_v2", - cwd=os.path.join("deploy", "use_pubsub_wire_protocol_v2"), env="conanrun") - if celix_options.build_pubsub_json_serializer: - self.run("./use_pubsub_json_serializer", - cwd=os.path.join("deploy", "use_pubsub_json_serializer"), env="conanrun") if celix_options.build_cxx_remote_service_admin: self.run("./use_cxx_remote_service_admin", cwd=os.path.join("deploy", "use_cxx_remote_service_admin"), env="conanrun")