Skip to content

Add a Cyclone DDS transport - #46

Open
mikelangmayr wants to merge 2 commits into
mainfrom
cyclonedds-transport
Open

mikelangmayr wants to merge 2 commits into
mainfrom
cyclonedds-transport

Conversation

@mikelangmayr

Copy link
Copy Markdown
Collaborator
  • Add CycloneDdsTransport: brokerless, peers found by DDS discovery, no address book
  • Carry the bamboo envelope as a typed DDS sample (pack_frames = False); direct messages are routed by the destination's DDS partition
  • Select it with transport: cyclonedds in daemon, client and CLI config, Libby.cyclonedds(), Client.cyclonedds(), or --transport cyclonedds with --dds-domain / --dds-config
  • New optional extra libby[cyclonedds], also installed in the tox test and docs envs
  • Unit tests for the transport and Cyclone DDS cases in the per-transport integration tests
  • Document the transport in the README, installation, daemon, CLI, client and API pages

self._rx_thread.start()
self._settle_discovery()

def stop(self) -> None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this only stop the receive thread? Is the participant and both readers stay alive?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it did. stop() now deletes the participant, which removes its readers and writers.

def stop(self) -> None:
"""Stop receiving and drop later sends."""
self._stop.set()
self._wake.set(True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does _wake need to be set again in start()? in the case of calling stop() then start() after

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stop() is now final; start() after it raises, so _wake is never reused.

def _rx_loop(self) -> None:
while not self._stop.is_set():
self._waitset.wait(duration(seconds=RX_WAKE_S))
for reader in (self._direct_reader, self._broadcast_reader):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One exception in the callback kills the receiving thread, might be good to have a similar try/except like you've done in rabbitmq for handling this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Callback errors are now caught and logged; receiving continues.

This branch has not been deployed

No deployments
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.

2 participants