Hey guys! I have been thinking about a project for a long time now, and I'd like to know your thoughts about it now that I have some basic implementation. It's called
krpc, and as the name implies, it's quite similar to grpc but fully Kotlin :
- You define a service using interfaces and Kotlin data classes annotated with @Serializable (ex:
https://bit.ly/2PW623A)
- Most of the server (JVM) and client (Multiplatform) code is generated.
- You implement the service and easily bind it to your ktor server by installing a feature (ex:
https://bit.ly/2JiGwTA).
- Your clients easily make RPCs to the server directly through the interface you defined (ex js:
https://bit.ly/2CGeKz5, ex jvm:
https://bit.ly/2Q1p8p6)
The missing and most challenging part now would be the multiplatform code generation, and for that I need either the compiler plugin API to be more or less stable (or wait for
@jw to start his pet project 😄). Most of the code would be in a runtime and the generated code will not be that big/complex, so once I have that I will be able to make quick progress. Until then I can improve the API and add more features (like logging, authentication, etc) depending on people feedback.
What do you think ?