You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AsyncRequest#inputStream() is holding the aggregated body which has been received completely, It doesn't make much sense to do this.
It is hard to be compatible with the InputStream that will block until input data is available, which it may block on the IO EventloopGroup
AsyncResponse#outputStream() is writing bytes asynchronously, which means it is allowed to write bytes very frequently without any check of channel's writability and ByteBufAllocator's allocatability, which may cause an OOM error.
Motivation
AsyncRequest
andAsyncResponse
provide methods:esa-restlight/restlight-server-adapter/src/main/java/esa/httpserver/core/AsyncRequest.java
Line 101 in 56f13c1
esa-restlight/restlight-server-adapter/src/main/java/esa/httpserver/core/AsyncResponse.java
Line 75 in 56f13c1
AsyncRequest#inputStream()
is holding the aggregated body which has been received completely, It doesn't make much sense to do this.InputStream
that will block until input data is available, which it may block on the IO EventloopGroupAsyncResponse#outputStream()
is writing bytes asynchronously, which means it is allowed to write bytes very frequently without any check of channel's writability andByteBufAllocator
's allocatability, which may cause an OOM error.esa-restlight/restlight-server-adapter/src/main/java/esa/httpserver/impl/ByteBufHttpOutputStream.java
Lines 203 to 224 in 56f13c1
OutputStream
that will block until output data is writable, which it may block on the IO EventloopGroupReactive programing
is exactly what we wantWhat should we do
The text was updated successfully, but these errors were encountered: