Interface for exchanging serialized metadata and payload between ranks. More...
#include <core.hpp>
Classes | |
| class | Message |
| Message class for communication. More... | |
Public Member Functions | |
| virtual void | send (std::unique_ptr< Message > message)=0 |
| Send a single message to a remote rank. More... | |
| virtual void | send (std::vector< std::unique_ptr< Message >> &&messages)=0 |
| Send messages to remote ranks. More... | |
| virtual void | progress ()=0 |
| Progress the communication state machine. More... | |
| virtual std::vector< std::unique_ptr< Message > > | recv ()=0 |
| Receive messages from remote ranks. More... | |
| virtual bool | is_idle () const =0 |
| Check if the communication layer is currently idle. More... | |
Interface for exchanging serialized metadata and payload between ranks.
The MetadataPayloadExchange class defines an abstract interface for transmitting messages that contain both serialized metadata and a data payload. This abstraction simplifies scenarios where metadata and payload must be exchanged together as a single logical unit.
Concrete implementations, such as TagMetadataPayloadExchange, use the Communicator to implement this interface. In the future, other implementations may leverage specialized features beyond the basic Communicator API to further optimize this communication pattern.
|
pure virtual |
Check if the communication layer is currently idle.
Indicates whether there are any active or pending communication operations. A return value of true means the exchange is idling, i.e. no operations are currently in progress. However, new send/receive requests may still be submitted in the future; this does not imply that all communication has been fully finalized or globally synchronized.
true if the communication layer is idle; false if activity is ongoing. Implemented in rapidsmpf::communicator::TagMetadataPayloadExchange.
|
pure virtual |
Progress the communication state machine.
Advances the internal state of the communication layer by processing pending operations such as receiving metadata, setting up data transfers, completing data transfers, and cleaning up completed operations. Completed messages are stored internally and can be retrieved via recv().
This method should be called periodically to make progress on communication.
Implemented in rapidsmpf::communicator::TagMetadataPayloadExchange.
|
pure virtual |
Receive messages from remote ranks.
The messages received by the calling process are guaranteed to be received in the same order as they were sent by the source remote rank. No ordering is guaranteed between messages received from different remote ranks.
Implemented in rapidsmpf::communicator::TagMetadataPayloadExchange.
|
pure virtual |
Send a single message to a remote rank.
Takes ownership of a ready message and manages its transmission, including metadata sending and coordination of data transfer.
The messages sent from the calling process to a destination remote rank are guaranteed to be received in the same order as they were sent. No ordering is guaranteed between messages sent to different remote ranks.
| message | Message ready to be sent to a remote rank. |
Implemented in rapidsmpf::communicator::TagMetadataPayloadExchange.
|
pure virtual |
Send messages to remote ranks.
Takes ownership of ready messages and manages their transmission, including metadata sending and coordination of data transfer.
The messages sent from the calling process to a destination remote rank are guaranteed to be received in the same order as they were sent. No ordering is guaranteed between messages sent to different remote ranks.
| messages | Vector of messages ready to be sent to remote ranks. |
Implemented in rapidsmpf::communicator::TagMetadataPayloadExchange.