Allow users to implement update asynchronously in Java natively

Offen
#2,056 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
api, backend

Rechercherichtung

Beginne damit, die vorhandene Unterstützung für asynchrone Aktivitäten zu überprüfen, auf die über ActivityExecutionContext.isUseLocalManualCompletion verwiesen wird, und vergleiche sie mit dem aktuellen Verhalten von Update-Handlern, das im Issue beschrieben wird. Done sollte eine native Möglichkeit bieten, ein Update später abzuschließen, ohne einen Thread auf das Ergebnis warten zu lassen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

Is your feature request related to a problem? Please describe.
Currently update handlers in Java are all run in their own threads. This means that if the update handler takes a long time and multiple updates are sent the workflow execution can consume lots of threads just waiting in update handlers.

Describe the solution you'd like
Support the ability to transform an update call into a Promise that can be completed later in another thread like the main workflow method .

Additional context
We have a similar feature to support async activities https://javadoc.io/doc/io.temporal/temporal-sdk/1.0.6/io/temporal/activity/ActivityExecutionContext.html#isUseLocalManualCompletion--

Currently users can do this with the existing SDK API, but it will still consume a thread waiting for the result to return in the handle. If the SDK had a native API for this we wouldn't need to wait in the thread.

Vorherrschende Sprache
Java
Sterne
447
Forks
278
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
28

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus temporalio/sdk-java

Alle Issues in temporalio/sdk-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.