You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "chiradip (via GitHub)" <gi...@apache.org> on 2025/09/26 10:35:06 UTC

[I] [Java SDK] Implement async/non-blocking client for better performance [iggy]

chiradip opened a new issue, #2201:
URL: https://github.com/apache/iggy/issues/2201

   **Description:**
   The current Java SDK only provides blocking I/O operations through `IggyTcpClient` and `IggyHttpClient`. This severely limits performance in stream processing frameworks like Apache Flink.
   
   **Current State:**
   ```java
   // Only blocking operations available
   PolledMessages messages = client.messages().pollMessages(...); // Blocks thread
   ```
   
   **Proposed Solution:**
   ```java
   // Add async operations
   CompletableFuture<PolledMessages> future = client.messages().pollMessagesAsync(...);
   ```
   
   **Impact:**
   - Multi x performance improvement expected (To be measured)
   - Essential for External (e.g Flink) connector efficiency
   - Reduces thread usage from 10-15 to 2-4 per task
   
   **Implementation Suggestions:**
   - Use Netty for non-blocking I/O
   - Provide CompletableFuture-based API
   - Maintain backward compatibility with blocking client


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Java SDK] Implement async/non-blocking client for better performance [iggy]

Posted by "chiradip (via GitHub)" <gi...@apache.org>.
chiradip commented on issue #2201:
URL: https://github.com/apache/iggy/issues/2201#issuecomment-3374810735

   PR merged. PR reference: https://github.com/apache/iggy/pull/2213


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Java SDK] Implement async/non-blocking client for better performance [iggy]

Posted by "mmodzelewski (via GitHub)" <gi...@apache.org>.
mmodzelewski commented on issue #2201:
URL: https://github.com/apache/iggy/issues/2201#issuecomment-3341326670

   Hi @chiradip,
   Instead of adding a CompletableFuture API, it might be better to expose a reactive API with Project Reactor (Mono/Flux).
   
   CompletableFuture covers single async results, but polling messages is naturally a streaming use case.
   
   Reactor provides backpressure and integrates well with frameworks like Flink and WebFlux.
   
   Example:
   ```
   Mono<Stream> stream = client.streams().getStream(id);
   Flux<PolledMessages> messages = client.messages().pollMessages(...);
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Java SDK] Implement async/non-blocking client for better performance [iggy]

Posted by "chiradip (via GitHub)" <gi...@apache.org>.
chiradip commented on issue #2201:
URL: https://github.com/apache/iggy/issues/2201#issuecomment-3341832560

   Thanks @mmodzelewski - you are right, we should consider using something like flux. also quarkus ecosystem has/had something similar. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Java SDK] Implement async/non-blocking client for better performance [iggy]

Posted by "chiradip (via GitHub)" <gi...@apache.org>.
chiradip closed issue #2201: [Java SDK] Implement async/non-blocking client for better performance
URL: https://github.com/apache/iggy/issues/2201


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org