cloudstateio / kotlin-support

Cloudstate Kotlin Support

Home Page:https://cloudstate.io/docs/user/lang/kotlin/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrate to gRPC-Kotlin

ihostage opened this issue Β· comments

https://grpc.io/docs/quickstart/kotlin/

But gRPC-Kotlin is not a multiplatform library now and we can't implement a user function as Kotlin/Native or Kotlin/JS 😞. (grpc/grpc-kotlin#51)
Of course, support Kotlin/JVM (plus try to use a GraalVM for creating a more performant native image) can be a good start point for more idiomatically implementation of kotlin-support library for Cloudstate.

As an alternative approach, we can use unofficial libraries:

Kotlin serialization supports a multiplatform. But it does not support a protoc (vice versa the code-first strategy Kotlin/kotlinx.serialization#34) and, of course, don't know about gRPC networking.

More information can be found in protocolbuffers/protobuf#3742

PS: Likely to do that, need add support Kotlin to akka-grpc πŸ˜„ And I don't know what will be a reaction of maintainers for this activity πŸ˜‚ Generator of Koltin code in Akka module... Incredible scenario πŸ˜‚ But I want for it happens πŸ™

Wow very cool infos @ihostage
We will follow the evolution of these libraries.
I am working on a branch (wip-kotlin-factory) that implements most of the necessary handlers logic for an implementation of the Cloudstate protocol, this will already give us good freedom in terms of kotlin style and the possibility of creating a DSL around the protocol Cloudstate although I also believe that the approach of using the library in java has its own benefits too (it will always be updated with all the features of the protocol for example).
Let's keep an eye on those libraries you mentioned and if you wish, send us some PR