A robot may publish several related values that consumers should observe together. A motion planner might update a trajectory header, a set of waypoints, and an execution mode. A fleet coordinator might change a robot assignment and the matching reservation record. DDS PRESENTATION QoS and coherent changes can preserve a publication grouping so a subscriber does not observe the middle of that group. That is a valuable communication property, but it is not an ACID transaction and it does not commit physical robot work.
The DDS presentation contract
PRESENTATION QoS controls dependencies among changes to data instances and the extent at which the service preserves them. Its coherent_access setting indicates whether coherent groupings are supported. A publisher brackets writes with begin_coherent_changes and end_coherent_changes. On the subscriber side, begin_access and end_access delimit access to coherent data when the configured scope supports it.
The access_scope determines how far the grouping can reach. INSTANCE scope applies within a single keyed instance. TOPIC scope can span instances handled through the same DataWriter or DataReader for a topic. GROUP scope, which the DDS 1.4 specification marks optional, can span writers in the same Publisher and readers in the same Subscriber. The offered and requested QoS must be compatible. If the reader asks for coherent access, both sides must offer it at a compatible scope.
Coherent access preserves a communication unit: consumers should see either the changes before the group or the completed group rather than a partial intermediate presentation. The ordered_access setting is separate. It controls whether received changes are presented in the order in which they occurred at the publishing end. Coherence and ordering solve related but different observation problems.
Why this is not a database transaction
A database transaction commonly promises atomic commit, isolation, durability, and a defined rollback behavior. DDS coherent changes do not automatically provide those application guarantees. The middleware does not lock a robot controller's internal state, roll back a motor command, reverse a reservation in another service, or coordinate a commit with a SQL database. It preserves a grouping of DDS data changes within the configured presentation scope.
Suppose a planner publishes three samples in a coherent group: plan revision 42, a trajectory payload, and mode AUTO. A subscriber can receive them as a coherent unit. That does not prove that a separate database stored revision 42, that an actuator accepted the trajectory, or that the robot moved. If the application crashes after writing to the database but before ending the coherent group, or after ending the group but before commanding hardware, the DDS boundary cannot reconcile those side effects.
Durability is another independent concern. DDS DURABILITY QoS governs whether historical samples can be available beyond the immediate writer-reader relationship, subject to resource limits and other policies. Coherent presentation does not by itself make a group persistent across process failure. Likewise, RELIABILITY concerns delivery of samples of interest; it does not turn the entire application workflow into a transaction.
Model an explicit operation
When a coherent group represents one logical robot update, include an application operation identifier and revision in every member. A consumer should verify that all required members belong to the same operation and schema version. Define which members are mandatory, which are optional, and what timeout applies if a group never becomes usable.
For work with side effects, use an application state machine. A practical sequence might be proposed, validated, accepted, executing, completed, or failed. Persist the operation ID and accepted transition before issuing a non-repeatable action. Make handlers idempotent so a retry cannot repeat physical work merely because a communication acknowledgment was lost. The DDS coherent group can carry a consistent snapshot of that state, while the durable operation record establishes the application's commit decision.
If multiple services must agree, choose a coordination pattern intentionally. A single authority can own the transition and publish its result. A saga can define compensating actions for partially completed steps. A transactional outbox can atomically store a database change and an event for later DDS publication, if the implementation provides that integration. None of these patterns is created by setting coherent_access to true.
Respect scope and entity boundaries
Architecture diagrams should name the Publisher, DataWriters, Subscriber, and DataReaders involved. A GROUP coherent set cannot be assumed if an implementation does not support the optional scope or if writers live under different Publisher entities. TOPIC scope cannot be stretched across unrelated topics simply because the samples share an operation ID. If the desired atomic view exceeds the supported presentation scope, publish a composite sample that contains the whole logical snapshot or redesign the data model.
Subscribers also need disciplined access. Reading from one DataReader outside the intended begin_access and end_access boundary can reintroduce partial application views. A callback per reader may process one member before the application has collected the rest. Centralize the coherent access section, copy or loan the required samples correctly, validate them, and then release the access boundary.
Test failure windows
Test more than the happy path. Crash the publisher before end_coherent_changes and after it. Disconnect one reader during the group. Run with incompatible PRESENTATION QoS and verify the offered/requested incompatibility status. Put writers in different Publisher entities. Exercise INSTANCE, TOPIC, and supported GROUP scopes. Delay one consumer and confirm how history, durability, and resource limits affect what it can access.
Then test the application side effects independently. Fail after the durable operation record but before hardware dispatch, and after hardware action but before the completed status is published. Retry the same operation ID and confirm the handler does not duplicate work. These cases reveal the precise boundary between coherent DDS presentation and business commit.
Use coherent access for what it promises: presenting related DDS changes as a unit within a declared scope. Build transaction semantics, persistence, authorization, idempotency, and physical completion evidence in the application layer. Keeping those contracts separate makes robot behavior easier to reason about when networks, processes, and hardware fail at different moments.