:kotlinx-rpc: :tada: The kotlinx.rpc library is li...
# announcements
a
kotlinx rpc 🎉 The kotlinx.rpc library is live! Now you can easily add asynchronous Remote Procedure Call (RPC) services to any Kotlin application, whether server-side, mobile, or multiplatform. Join the #C072YJ3Q91V channel and share your feedback and feature requests with the team. We’d love to hear from you! Check out the GitHub page for more information.
kodee happy 1
kotlinx rpc 43
🆒 6
K 2
👍 4
👌 14
❤️ 21
🎉 22
K 116
p
awesome, we'll be able to express some service's API in a type-safe way using Kotlin interfaces 🙂 I've been waiting for it, even tried to build a library for it once, but eventually gave up
kodee greetings 3
The badge in the repo's README says the lib supports Kotlin up to 1.9.24. Isn't 2.0.0 supported yet?
s
there was a talk about kotlinx.rpc at KotlinConf2024. The video should come out any day now.
a
@Piotr Krzemiński not yet, but we are working on it https://github.com/Kotlin/kotlinx-rpc/issues/90
👍 4
d
Absolutely hyped for this; I got quite a long way with building my own RPC library but I've never been happier to throw my own code away - ecosystem gap filled!
👍 2
r
Any ETA on gRPC support?
a
Not yet, but the most work is planned after K2 support is done
👍 4
c
rpc noob here. but this just adds a layer on top of existing technologies right (i.e. like the docs show ktor server and ktor client). its not somehow doing rpc via direct sockets or something? ive never used rpc, but being able to define methods a method that just knows to execute a method on a remote server sounds cool.
a
That's right, we work on top of existing data transferring means, like Ktor now, and some others in future
c
Pretty sweet. so i could potentially still have a rest api with ktor that other (non kotlin) clients could consume. hm. this seems really awesome actually in order to make sure we keep defined types between frontend <> backend
👌 4
n
Amazing! I'm working on a similar RPC library (also with
Flow
support, authentication, KSP code generation, common interface for both the client and the server, etc.) but I have far less resources than Jetbrains 😕, so progress is slow (but I already use it successfully in my applications). Of course there are other community-based RPC implementations as well (kobweb, kilua, etc.). I don't want to seem negative but: we got another Jetbrains library while the existing ones are seriously lacking support. For example Ktor 3 has not seen a release for half a year. Compose HTML, reflekt and others seem to be almost entirely abandoned. There are many major bugs in all of the existing libraries and they seem not to get fixed at all for years. I'm subscribed to many of these issues and the only thing happening with them users asking for when can we expect the fix but otherwise nothing happens. Sooo, I always try to be positive but now we got another Jetbrains library that takes away the resources from other existing projects, and as a Compose HTML + Ktor user it makes me a bit sad instead of entirely happy...
👍 1
e
Hey @Norbi, let me try to share the point behind building kotlinx.rpc and maybe address some of your concerns about support. With kotlinx.rpc, we're trying to find a simple way to serialize a function call. This fundamental part is protocol agnostic and can be reused in other RPC frameworks or protocols (for instance, to integrate closely gRPC and Ktor). The Ktor 3.0.0 is taking longer because of the breaking changes. We want to introduce it with fewer breaking changes and make Kotlinx-io migration smooth. We're still checking the state and use cases for Compose HTML (and for kotlinx.html). We will be happy to accept any contributions or feedback there. I hope it addresses your worries. I will be happy to reply any questions you have.
👍 3
🙏 5
p
@Norbi part of me thinks similarly (I also use parts of Kotlin ecosystem that could use more resources, like Scripting which #C02UUATR7RC relies on), but kotlinx.rpc seems to fit nicely in the whole Kotlin Multiplatform story, and can be actually a nice addition to the ktor + Compose HTML stack
👍🏻 1
🙌 2
👍 1
a
Kotlin RPC, Ktor and Compose HTML can make Kotlin finally make a Phoenix LiveView competitor. I’d love to see an opinionated Kotlin Server Side Application Framework.
👍 1
114 Views