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
- You need to configure some type of authentication for the app. If the app doesn’t support it by default you could stick a sidecar proxy in front to provide that authentication. We did that to launch an R Shiny app and there is an example of providing an authenticating proxy for using Tensorboard from Stanford RC.
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:
copy passenger_app_start_command "/path/to/app/bin/passenger_app_start $PORT";
So for PHP you would need a web server that can serve that app, and then Passenger would launch that app using the provided command.