Pyoto as a webapp
The goal is to run Pyoto without playing with reverse-proxy configurations and be able to setup better resource scaling. With a modern web server you can run WSGI apps and control the number of workers needed to scale to your need, or even have all workers stop when the app is useless. We have in mind using Fusion Passenger which allows fine control over the workers.
The Pyoto daemon would be run separately, and the web server would then handle running the frontend workers by itself.
Thus, we would need to split the startup code, and ensure to decouple common resources (like logs).
Updated by Marc Dequènes about 6 years ago
I was able to run the frontend, but it does not solve anything releated to common resources.
The following Passenger tree was created:
├── app -> ../pyoto.git
├── kid -> app/kid
├── public -> app/static
The passenger_wsgi.py file is attached.
I had to take a few things from pyoto-main.py and lib/pyoto.py. I guess setting the application version should be done somewhere in lib/pyoto.py. I fear PyotoRoot would have to be split as it contains many things used in the daemon only.