invesdwin / invesdwin-context-integration

invesdwin-context modules that provide integration features
GNU Lesser General Public License v3.0
1 stars 0 forks source link

add ringbuffer/queue for simulating streaming socket over synchronous channel that is non streaming #46

Closed subes closed 1 year ago

subes commented 1 year ago

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.

subes commented 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.