You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the only way to make data modifications from within an observable stream handler is to setup a second application and make a call to it (this forcing a transaction creation). This is inconvenient and should be improved:
API calls made within an Application should also have SAVEPOINTs associated with them. This allows for better error handling. More importantly it this allows for transactions to be kicked off outside of an external API call context. A perfect example of this is performing a modification within an Observable stream handler.
To accomplish this every @Api() call should be instrumented with a transactional wrapper. This means that there should be code generated specifically for the @Api() decorators (and an exception needs to be added to @airport/taxiway not to strip that code). The instrumented code will:
reach out to AIRport server and forward the request to the AIRport server - which will start a nested transaction
wait for a response from the AIRport server and return the results
The instrumented code should only be invoked if the call wasn't made externally (there should be a flag in the @airport/tower harness to disable the instrumented code for external calls).
Only the @Api() calls that return Promises will be instrumented (can't do transactions from within calls that return Observables).
NOTE: An alternative implementation would start and stop transactions but that would double the amount of messaging required between the App Frames and the parent window (in Web Mode).
The text was updated successfully, but these errors were encountered:
Right now the only way to make data modifications from within an observable stream handler is to setup a second application and make a call to it (this forcing a transaction creation). This is inconvenient and should be improved:
API calls made within an Application should also have SAVEPOINTs associated with them. This allows for better error handling. More importantly it this allows for transactions to be kicked off outside of an external API call context. A perfect example of this is performing a modification within an Observable stream handler.
To accomplish this every @Api() call should be instrumented with a transactional wrapper. This means that there should be code generated specifically for the @Api() decorators (and an exception needs to be added to @airport/taxiway not to strip that code). The instrumented code will:
The instrumented code should only be invoked if the call wasn't made externally (there should be a flag in the @airport/tower harness to disable the instrumented code for external calls).
Only the @Api() calls that return Promises will be instrumented (can't do transactions from within calls that return Observables).
NOTE: An alternative implementation would start and stop transactions but that would double the amount of messaging required between the App Frames and the parent window (in Web Mode).
The text was updated successfully, but these errors were encountered: