Hi, I'm quite interested in trying out this librar...
# kotlinx-rpc
e
Hi, I'm quite interested in trying out this library and play with it, but I'm trying to figure out where does it fit in our architecture. We are using grpc and protobuf, and we define our services in protobuf then generate kotlin stubs out of it. Something like:
Copy code
// proto:
service MyService {
    rpc foo(string) returns (string) {}
}

// generated abstract stub:
public abstract class MyServiceCoroutineImplBase(
    coroutineContext: CoroutineContext = EmptyCoroutineContext,
  ) : AbstractCoroutineServerImpl(coroutineContext) {
    public open suspend fun foo(request: String): String = throw
        StatusException(UNIMPLEMENTED.withDescription("Method foo is unimplemented"))
}

// my binding:
class MyServiceBinding : MyServiceGrpcKt.MyServiceCoroutineImplBase() {
    override suspend fun foo(request: String): String = "hello $request"
}
One thing I could see is that there could be gradle plugins generating the stubs using the new
kotlinx.rpc
library. What else do you see? How could this be used in a distributed environment with multiple rpc services and with shared protobuf messages?
a
Hi! I can not say for sure, how well everything we have right now can fit into your distributed environment, as we need to figure out a lot of things right now. So current version of the library may not fit as good as we would like it to About our concept and plans I can say this: • We are working on gRPC support. Meaning that you would be able to use our APIs, but gRPC as a protocol. We are not committing to anything specific right now, but gRPC may be supported on all platforms as well, not just JVM. • How your services organized should not matter, as kotlinx.rpc provides you means to work with them comfortably in your code, while leaving communication questions to a specific network library or an integration with one
👍 1
👍🏻 1