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

Performance tests for different forms of async handling #40140

Open
alzimmermsft opened this issue May 13, 2024 · 0 comments
Open

Performance tests for different forms of async handling #40140

alzimmermsft opened this issue May 13, 2024 · 0 comments
Labels
clientcore pillar-performance The issue is related to performance, one of our core engineering pillars.

Comments

@alzimmermsft
Copy link
Member

alzimmermsft commented May 13, 2024

clientcore at this time is synchronous APIs only, which differs from what has historically been provided by azure-core which has built-in support for Reactor. For the time being our plan is to have clientcore remain synchronous and expect for consumers of the library to wrap our synchronous calls with their own asynchronous handling. Even though we won't give formal support, we should do investigations into what strategies for asynchronous handling would work best.

A few solutions for asynchronous calls are:

  • Thread management using ExecutorService, and similar concepts built into the base language.
  • Using an external library such as Reactor and using their Schedulers to allow for blocking calls throughout their asynchronous flow.
  • Wrapping our synchronous calls with Future (which is a slightly different take on the first point).

Given our aim to limit external dependencies used by clientcore we should spend the most time on what is available within the JDK itself. And should also do some investigations into Java 21 virtual threads, which isn't exactly the same as asynchronous but is somewhat related.

Longer term vision, we may want to look at how our recommended pattern will interact with external libraries such as Reactor which can use CompletableFuture's as a supplier for a Mono / Flux.

@alzimmermsft alzimmermsft added pillar-performance The issue is related to performance, one of our core engineering pillars. clientcore labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clientcore pillar-performance The issue is related to performance, one of our core engineering pillars.
Projects
None yet
Development

No branches or pull requests

1 participant