Didier Villevalois
07/09/2022, 8:53 AMktor-network
socket, (2) parse a message using google-flatbuffers
which contains a packed scalar array, (3) that is itself fed to multik
to make a multi-dimensional array of it. Along all this processing line, it is possible to have a single byte array backing multiple buffers and not have to copy any bytes.
However, it is a lot of work currently because there is no standard buffer API. For instance, google-flatbuffers
is defining their own Buffer API to support this no-copy principle: https://github.com/google/flatbuffers/blob/master/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt
In the above-mentioned use-case for instance, I have to implement my own com.google.flatbuffers.kotlin.ReadBuffer
above `ktor-io`'s <http://io.ktor.utils.io|io.ktor.utils.io>.core.ByteReadPacket
, etc
Isn't it time that people from Okio, Ktor and others get together to define a standard Buffer API and revive kotlinx-io
??
(Sorry for the kinda rant but it is a little irritating...)altavir
07/09/2022, 10:57 AMDidier Villevalois
07/09/2022, 11:25 AMaltavir
07/09/2022, 11:27 AMDidier Villevalois
07/09/2022, 11:45 AMaltavir
07/09/2022, 11:46 AMDidier Villevalois
07/09/2022, 11:53 AMBuffer
abstraction and an asynchronous ByteChannel
abstraction. Is that the kind of compromise you spoke about?altavir
07/09/2022, 11:56 AMInput
work. Does it block, while waiting for a new input or does it suspend. I believe that @e5l found kind of solution. But everyone is a bit occupied right now.Oleg Yukhnevich
07/09/2022, 12:13 PMDidier Villevalois
07/09/2022, 12:51 PMktor-io
in Ktor, right? Is there any way I can participate to this effort, or is it too early?Oleg Yukhnevich
07/09/2022, 12:57 PMAaron Todd
11/01/2022, 1:36 PMkotlinx-io
getting pulled from the roadmap was a major blow to working towards a common community solution for a KMP IO library. Would love to see okio
and ktor
folks (and community) work together as there is a lot of overlap.