https://kotlinlang.org logo
#ktor
Title
# ktor
a

Austin

02/14/2020, 5:43 PM
Are there any examples of doing HTTP2 full duplex examples using KTor client?
j

jw

02/14/2020, 5:54 PM
The full duplex nature of HTTP2 is an implementation detail that is not visible to people actually doing HTTP which remains in a classic request/response pattern. Even some of the client-visible features like push promise still falls into the request/response model.
a

Austin

02/14/2020, 8:36 PM
True, but I dont see an obvious way to do a reactive API on top that can send and receive multiple payloads given the API surface area of the ktor client
j

jw

02/14/2020, 8:44 PM
Well that's what I'm saying is that you can't in any client because that's not how HTTP works even when using HTTP/2 as the transport. It's full duplex only as an implementation details.
If you want something that is exposed at the actual application layer you need to use something like gRPC instead
a

Austin

02/14/2020, 8:46 PM
I got a design for it at the app layer already, its more can I use ktor client, or do I need to go lower right to Netty layer to have a layer low enough to build the publisher/consumer like RxNetty
10 Views