bufferRecv¶
-
class bufferRecv : public kotekan::Stage¶
Receives frames and metadata from other networked kotekan buffers, and puts them into a local kotekan buffer.
This stage takes frames from one more more sources and places them into the
buffor use by other local consumer stages. There is no guarantee regarding the order the frames will arrive in. However all frames will be valid, which is to say they will contain the full set of data sent by the client, or they will not be added to the output buffer.This system works with libevent to do event driven async I/O with worker threads to support higher bandwidth than one thread alone could support. In libevent terms there is one base thread, and
num_threadsworker threads which handle the libevent callbacks.- Todo:
Possibly factor out the threadpool.
Allow for a different log level for workers from the main thread.
- buffers
bufThe buffer which accepts new frames (producer)Format: any
Metadata:
any
- Metrics
kotekan_buffer_recv_transfer_time_secondsThe amount of time it took in seconds to transfer the last frame from the host given by thesourcelabelkotekan_buffer_recv_dropped_frame_totalThe number of times a frame was dropped because thebufwas full at the time a block of was aviable to transfer to it.
- Author
Andre Renard
- Param listen_port:
Int, default 11024. The port to listen for new connections
- Param num_threads:
Int, default 1. The number of worker threads to use
- Param connection_timeout:
Int, default 60. Number of seconds before timeout on transfer
- Param drop_frames:
Bool, default true. Whether to drop frames when buffer fills.
- Param upstream_rest_endpoints:
List[str], default empty. Optional list of “host:port” entries specifying non-standard upstream REST ports to use for particular senders. If the client IP (as seen by bufferRecv) matches a host in this list, that port overrides the default REST port (PORT_REST_SERVER) for that connection.
Public Functions
-
bufferRecv(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)¶
Constructor.
-
~bufferRecv()¶
-
virtual void main_thread() override¶
-
virtual std::string dot_string(const std::string &prefix) const override¶
Adds the source port to the pipeline dot graph.