
I would like to run a Bokeh Server application alongside another Tornado application (a Dask worker), sharing the same IOLoop. I’ve gone through the logic in bokeh/command/subcommands/serve.py and the bokeh Server object. From what I can tell there are two options:
- Use the command infrastructure. This will parse arguments for me, set up application objects, handlers, etc. and plug them into a server and then start that server. Unfortunately this assumes that it’s going to start and control the IOLoop itself with no other applications active.
- Build things manually. It appears that I want to create a bunch of applications with handlers, connect them up to a Server object and then finally call the start method of that object’s BokehTornado with start_loop=False. Unfortunately, there is a large amount of manual work here that is pretty error prone.
From a cursory glance it seems like there is a lot of very useful logic that is tied to using the command line interface. This makes sense given that it’s the common case, but it’s currently stopping me from using Bokeh server more widely throughout my application. Is there a clean way around this? If not then should I raise an issue?


