Embedding bokeh into Atlassian Confluence

Hi guys,

I am trying to embed bokeh interactive plots into the confluence. I believe it鈥檚 a way better than matplotlib static images on the website :wink:

Confluence itself is hosted locally on the server in laboratory, to which all researchers have access. Here is what I am struggling with:

What is the best workflow to run the bokeh server in order to host multiple applications/plots? I suppose that each of the experiments will be in separate directory (corresponding to wiki page) containing multiple files for various plots (embedded into confluence). But how can I run a single instance of server and allow it to find those directories automatically? I recall that whenever I did bokeh serve afile.py, once the file was changed, reloading the page didn鈥檛 update the plot to the latest version.

Is there an easier way to allow researchers to add their plots into some directory and then embed this into the page?

Many thanks.

There is the intent to add a "develop" mode to the Bokeh server that would automatically reload app code when the source files change, but no one has had the bandwidth to look into implementing it yet, unfortunately. I would also not envision that mode being suitable for "production" deployments, but perhaps in a small lab setting it could be useful or OK. However, I'm not clear that this would cover your use-case as the intent was only that already-running apps would be monitored, not that new ones (which could be located anywhere on the filesystem) would also be loaded.

So in general my inclination is to recommend coordinating at a higher level. That is to say, just run a separate Bokeh server instance for every app (they are very lightweight. Think the Jupyter notebook server --- no one balks as running however many of those they need, but it is no less complicated than the Bokeh server) and have some other process monitor the file system and start/restart the Bokeh server instances as needed. There are various watchdog/supervisor projects that could be used to automate this in a robust fashion. Salt and Supervisord is some options but there are others.

But this would definitely be a little work to do. This "multi-user shared publishing" is specifically called out as the use case that a single Bokeh server is *not* very good for out of the box:

聽聽http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#shared-publishing

Apart from rolling your own infrastructure to coordinate things, there will likely very soon be commercial offerings around this use-case, which I'd be happy to discuss, if that is ever of interest.

Thanks,

Bryan

路路路

On Aug 3, 2016, at 10:48 AM, [email protected] wrote:

Hi guys,

I am trying to embed bokeh interactive plots into the confluence. I believe it's a way better than matplotlib static images on the website :wink:
Confluence itself is hosted locally on the server in laboratory, to which all researchers have access. Here is what I am struggling with:

What is the best workflow to run the bokeh server in order to host multiple applications/plots? I suppose that each of the experiments will be in separate directory (corresponding to wiki page) containing multiple files for various plots (embedded into confluence). But how can I run a single instance of server and allow it to find those directories automatically? I recall that whenever I did bokeh serve afile.py, once the file was changed, reloading the page didn't update the plot to the latest version.

Is there an easier way to allow researchers to add their plots into some directory and then embed this into the page?

Many thanks.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/083e066b-2a47-4d5c-88be-e84fc54e66a4%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thank you very much for your response Bryan. I will go for multiple server - multiple application approach.

W dniu czwartek, 4 sierpnia 2016 15:13:34 UTC+1 u偶ytkownik Bryan Van de ven napisa艂:

路路路

There is the intent to add a 鈥渄evelop鈥 mode to the Bokeh server that would automatically reload app code when the source files change, but no one has had the bandwidth to look into implementing it yet, unfortunately. I would also not envision that mode being suitable for 鈥減roduction鈥 deployments, but perhaps in a small lab setting it could be useful or OK. However, I鈥檓 not clear that this would cover your use-case as the intent was only that already-running apps would be monitored, not that new ones (which could be located anywhere on the filesystem) would also be loaded.

So in general my inclination is to recommend coordinating at a higher level. That is to say, just run a separate Bokeh server instance for every app (they are very lightweight. Think the Jupyter notebook server 鈥 no one balks as running however many of those they need, but it is no less complicated than the Bokeh server) and have some other process monitor the file system and start/restart the Bokeh server instances as needed. There are various watchdog/supervisor projects that could be used to automate this in a robust fashion. Salt and Supervisord is some options but there are others.

But this would definitely be a little work to do. This 鈥渕ulti-user shared publishing鈥 is specifically called out as the use case that a single Bokeh server is not very good for out of the box:

    [http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#shared-publishing](http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#shared-publishing)

Apart from rolling your own infrastructure to coordinate things, there will likely very soon be commercial offerings around this use-case, which I鈥檇 be happy to discuss, if that is ever of interest.

Thanks,

Bryan

On Aug 3, 2016, at 10:48 AM, [email protected] wrote:

Hi guys,

I am trying to embed bokeh interactive plots into the confluence. I believe it鈥檚 a way better than matplotlib static images on the website :wink:

Confluence itself is hosted locally on the server in laboratory, to which all researchers have access. Here is what I am struggling with:

What is the best workflow to run the bokeh server in order to host multiple applications/plots? I suppose that each of the experiments will be in separate directory (corresponding to wiki page) containing multiple files for various plots (embedded into confluence). But how can I run a single instance of server and allow it to find those directories automatically? I recall that whenever I did bokeh serve afile.py, once the file was changed, reloading the page didn鈥檛 update the plot to the latest version.

Is there an easier way to allow researchers to add their plots into some directory and then embed this into the page?

Many thanks.


You received this message because you are subscribed to the Google Groups 鈥淏okeh Discussion - Public鈥 group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/083e066b-2a47-4d5c-88be-e84fc54e66a4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Adrian,

did you manage it? If yes, how did you include the bokeh plots in your confluence pages? I tried with the 鈥渉tml-include鈥 makro, but it doesn鈥檛 show anything.

Thanks,

Exi

Same problem here. I generate the html file with bokeh. I would like to manually copy and paste the html code to a Confluence page with the html macro. However every time I d that the page crashes. I have the impression that the html macro does not allow a lot of scripting

I have zero experience with or access to confluence so I can鈥檛 advise directly. Execution of JS is a hard requirement for live Bokeh plots or apps. This link suggests that is possible:

If JS execution is not possible then only static PNG or SVG exports will be possible.