Skip to content

Conversation

@whyoleg
Copy link
Member

@whyoleg whyoleg commented Sep 27, 2020

  • K/N support for linux, windows, macos, ios, watchos, tvos (fixes Kotlin/Native TCP support #80)
  • TCP client and server support for all K/N targets supported by ktor (ktor doesn't support windows)
  • Rewritten TCP connection implementation to not switch between threads while reading/writing (needed for K/N)
  • Rewritten MPP IntMap implementation based on Netty IntObjectHashMap - on K/N it uses atomics to support modification, even if it's freezed. Implementation is synchronized, so it's possible to use it concurrently.

Should work with WS on K/N when ktor will support it (may be in 1.5.0).
Tests for almost all targets are running ~ 1 hour, except for tvos and watchos (up to 3 hours), where new K/N allocator isn't supported (yet?).

@whyoleg whyoleg added this to the 0.10.0 milestone Sep 27, 2020
@yschimke
Copy link
Member

No review - but this is epic!

@yschimke
Copy link
Member

What does the integration story look like? e.g. is this a usable API for Swift or C++?

@whyoleg
Copy link
Member Author

whyoleg commented Sep 30, 2020

Not sure, that it will be easy to use it there because of suspend functions, but it possible, you can read it here:

@whyoleg whyoleg force-pushed the enhancement/native-support branch 2 times, most recently from f7e0943 to 2ea6f4a Compare September 30, 2020 23:33
@whyoleg whyoleg requested review from OlegDokuka and yschimke October 2, 2020 07:14
@whyoleg
Copy link
Member Author

whyoleg commented Oct 2, 2020

PR is ready for review, but some changes in tests running on CI will land soon. As for now, some tests are running too long on CI


suspend fun main() {
val api = connectToApi("Yuri")
val api = connectToApiUsingWS("Yuri")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks... I guess.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hah, yes, just first name which comes in mind after mine :)

Copy link
Member

@yschimke yschimke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review didn't seem too bad, mainly

  1. build setup changes
  2. TCP duplex connection using supported channels etc.
  3. IntMap rewrite

@whyoleg whyoleg linked an issue Oct 3, 2020 that may be closed by this pull request
@whyoleg whyoleg force-pushed the task/update-versions branch from 654d043 to 18994d6 Compare October 3, 2020 16:58
Base automatically changed from task/update-versions to master October 3, 2020 19:17
@whyoleg whyoleg force-pushed the enhancement/native-support branch from 28ef408 to 561fa9b Compare October 3, 2020 19:30
Reworked TCP implementation
Multiplatform Synchronized IntMap implementation
@whyoleg whyoleg force-pushed the enhancement/native-support branch from 561fa9b to 03af77c Compare October 4, 2020 12:08
@whyoleg whyoleg marked this pull request as ready for review October 4, 2020 15:08
@whyoleg whyoleg merged commit 4e06871 into master Oct 4, 2020
@whyoleg whyoleg deleted the enhancement/native-support branch October 4, 2020 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kotlin/Native TCP support

3 participants