“Increase number of languages to build and deploy apps in. OnDemand web apps are limited to apps written in Ruby, Python and Node. We want to extend this to other languages like PHP and Java.”
I am bringing up a web application thorough Passenger app or batch connect (interactive) app. The Web application is written in php + java script. In Open Ondemand roadmap, ondemand 2.0 will support PHP and Java. Is OSC already supporting PHP? Can you share the methods to use PHP through Passenger app or interactive app?
If you want to have an interactive app written PHP where the web app is made available to launch in OnDemand through an “interactive app plugin”, whose sessions are started by users typically through a batch job, then you can use any language as long as you understand how to start that web server. There are several challenges with this:
If the web app generates non-relative URLs in its HTML responses, you need to be able to configure the web app to know about the suburi it will be served from, which is created dynamically during job submission
If you are interested in launching web apps on the OnDemand web-host on-demand, similar to how the dashboard, files, shell, job composer, and active jobs apps launch, that is what this Scalability goal refers to with “extending the number of languages supported”.
For this, I’ve experimented using Passenger Generic Language Support within OnDemand to launch an app written in Go, and at OSC we are successfully using Passenger GLS outside of OnDemand to launch Shiny R apps in production.
The issue with GLS as it relates to OnDemand is that it starts the web processes listening on a TCP socket instead of an IPC socket like Passenger does with Ruby, Python, and NodeJS so that creates a security issue that we need to first solve. We are talking about placing the PUN in a container for 2.0 to solve this, but we haven’t done that yet.
After that is done, I imagine we would modify nginx_stage so that if a bin/passenger_app_start exists, then we add a config for GLS that looks something like: