How eclipse-cyclonedds/cyclonedds works
Project type and purpose
• Project type: an open-source, standards-compliant implementation of the OMG DDS (Data Distribution Service) publish-subscribe middleware, delivered as a C library with optional C++ and Python language bindings, an IDL compiler, performance tools, fuzz/test suites, and plugin-based extensibility (security, shared-memory, etc.).
• Purpose: provide zero-configuration discovery, efficient serialization, reliable/unreliable pub/sub messaging over RTPS, pluggable security modules, shared-memory fast paths, and tooling for IDL processing, performance measurement, and diagnostics.
File structure (highlights)
• src/ddsrt – the low-level runtime library for portability (threads, sockets, atomics, memory, logging)
• src/core/ddsc – the core DDS API, entity management (DomainParticipants, Publishers, Subscribers, Topics, DataWriters/DataReaders)
• src/core/ddsi – the RTPS network protocol implementation (discovery, message framing, reliability, transport)
• src/core/cdr – serialization (XCDR1/2) support
• src/idl – IDL compiler (parser + code generator) and type metadata
• src/security – core security FSM and builtin plugins (access control, authentication, cryptography), OpenSSL hooks
• src/psmx_iox – PSMX plugins for zero-copy shared-memory (Iceoryx)
• src/tools – CLI tools: idlpp, idlc, ddsperf, sanity scripts
• examples, fuzz, tests – usage examples, fuzz targets, unit & integration tests
• etc/cyclonedds.xsd, docs/manual/config – runtime configuration schema & docs
• CMakeLists, azure-pipelines, GitHub workflows – build/test automation
README insights
• Core components listed under “DCPS”, “DDS Security”, “DDSI-RTPS”, etc.
• References to three layers: API (C/C++/Python), core, network
• Configuration via XML (CYCLONEDDS_URI)
• Plugin architecture for security and PSMX
1. Application layer (your DDS application code – DomainParticipant, Topics, DW/DR)
2. Language bindings: C API (ddsc), C++ wrapper, Python wrapper
3. Core middleware:
– ddsrt (runtime services)
– cdr (serialization)
– idl compiler (build-time)
– idl metadata / XTypes (type system)
4. RTPS network layer (ddsi): discovery, message exchange over UDP/TCP
5. Plugin framework:
– Security core + builtin_plugins + OpenSSL plugin
– PSMX core + Iceoryx plugin
6. Tools & examples (idlpp, idlc, ddsperf)
7. Build/test infrastructure (CMake, CI pipelines, fuzz targets)
8. Configuration subsystem (XML schema, environment variable)
– Application → C API → core ddsc → serialization (cdr)
– core ddsc ↔ ddsi (invoke discovery, send/receive RTPS messages)
– ddsi → OS network stack (UDP/TCP sockets)
– core ddsc → ddsrt (threading, memory, logging)
– Plugin loader (at startup): security & PSMX plugins register via core hooks
– Tools & IDL compiler run at build time → generate code → linked into application
– Configuration: loaded by core on startup → influences discovery, QoS, transports
c. Architectural patterns & principles:
– Layered architecture (API → core → network → OS)
– Plugin/extension points (security, PSMX)
– Separation of concerns (serialization vs. networking vs. entity management)
– Build-time code generation (IDL → type support)
– Test harnesses & fuzzing decoupled via CMake targets
d. Key technologies & frameworks:
– CMake for build & packaging
– C/C++ (ISO C99 + modern C++)
– OpenSSL for security plugin
– Iceoryx (optional) for shared memory plugin
– Bison/Flex (cached) for IDL parser
– CTest, UCUnit, custom fuzz scripts for testing
Essential elements to capture
– Layer separation (API | Core | Network | OS)
– Plugin architecture (security, PSMX)
– Build vs. run-time components
– Configuration input path to the core
– Tools & test harness side-car