Hi folks! Another cool library under the Kotlin um...
# kotlinx-rpc
e
Hi folks! Another cool library under the Kotlin umbrella. Question: I see the following in the readme > the library aims to provide the best RPC experience regardless of how the resulting messages are transferred Currently I have my own multiplatform implementation of RPC via TCP sockets. The protocol is totally custom, doesn't follow any public standard. And I can only code the client part in Kotlin, as the server part is on the mainframe and written in C. Can I plug in my own serialization and deserialization with kotlinx-rpc while only using it as a client? Bonus point, If K/N LLVM gets updated to v16+ there are people interested in getting it to run on z/Architecture, and in that case using something like this library could ease the development of new features on the mainframe. Let's see what happens in the near future.
a
Hi! Thanks for the interest and your question! The answer is yes, you can. As you have your own protocol, you will need to implement your
RPCClient
. There are no official guidelines on how to do properly yet, but you can look at
KRPCClient
where our own protocol is used. Inside your
RPCClient
you can use whatever method of transportation and serialization you want.
For serialization, please, keep in mind that we annotate generated request classes with
@Serializable
annotation form kotlinx.serialization and there is currently no way of adding your own annotations if they are needed. But still, can use our own implementation of
StringFormat
or
BinaryFormat
from kotlinx.serialization with these classes
gratitude thank you 1
e
Seems like I'll have to do some investigation then. Thanks!
a
Let me know if you will have any questions!