Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design and implement Ballerina AWS Redshift Data API Connector #7431

Open
chathushkaayash opened this issue Dec 2, 2024 · 1 comment
Open

Comments

@chathushkaayash
Copy link

Description

Ballerina AWS Redshift Data API Connector

This project aims to implement a Ballerina connector for the AWS Redshift Data API using the AWS Redshift Java SDK. RedshiftDataClient will be wrapped using Ballerina's interop features, exposing Redshift operations as user-friendly Ballerina APIs.

Key features will include:

  • Executing SQL statements on Redshift.
  • Managing query results.

This connector will simplify Redshift interaction for Ballerina developers while ensuring performance and reliability.

Version

No response

@chathushkaayash chathushkaayash changed the title Design and implement Ballerina AWS Redshift Data Api Connector Design and implement Ballerina AWS Redshift Data API Connector Dec 2, 2024
@chathushkaayash
Copy link
Author

Findings about the Java SDK for Redshift Data API

  1. Overview of the SDK Implementation

    • The Java SDK for the Redshift Data API provides both synchronous and asynchronous clients.
    • The synchronous client (RedshiftDataClient) offers a blocking approach, suitable for applications where calls need to execute sequentially and the thread can be blocked during API operations.
    • The asynchronous client (RedshiftDataAsyncClient) enables non-blocking operations, leveraging CompletableFuture to handle API calls. This is ideal for high-throughput or event-driven applications where non-blocking operations improve scalability.
  2. Key Differences Between Sync and Async Clients

    • Execution Model:
      • Sync Client: Blocking calls, easier to use in straightforward applications.
      • Async Client: Non-blocking, better for use cases requiring parallel or background processing.
    • Performance:
      • I used Java Microbenchmark Harness (JMH) to compare the performance of the synchronous and asynchronous clients.
      • Interestingly, I found no significant performance difference between the two clients under my benchmark conditions. Both clients exhibited similar throughput, even in high-concurrency scenarios, suggesting that the choice between sync and async clients may depend more on the application's design requirements rather than raw performance.
  3. Implementation Reference
    You can find the Java SDK implementation and initial findings here: Java SDK Implementation Repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant