-
Notifications
You must be signed in to change notification settings - Fork 38
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
Migrate to ktor 2.0.0 eap and new native memory model #208
Conversation
* split ktor transport implementation (required for ktor 2.0.0) * use 2.0.0 eap ktor version * use 1.6.20 eap kotlin version * use coroutines 1.6.0 * minor dependencies update * minimal code update to be compatible with ktor 2.0.0 * remove coroutines version replacement strategy, as it's not needed any more * enable new native memory model
Hi, would you mind to release this as an EAP or alpha? |
@monsdroid Hey, snapshot will be available just after merging this PR, but because of |
Hey @monsdroid, snapshots are published now, you can take a llok on them now. |
Just wanted to say thanks. great work. after adjusting some imports everything works fine |
Im glad to hear it! thx! |
Hello @olme04, First of great work with Rsocket. I might have misunderstood something, I assumed that 0.15.0-SNAPSHOT contains this PRs changes However the "io.rsocket.kotlin:rsocket-transport-ktor-server:0.15.0-SNAPSHOT" artifact is using code from before this PR. When checking the RSocketSupport class still uses ApplicationFeature not the ApplicationPlugin You can download the snapshot directly from the github artifacts page. you can check the rsocket-transport-ktor-server-jvm-0.15.0-20220114.090008-1-sources.jar |
Hey, @afTrolle!
After this PR, there is no more You can also take a look here on the diff from 0.14 to 0.15 snapshot for sample: Hope this helps! |
Okay, thank you for the explanation. |
Main reason for using ktor 2.0.0 EAP is support of coroutines 1.6 (non native-mt) and new native memory model. On current moment
native-mt
version of coroutines has some bugs, that appear in random places, and have no workarounds. In non native-mt there is no such bugs, and as anywhere, after release of ktor 2.0.0 we will need to migrate to new memory model, as ktor 2.0.0 will support only it, such change is both pro-active, and will improve developer experience.Changes:
transport-ktor
,transport-ktor-client/server
totransport-ktor-tcp
,transport-ktor-websocket-client/server
+ intermediate modulestransport-ktor
andtransport-ktor-websocket
ktor-network
module isn't published for JS - before it was published but hadnot implemented
errors instead of implementationscoroutines-test
modulenative-mt
version anymoreNote: in future PR's there will be another split of ktor transport dependencies:
transport-ktor-websocket-server/client
dependencies provide just plain transports similar to nodejs and localktor-client/server
with idea of deep ktor integration. For now it will be just client and server plugin, but in future, there will be possibility to integrate rsocket-kotlin into ktor-serialization or ContentNegotiation API, or even something else.TODO: update readme with new modules later in one go after new transport API and ktor integration improvements will be implemented