First question one would asks is why having another PHP server when Flask is already there?
The architecture you are aiming deploys 3 servers: Bokeh server, Flask server and PHP server.
Do you have any requirements on how those servers will be physically allocated?
Setting up Bokeh server and Flask server on separate machines can be complex enough…
See here e.g. about Flask/Bokeh session handling: https://groups.google.com/a/continuum.io/forum/#!msg/bokeh/fu6ASwWeeDY/SkCTVR2bCwAJ
Another question is what type of application are you actually building?
Do you want live plotting with data streaming? webpages with BokehJS interaction? or both?
Going back to your PHP+Flask+Bokeh scenario: serving webpages with or without data-streaming should not be a problem (having PHP server acting as a proxy to load a SPA from Flask/Bokeh).
As far as I know once the page is served and loaded in the browser the communication is done directly between the Bokeh server and the webpage (so PHP server should not be involved).
The HTML controls (not Bokeh controls) on the page should however refer to the PHP server which in turn will communicate with the Flask REST API (e.g. to serve new type of plot from Bokeh server)
Having this said, it is difficult to understand the actual role of the PHP server there and I can only speculate on that without knowing the actual reasons…
Is it that Flask uses by default port 5000 and you want to use port 80? is it about https which is not default supported on Flask?
Maybe you could explain a little more about the application context and why are you targeting for this setup?
···
On Tuesday, February 5, 2019 at 2:16:26 AM UTC+1, Dave Wen wrote:
Hi folks,
My project is Flask+Bokeh to provide RESTful API to the frontend PHP web pages.
Currently, I see my plots on http://localhost:5000/bokeh
But I have no idea how to embed those plots into the PHP web pages.
any idea?
thanks,
Dave