multi client request-response between rust and kotlin on android
- kotlin serialization json encode bytearry is very slow
- android bitmap png compression too slow
- tarpc with bincode serialization: 50ms to transfer image 4x1080x1920
- with png encode decode is slower: 110ms
- tcp or uds have no obvious differences
start server: run app in android studio
start client
cd client
./0.sh runcommunication strategy:
- kotlin http server, ktor, json serialization
- kotlin grpc server, OkHttp, protobuf serialization
- axum + jni, http/tcp, json serialization
- axum + jni, uds, json serialization
- axum + jni, tarpc over http/tcp, json serialization
- axum + jni, tarpc over uds, json serialization
- axum + jni, tarpc over uds, bincode serialization
not test:
- tonic: grpc, protobuf serialization
- capnp-rpc: client call is builder style
- jsonrpsee: assume it's same as tarpc with json serialization
- serde-byte: need try on our image buffer
time: duration of request response decode at client
task: get screenshot, get screennode, click position