-
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
reworks implementation using coroutines and multiplatform #76
Conversation
@sdeleuze will appreciate your review! 🙇♂️ |
This is massive, love this. |
That's a big step forward. |
OMG, is it real? I will review it asap (possible delays due to my upcoming vacations). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whyoleg can you please change all the packages to have the base io.rsocket
?
Along, can we add the same license headers to all files as we have it at rsocket-java?
Yeah, will do on a weekend (on vacation now) |
|
||
val Cancelable.isActive: Boolean get() = job.isActive | ||
|
||
fun Cancelable.cancel(cause: CancellationException? = null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious: Why so many extension methods, instead of defaults on the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly code style. But also, default methods can be overridden, so it's even safer to keep them as extensions.
Also, it's more kotlinish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say it's kotlin idiomatic, which is why I asked. But not an issue, just curious.
val ignoredFrameConsumer: (Frame) -> Unit = {} | ||
) | ||
|
||
fun RSocketClientConfiguration.setupFrame(): SetupFrame = SetupFrame( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious: again, why an extension method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to upper comment, but here, it's even can be just inlined in implementation.
This is a tough big review with a lot of formatting, copyright changes. I won't be doing a deep dive, but once we have snapshots for this I'd love to start testing it against various servers (rsocket-demo, cli) and platforms (JS, Java). |
@yschimke @sdeleuze @rstoyanchev I have done the first round of review with @whyoleg - so far so good. I can propose to schedule a call with everyone interested in the review to make grasping of the ideas easier. Let me know your thoughts on that |
I'll probably wait until it lands and kick the tires then. This is really great to see! |
merge client/server to core package minor cleanup payload builder
I'd vote for landing and iterating. I'm keen to test this with my rsocket-cli and flush out issues against rsocket-java server etc. |
frames tests fixing dependencies add using of experimental annotations in tests
What is the background with the build system, is this standard for kotlin MP projects? edit: found https://github.com/whyoleg/kamp |
Nice, just works against the demo site
|
Since Kotlin 1.4 is imminent, and presumably ktor bumps. What are thoughts there? Should I wait before trying to use in my code? |
Should be okay, I don't expect any breaking changes in ktor in what used here. |
Trying it now, thanks. Don't take this personally, but a custom DSL for builds inside of gradle kotlin is disorienting. If it's to manage the MP builds and ktor jars, understood. |
|
* limitations under the License. | ||
*/ | ||
|
||
package io.rsocket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are going to need a different package, this one's taken :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use or just rsocket
(why not?) or as in current repository io.rsocket.kotlin
Not sure about that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yschimke do you have any issues with io.rsocket
? Are you mixing rsocket-java / kotlin? We discussed that with @whyoleg and I proposed initially to go with io.rsocket
unless someone complains. And here this happened. Thus, the question is how much it is critical. If it is critical I would go for kotlin.rsocket
or io.rsocket.kotlin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bad idea. Noone does this. How about io.rsocket.kt?
I can't suggest this strongly enough. Don't reuse the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think kotlin.rsocket
will confuse someone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyways. I'm good with io.rsocket.kt
just wanna have less .
in the base pkg name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll defer to you both, but just dont overlap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's then use io.rsocket.kotlin
, I don't really like kt
ending. If it's ok, I will change it soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
This is a lovely implementation. Really nice natural API with kotlin flow. |
Playing around with a branch here https://github.com/rsocket/rsocket-cli/tree/kotlin |
increase timeout for tests add keep alive tests
New version with changed root package name and group: bintray |
Minimal multi-platform implementation based on coroutines and Ktor Works on: server JVM: TCP/WS client JVM: TCP/WS JS: WS
Minimal multi-platform implementation based on coroutines and Ktor
Works on: