Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

V3 reactor netty #132

Closed kushagraThapar closed 5 years ago

kushagraThapar commented 5 years ago

Replaced Rx-Netty with Spring Reactor-Netty.

  1. Replaced rx-netty with reactor-netty in RxGatewayStoreModel and HttpTransportClient, effectively replacing all rx-netty with reactor-netty http client.
  2. Updated all test cases as well as Mocked http client implementations to use reactor-netty.
  3. Connection throttling has been fixed, as reactor-netty waits to acquire new connections in case connection pool is exhausted.
  4. Checked exceptions are now being thrown with the help of Exceptions.propgate call from reactor-core.

Some outstanding Issues:

  1. Fix Connection Pool Exhausted Retry Policy as there is not Connection Pool Exhausted Exception anymore.
  2. Run Latency benchmarks.
  3. Investigate if we can specify connections per endpoint from HttpTransportClient.

This change is Reviewable

atoko commented 5 years ago

Hi, this looks interesting!

I am trying to use Spring Boot Webflux with the Async Client but Netty SSLProvider is throwing a "ChannelClosedException". Anyway, this isn't for my issue, this is just to say that I'm looking forward to this. I'm not too familiar with internals but can catch up to help speed this along. (I'll just use the Spring Data integration for now..)

Let me know if there is anything I can do

PS: Have you tried an exponential backoff or throttle on SSL connections?

kushagraThapar commented 5 years ago

This PR is stale now as the changes have been included in v3_store_consistency_layer PR. Closing this.