Class buffer_transport

Inheritance Relationships

Derived Types

Class Documentation

class comm::buffer_transport

Base class used to send a chunk of bytes throught a transport protocol e.g. TCP, UCP, etc.

Subclassed by comm::tcp_buffer_transport, comm::ucx_buffer_transport

Public Functions

buffer_transport(ral::cache::MetadataDictionary metadata, std::vector<size_t> buffer_sizes, std::vector<blazingdb::transport::ColumnTransport> column_transports, std::vector<ral::memory::blazing_chunked_column_info> chunked_column_infos, std::vector<node> destinations, bool require_acknowledge)

Constructs a buffer_transport.

  • metadata: This is information about how the message was routed and payloads that are used in execution, planning, or physical optimizations. E.G. num rows in table, num partitions to be processed

  • buffer_sizes: A vector containing the sizes of the buffer

  • column_transports: A vector of ColumnTransport representing column metadata

  • chunked_column_infos: A vector of blazing_chunked_column_info representing how the raw buffers are chunked

  • destinations: A vector of destination nodes

  • require_acknowledge: A boolean stating if acknowledgement of a message is required

virtual ~buffer_transport()
virtual void send_begin_transmission() = 0
void send(const char *buffer, size_t buffer_size)

Sends a chunk of bytes throught a transport protocol.

  • buffer: Pointer to the byte buffer that will be send

  • buffer_size: The buffer size

void wait_until_complete()

Waits until all the data is sents.

void wait_for_begin_transmission()
virtual void increment_frame_transmission()
virtual void increment_begin_transmission()

Protected Functions

virtual void send_impl(const char *buffer, size_t buffer_size) = 0
virtual void receive_acknowledge() = 0

Protected Attributes

std::vector<blazingdb::transport::ColumnTransport> column_transports
std::vector<ral::memory::blazing_chunked_column_info> chunked_column_infos
ral::cache::MetadataDictionary metadata
std::vector<size_t> buffer_sizes
size_t buffer_sent = 0
std::atomic<size_t> transmitted_begin_frames

The number of begin_transmission messages sent

std::atomic<size_t> transmitted_frames

The number of frames transmitted

std::mutex mutex
std::condition_variable completion_condition_variable
std::vector<node> destinations
std::map<std::string, bool> transmitted_acknowledgements
bool require_acknowledge = false