-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research usage of big Payloads #110
Comments
My mental model has been around an individual payload being available via a stream API, like Channel, InputStream/OutputStream or similar. |
For inspiration: ktor-io byte channels |
I'd be interested in hooking it into the CLI once it's barely working. Can testing with streaming STDIN/STDOUT pipes etc. |
better to postpone this task until ktor/ktor-io will have 2.0.0 version, which will change some |
POC api change: https://github.com/olme04/rsocket-kotlin/commit/5946241c3997cf3f711152d37ddd2b05719d19e3#diff-b20323f12dc29bebdc7845234a305c8f22b468cb7c98964cb14ad808696ec65f |
Someday I think we will need to migrate to Kotlin/kotlinx-io#131, though, it depends on how well it will interop with ktor and so ktor-io, as this is the main transport now. |
On current moment
Payload
contains 2 propertiesdata
andmetadata
which can store bytes. The problem is, that those properties storeByteReadPacket
which works like in-memory buffer. So f.e. to send big file through in one Payload(+fragmentation), it will be needed to firstly read everything from file toByteReadPacket
, so in memory.Need to research, if and how it's possible to send such big payloads without reading everything to memory
The text was updated successfully, but these errors were encountered: