<@UE4SM1QEB> we just had a discussion about using ...
# io
a
@Oleg Yukhnevich we just had a discussion about using rsockets for distributed control systems in #science. Multiplatform version looks promising. I can't take another project right now, but please fill free to ask questions here. I have some experience with io, coroutines and multiplatform.
o
Thx for it. But now, the same for me, there is no much time to work on it... Also, I' waiting for somehow more or less stable version of kotlinx-io. I need to fully replace java and netty buffers with kotlinx-io buffer alternative. I don't want to start migration, and then rewrite one more time 🙂 Also, there is some bugs with my coroutine implementations, and also, need to add one more abstraction over flow for requests, because now, it's not very efficient, because flow designed for requesting one by one value, but f.e. in rsockets and in distributed communiction it's need f.e. to request data in chunks by 10 values, or some custom logic. Now, i have really no time to work on it stabilization, but I will return to it after exams in february, may be kotlinx-io will have 0.2 released, who knows And, I saw your message in github, I want to ask, about kotlix-io coroutines 'module' - as I understand, it's not needed here for now, but, may be you can give some info, what it will be?
a
I currently use my own fork of kotlinx-io. It is published in our bintray repo, but from discussion in kotlinconf, it is obvious that some decisions won't go mainstream. So in the end, I will maintain compatibility on the level of dataforge-io library (https://github.com/mipt-npm/dataforge-core/tree/dev/dataforge-io). As for coroutine-based io, I believe that there is no clear solution yet. At least, what I had in mind is different from @elizarov ideas. The important part is that you do not need kotlinx-io for your case because you do not use complicated read/write operations inside buffers. All you need is some simple acces methods like @Francesco Vasco wrote: https://discuss.kotlinlang.org/t/asynk-nio-library/15360/11.
o
I saw your fork and your PR, not everything clear for me, seems, it's a bit more different point of view on library design, that is in JB Why I don't need kotlinx-io? The main reason - I need MPP solution If I didn't need MPP, I just could create some wrappers over Reactor, and it will work easy So it's why I need kotlinx-io for it Now, buffers are almost only one big Java dependency
a
I mean that kotlinx-io is about streaming reading of primitives and more complicated structures. If all you need is read a single block with known size, it is quite easy to do without the library. I think it would be good to have kotlinx-io, but as I said, it is in design stage, so I do not think it will be ready anytime soon.
o
Ok, if kotlinx-io is for complex data, what can you recommend for me to replace java and netty buffers with some mpp buffers?
a
Why do you need to replace them? Kotlinx-io uses ByteBuffers internally
o
Yes, it's the case, kotlinx-io has actual declarations for all platforms, and some read/write primitive operations, it's what I need And for now, I want to know, that if I will use this functions/classes - they will stay there. Because, there is really MUCH code exists to work with buffers, you can check flyweights in repository
a
We discussed it during kotlinconf. And I am pretty sure, there will be changes. Kotlinx-io currently does not expose multiplatform buffer because it would mess with pooling. I used
Bytes
for that, but it will be deprecated or at least significantly changed soon. I've introduced
Binary
for this purpose, but
Binary
won't be included in kotlinx-io.
If we are working only with simple buffers it seem like an easy task to abstrat it away without library.
o
Nevertheless, I have no time now, to work on it 🙂 I will return to it in a month, or two, then, I will think about it one more time
a
OK, I hope we could stabilize kotlinx-io API somewhat.
👍 2