micronaut-core icon indicating copy to clipboard operation
micronaut-core copied to clipboard

JDK RawHttpClient

Open yawkat opened this issue 1 year ago • 2 comments

This PR adds a RawHttpClient implementation in the JDK client. In principle it's not so complicated, but to actually be useful, it needed a streaming reactive ByteBody implementation, which is complicated to implement.

To implement this, I've refactored the StreamingNettyByteBody implementation into a "generic" implementation that is implemented both for the netty ByteBuf/EventLoop approach, and a more traditional ByteBuffer/lock approach for the jdk client.

  • BodySizeLimits, PublisherAsBlocking, UpstreamBalancer, BufferConsumer.Upstream moved from http-netty into http
  • BufferConsumer refactored into a base BufferConsumer interface (http) and a ByteBufConsumer extension (http-netty)
  • Most StreamingNettyByteBody.SharedBuffer code (http-netty) extracted into an abstract BaseSharedBuffer (http) that is also extended for the JDK client

In particular the SharedBuffer refactor is fairly complicated. While the general code remains unchanged, making it work for different buffer types and concurrency models is still a bit complicated.

yawkat avatar Oct 17 '24 09:10 yawkat

I think the sonar coverage stats are not including the TCK

yawkat avatar Oct 21 '24 08:10 yawkat

Quality Gate Failed Quality Gate failed

Failed conditions
52.3% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Oct 21 '24 09:10 sonarqubecloud[bot]