Integrating Analysis Tools¶
Whereas it is feasible for an interpreter to perform an analysis on its own - in a lot of applications the analysis is a performed by a separate program (could be a third-party tool). Typically it is the plugin that handles the triggering and monitoring of the analysis tool. The plugin also handles the result feedback to the user.
Depending on the type of analysis, the expected load on a deployment and requirements on result visualization, webgme offers a couple of different built in options for handling the analysis.
Creating a process from the plugin¶
The most straight-forward approach is to invoke the analysis tool by creating a child-process from the plugin. The major draw-back of this is that the analysis tool would be running directly on the same host as the webgme server.
One way to come around this is to replace the default server-worker-manager in webgme with the docker-work-manager.
In this tutorial we will simply assume that OpenModelica is installed on the host machine and invoke the compiler/simulator from the plugin. (The code we written here can without modification be used with the docker-worker-manager approach so we’re not locking ourselves into a corner.)
An other approach is to use the webgme executor framework, where external workers attach themselves to the webgme server and handles jobs posted by, e.g. plugins.
Alternatively a custom webgme router can be created to proxy requests and handle results. From such router, practically any tools or services can be accessed and integrated with the user interface.