Closed subes closed 1 year ago
won't do for now. Throttling will be done by waiting on writeReady/writeFlushed/hasNext, that way we don't need any additional buffers. An outer queue could buffer messages before serializing them for a buffered output stream alternative before entering the synchronous channel pipeline.
hadronio does this with ucx for example using a ringbuffer.
we could also implement backpressure by toggling ready callbacks depending on queue/ringbuffer size
though making it zero-copy would not be possible because we have to buffer messages, though only buffer if something can not be sent immediately, also eagerly drain buffer as long as possible.