How to host local executable file on cloud and execute them via Mendix UI

0
We have designed Mendix UI and designed a JAVA action to execute local executable. To enable it to be used by others as service, we want to have this solution purely a web based. We have covered one part of project to execute local executable with Mendix UI but how to complete this solution by taking executable to cloud.
asked
2 answers
1

As an alternative to Ockert's answer: you can include the .exe file in the resources folder. You can get this folder using the following Java call (see the runtime API docs):

Core.getConfiguration().getResourcesPath()

 

answered
0

You need to ensure that the executable can in fact run on the host environment, be that cloud or on premise. A good idea is to have it statically linked with all dependencies in order to facilitate that, and also set permissions for execution

Create an upload interfaces for what will be your binary executables, that they can be persisted in the database, as some cloud environments will wipe the VM after restarting, and your binaries will no longer be on the file system. These binaries will have to be deployed to some folder, e.g. the host temp directory at /tmp or the application temp directory obtainable by com.mendix.core.Core.getConfiguration().getTempPath(). In the case of a VM wipage situation, you will have ensure redeployment of your binaries after startup.

Once deployed the path may be used in the invocation of your binaries.

And as Abdullah said, its a cool idea to expose your invocations on a webservice, that way you can test it using curl and also load test it to see where it breaks

answered