The Methods & Tools Special Interest Group met today from 5 pm till 6:30 pm Central European Time.
Review of COBIA Phase III deliverables – Modifications to Reporting Common interface
U.S. Environmental Protection Agency (represented by Bill BARRETT), AmsterCHEM (represented by Jasper van BATEN), Bryan Research & Engineering (represented by Michael HLAVINKA), Michel PONS (contractor to CO-LaN as Chief Technology Officer).
Methods & Tools SIG reviewed the deliverables of the first work order pertaining to COBIA Phase III as assigned to AmsterCHEM: high-level design of marshalling and proof of concept through prototypes. The deliverables are a textual document and prototype codes.
The textual document explains what marshalling is, defines the requirements and constraints of marshalling, lists the software objects involved, explains the interactions between them through interfaces.
The server (callee) side proxy receives information over the boundary (vertical grey line in the picture above), makes a call on the server side component (callee) and sends the output back over the boundary. The client side proxy implements any function to be called by the client (caller) side component on the server, receives a call on this function from the client (caller), sends the input arguments over the boundary together with the request made to the server to perform the call, waits under the call is completed by the server, receives the outputs of the call, and then returns the outputs to the caller.
Three different mechanisms are necessary to create the proxies.
- precompiled proxies for known, i.e. CAPE-OPEN, interfaces,
- precompiled proxies provided by software vendors,
- proxies generated on the fly from the available type information.
The most complex mechanism automatically (on the fly) creates proxies for custom interfaces, interfaces not defined by the CAPE-OPEN standard.
In that case, for a server side proxy, code that makes a function call on the server, needs to be generated . This involves, depending on the calling convention and system-specific ABI, several low-level activities that include pushing (pointers to) arguments on the call stack, pushing the function address on the call stack, transferring control to the function after setting the return address. And, at the return address, popping the return value or getting the return value of a register. All rather complex and machine dependent activities. The client side proxy is even more complex, as it needs to provide an interface with function pointers, the function of which have to be implemented on the fly. To avoid part of the large complexity described above, the proposed solution is to depend on an external library: the foreign function interface. A proof of concept has been demonstrated with prototypes developed using libffi.
Methods & Tools SIG agreed that the proposal was sound and met the objectives. This assessment was passed to CO-LaN Management Board.
Next Methods & Tools SIG progressed on a modification of the Reporting Common interface specification regarding images provided by a PMC as report. There is a need for a PME, when requesting a report, to define a minimum set of properties that any image supplied by the PMC as report (such as a graph as image) must meet in order for such an image to be properly embedded in the overall report built by the PME. The issue is to avoid having images provided by a PMC as report subsequently distorted by the PME because the PME is unable to deal with images with some caracteristics.
Next meeting is scheduled for May 12, 2021.
Contact Bill BARRETT (representative of US Environmental Protection Agency, leader of the Methods & Tools Special Interest Group) should you wish to join the Methods & Tools Special Interest Group. Its charter is: “Improve integration, and expand utilization of Computer-Aided Process Engineering (CAPE) applications within the enterprise through identification and resolution of existing cross-cutting issues with the CAPE-OPEN platform, develop mechanisms for use of CAPE within other application domains, and incorporate advances in information technology into the CAPE-OPEN platform.”