-
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
Reboot rsocket-kotlin as a multiplatform + Coroutines based project #59
Comments
@sdeleuze JDK 8 isn't as big issue an for rsocket-java on Android anymore, so a differentiator for Kotlin seems like a big win. This seems like a good idea. |
This is good initiative - I think we can replace this one once there is runnable code for some interactions (personally interested in streams and channels). Also wondering what runtime footprint will be if I want rxjava bindings for parity with rsocket-java. above interface seems reasonable - @sdeleuze do you have any additional code to share? |
I have not yet additional code since I think I am going to start by using Coroutines and |
https://github.com/Kotlin/kotlinx-io is still under heavy refactoring, I am waiting a usable version to be able to move forward. |
I've started moving this project to kotlin MPP with coroutines |
Hi all, I have update on kotlin mpp rsocket |
My suggestion would be to start with a thin wrapper based on top of the reactor. In reality much of the kotlin flow/coroutines world will not be pure kotlin code but bridge code to lower level existing java libraries. |
That would be indeed a good start. |
I am a little bit involved with kotlinx-io. Sadly it won't be stable for some time. And currently it is focused on blocking io - coroutines will come later. So it makes sense not to wait for it. In fact, From current API, it seems that you do not need it. You just need to wrap nio calls with coroutines. The discussion could be done in kotlin slack (https://kotlinlang.slack.com/archives/CKCAAV8VB, http://kotli.in/slack for registration). |
Hey @sdeleuze I would be interested in putting some efforts in booting this as a multiplaform project. How would we kickstart it? |
Surprisingly, we had a discussion about that just yesterday. We are doing a research project with kotlin-multiplatform as a base and we decided that RSocket seems to be a best-fit protocol for the project. The lack of coroutine integration is sad, but we intend to try and one of the students is currently researching native integration. I won't be able to contribute a lot of time, but I am maintaining a public fork of kotlinx-io (https://bintray.com/mipt-npm/dev/kotlinx-io) and I can adjust its features to better suit the needs of rsocket. Kotlinx io does not currently support coroutines, but it is possible to add asynchronous wrappers in some places. |
For those who are waiting, here is published preview version of MPP rsocket-kotlin from PR. |
Should develop be the main branch now? |
Closed by #76 |
With the announcement of Coroutines
Flow
(see also preview status information and related open issue on their bugtracker), I think we have now all the required pieces to makersocket-kotlin
more than the kind of less maintained duplicate of the Java one that may be removed at some point.Kotlin is becoming more and more a multiplatform language and I think after leveraging
rsocket-transport-netty
andrsocket-transport-okhttp
(worth to notice that OkHttp plans to migrate to a Kotlin codebase) to provide the JVM implementation, it would be interesting to see if it is doable to provide a Kotlin/JS one. It is too early for a Kotlin/Native implementation but we could target that middle/long term.Here is an overview of what could look like this multiplatform API.
I guess
Payload
could leverage Kotlin multiplatform I/O library.I plan to work on that myself (with the help of others if some are interested to join) since that will allow me to validate various points of
Flow
API design including its Reactive-Streams interop. Also I do think this kind of approach would provide an interesting way to explore for multiplatform support that could ultimately allow RSocket to gain more traction.The text was updated successfully, but these errors were encountered: