knime-mpicbg / knime-scripting

knime-scripting includes scripting extensions for KNIME to integrate R, Matlab, Python and Groovy scripts. These extensions include a collection of nodes to develop and deploy templates in the respective languages.
https://github.com/knime-mpicbg/knime-scripting/wiki
Other
44 stars 25 forks source link

Run MATLAB headless #100

Closed fmeyenhofer closed 5 years ago

fmeyenhofer commented 5 years ago

The scripting integration uses matlabconsolectl to connect to MATLAB. This allows to minimize the matlab window, which could easily be implemented as node config or knime preference. This is not exactly headless, but could be a first step in the direction.

The first implementation was a matlab server, but this required installing the server first and had some other issues...

There is also an executable has an option -nodisplay. This would allow to implement a solution similar to the python nodes, where each node execution would create its own MATLAB session in the background. However, this has the following issues:

fmeyenhofer commented 5 years ago

Using the MatlabProxyFactoryOptions.setHidden() is somewhat problematic: All the nodes share the same MatlabConnector. the open in MATLAB node needs the UI and currently there is no mechanism to have separate connectors to different MATLAB instances with and without windows, but all the instances are treaded the same. Sovling this properly, means to re-think the MATLAB connection completely. Given that currently the gain of this would be not to have an additional click to minimise the MATLAB window, this seems an overkill.