I am trying to add two pages to bokeh application: one to stop the server (GET to /app/stop), and one to check the server health (GET to /app/ping responds pong).
Currently I am working on implementing solution by embedding bokeh server into tornado, but that is fairly verbose way and maybe I am missing something. Can someone can suggest simpler approach?
It doesn’t look that verbose - the only code that’s not relevant to plotting itself is IndexHandler and five lines to create Bokeh Application and Server and to start the server.
And to add “/app/stop” and “/app/ping” endpoints, you just have to implement two RequestHandlers - just like the IndexHandler in the example.
Regards,
Eugene
···
On Monday, November 13, 2017 at 7:39:38 PM UTC+7, Timur Zaripov wrote:
Hello everyone,
I am trying to add two pages to bokeh application: one to stop the server (GET to /app/stop), and one to check the server health (GET to /app/ping responds pong).
Currently I am working on implementing solution by embedding bokeh server into tornado, but that is fairly verbose way and maybe I am missing something. Can someone can suggest simpler approach?
After your message I made another attempt and finally figured out what was wrong with application path and it works now. The issue was in the way tornado and bokeh serve deal with prefix.
Thank you for the swift response and suggestion! I will manage it from this point.
With best regards,
Timur.
···
On Monday, 13 November 2017 15:51:02 UTC+3, Eugene Pakhomov wrote:
It doesn’t look that verbose - the only code that’s not relevant to plotting itself is IndexHandler and five lines to create Bokeh Application and Server and to start the server.
And to add “/app/stop” and “/app/ping” endpoints, you just have to implement two RequestHandlers - just like the IndexHandler in the example.
Regards,
Eugene
On Monday, November 13, 2017 at 7:39:38 PM UTC+7, Timur Zaripov wrote:
Hello everyone,
I am trying to add two pages to bokeh application: one to stop the server (GET to /app/stop), and one to check the server health (GET to /app/ping responds pong).
Currently I am working on implementing solution by embedding bokeh server into tornado, but that is fairly verbose way and maybe I am missing something. Can someone can suggest simpler approach?
After your message I made another attempt and finally figured out what was wrong with application path and it works now. The issue was in the way tornado and bokeh serve deal with prefix.
Thank you for the swift response and suggestion! I will manage it from this point.
With best regards,
Timur.
On Monday, 13 November 2017 15:51:02 UTC+3, Eugene Pakhomov wrote:
It doesn’t look that verbose - the only code that’s not relevant to plotting itself is IndexHandler and five lines to create Bokeh Application and Server and to start the server.
And to add “/app/stop” and “/app/ping” endpoints, you just have to implement two RequestHandlers - just like the IndexHandler in the example.
Regards,
Eugene
On Monday, November 13, 2017 at 7:39:38 PM UTC+7, Timur Zaripov wrote:
Hello everyone,
I am trying to add two pages to bokeh application: one to stop the server (GET to /app/stop), and one to check the server health (GET to /app/ping responds pong).
Currently I am working on implementing solution by embedding bokeh server into tornado, but that is fairly verbose way and maybe I am missing something. Can someone can suggest simpler approach?