Description
Is your feature request related to a problem? Please describe.
Websocket sessions could reach thousands when thousands of users have the client app open.
Yet, the only option to reduce that is to establish a ws connection in each invocation or establish
a ws connection that lives with the lifecycle of the app.
Don't get me wrong, I want long lived ws connection for communication between services but
not for communication between user client applications and a service.
Describe the solution you'd like
I don't exactly know if websocket sessions are very light or not for thousands of simultaneous long-lived
connections to be a problem but if so, there should be a way around that.
Maybe supporting different kinds of RemoteService
s were one has instance-per-connection policy and
another is invocation-per-connection policy?
Describe alternatives you've considered
If kotlin-rpc
was aimed to service-to-service communication, I think a gRPC
kotlin wrapper would be a better choice.
On the other hand (if kotlin-rpc
was aimed to client-to-service communication), I think the only alternative would
be Ktor
resources (yuk!)
Additional context
I am creating a KMP project were the client app and the server app are both in Kotlin
and I am searching for an
elegant more "natural" way of communication between the two.