FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Async Kotlin client in Java SDK · Issue #67683 · apache/airflow · GitHub

/ airflow Public

Async Kotlin client in Java SDK #67683

Description

Java doesn’t do coroutines, so the current Client implementation is sync. But Kotlin does, and we might benefit from a different async client. I think we can do it like this:

  1. Add an AsyncTask protocol that has an suspend fun execute instead of the sync execute function.
  2. Create an AsyncClient class to use instead of Client. suspend fun execute(client: AsyncClient, context: Context).
  3. When the task is executed, check which protocol is used. Wrap runBlocking around the async task.
  4. Make the annotation processor detect suspend fun so the same @Builder.Task can be used on both sync and async and automatically does the right thing.

The only question is whether we just add Async to both Task and Client. Should the sync version be renamed? (BlockingTask & BlockingClient?)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    In progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL