Hello, how can I setup a http server (ktor?) to ha...
# kotlinx-rpc
g
Hello, how can I setup a http server (ktor?) to have pure gRPC server (with .proto) for mobile and (as there are limitations) grpc-web for a WasmJS client? Any project example out there for that?
a
Hello! So, for server yes, here: https://kotlin.github.io/kotlinx-rpc/grpc-configuration.html and here https://kotlin.github.io/kotlinx-rpc/grpc-server.html and here https://github.com/Kotlin/kotlinx-rpc/tree/main/samples/grpc-app But keep in mind that this gRPC way of doing thing will soon be replaced with a new version (no ETA, as soon as it is done)
for mobile
For Kotlin will be available this before mentioned release
grpc-web for a WasmJS client?
For Kotlin currently not possible due to
grpc-web
quirks If you need mobile or wasm not with Kotlin - then I can't provide any examples for now.
❤️ 1
g
I wrote a Go server with that exact setup and was hoping to convert it to Kotlin 😅 gRPC is a perfect match for a modern reactive (streams) CMP app, for Android / iOS / WasmJS / DesktopJVM, so what would replace all this for all clients? krpc?
a
Nope, gRPC for Kotlin Multiplatform! We are cooking it and we'll have iOS (all native expect for windows actually), Android, and Jvm support in the initial release Web (Js, WasmJs) will be more tricky because of grpc-web problems (it is basically abandoned), but we are thinking if there is anything we can do there
g
This actually sounds amazing 😍 Anything I can do to help or test? I can say that I'm only using server streaming from this go server, to bypass the client / bidirectional streaming limitation on web. If that lib could have this, I could adopt it right away ❤️ Not sure how bad it is for scale to not re-use the same channel but I don't care right now about performance at scale 😅
🔥 1
a
That's great to hear! We'll announce the initial dev release next year before merging it into main, and we'll need early adopters. I'll ping you in this thread so you can try it out then
g
I literally can't wait! 🤯
a
Totally understand, but it's a huge update and we need to make sure that even a dev release doesn't fall apart from the first touch Good news if that the main parts are working and we are finishing up leftovers with Gradle, docs and some crucial missing features (not a lot of them) Bad news - holiday season is coming and I'll have a 6 weeks vacation, sooo... yeah, some wait time
💪 1
g
Sounds like very much deserved rest time 😅
a
🙂