kotlinx.rpc - a brand new approach for multiplatform RPC | Alexander Sysoev

  Рет қаралды 5,922

Kotlin by JetBrains

Kotlin by JetBrains

Күн бұрын

Пікірлер: 12
@erictsang0
@erictsang0 6 ай бұрын
This is awesome and so easy! Wow 😃
@krellin
@krellin 6 ай бұрын
its great but the only thing that sucks about this is the serialization its pretty clear that state of the art approach is to not do any serialization, just wrap a buffer with something that can randomly access fields like SBE, capnproto, flatbuffers... but this is fine for majority, i just don't see why not have the best of the best.
@shadowpenguin3482
@shadowpenguin3482 5 ай бұрын
I think you misunderstood. SBE, capnproto and flatbuffers are all serializations. So it is the same interface as JSON, but different implementations. The difference lies in the efficiency. In the call he mentioned that CBOR and protobuf are already supported (which is also very efficient). So krpc is separated from the concrete serialisation implementation :)
@krellin
@krellin 5 ай бұрын
@@shadowpenguin3482 oh thats nice, i thought its hardcoded to use their own kotlin serialization thing they did a while ago... Regarding the libs mentioned no they do not do any serialization, they format data in binary form and store it in buffer, so when you get data over network into buffer you are literally ready to interact with that message, even mutate in place, you are not reading the buffer into new object and populating any fields. Similarly when you want to send the message its entire serialized form is ready in the buffer, no actual serialization or deserialization happens. Most applications have highest overhead from serializatios, with those you completely avoid that overhead.
@krellin
@krellin 5 ай бұрын
@@shadowpenguin3482 oh i didnt see that serialization is independent, i thought they just use their own serialization which i remember was actually creating objects... i'll check what is the interfce, i find that often its not possible to integrate some of these zero garbage/zero serialization libs
@krellin
@krellin 5 ай бұрын
@@shadowpenguin3482 so i was right, in order for you to implement a serializer for something like SBE/capnp/flatb you need much more controll over buffers and how they are managed, their interfaces forces you to return an object after reading the buffer, meaning you are done with the buffer once you return it, so you cant just do the wrap over buffer segment and return the flyweight... and thatas why you cant do it... as i said that's the only thing that sucks about this RPC, but its ok for the majority. UPDATE : i believe with this interface (SerialFormat) you could maintain a pool of buffers and pay the cost of buffer copy which is still much cheaper than any work converting binary into object... but yes you cannot take full advantage of zero copy and zero serialization... Still super useful library that makes perfect sense to have in kotlin, kudos to JB
@avwie132
@avwie132 4 ай бұрын
@@krellinthere are already protobuf implementations of the Kotlin Serialization library
Simplifying Kotlin Build Configuration with Amper | Márton Braun
14:50
Kotlin by JetBrains
Рет қаралды 7 М.
Debugging the Future: Exploring Coroutine Debugger Tools | Nikita Nazarov
31:26
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Enabling Kotlin Multiplatform Success: The Android Jetpack Journey
45:28
Kotlin by JetBrains
Рет қаралды 5 М.
Kotlin Multiplatform vs Flutter: Which should we use?
4:42
Kei Fujikawa
Рет қаралды 28 М.
Pushing the limits of the Server Side UI platform with KMP | Paulina Sadowska
27:36
gRPC vs REST - KEY differences and performance TEST
7:02
Jelvix | TECH IN 5 MINUTES
Рет қаралды 31 М.
How to Setup a Room DB for Kotlin Multiplatform Compose
20:27
Philipp Lackner
Рет қаралды 17 М.
Unlocking the Power of Arrow 2.0 - A Comprehensive Guide | Simon Vergauwen
37:23
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 286 М.