Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
Asynchronous calls are mechanisms to execute actions in a decoupled fashion. There are different approaches for asynchronous calls, depending on the level of control that is required. Some of them are offered by CORBA, ACS and BACI implementations. For instance we have:
One approach for asynchronous calls based on the programming language functionality, is simply to use threading inside a method call, to execute the action in a separate thread and to return instantaneously.
A second approach based on design and programming language alone, is to populate queues with the actions that will be orchestrated by a separate thread.
Oneway is a concept in CORBA that is defined as a keyword in the IDL interface methods, which makes sure the caller continues with the execution without waiting for anything from the client. This is similar to threading/queuing options, but is stronger, in the sense that it is not possible to receive a return value nor to raise an exception.
The IDL itself has the information about the asynchronous mechanism:
The actual implementation is very simple:
Offshoots are the most basic form to report back to the caller. The base interface is actually empty:
This is by design, allowing anyone to extend such interface as they prefer. For instance:
Has a single method that can be called 'report', which has an 'in' parameter, stating whether there was an error. It could be used in the 'calibrate' example as follows:
Which would lead to an implementation (Assuming the oneway case) as follows:
The offshoot can be used with either of the 3 asynchronous mechanisms, and you will have to decide on one of them depending on your preferences and a trade-off limitations/requirements from each approach.
Callbacks are in fact a specialization of the Offshoot and are