Running Bokeh server with asyncio

Hi.
Inspecting the source this seems to be possible, but wanted to check if there is direct support to it, instead of me changing some distribution files.

The ipython application I’m working on, hooks up an asyncio loop to ipythons PyOS_inputhook, allowing me to integrate inprocess the console input, my asyncio application and tornado webserver with asyncio loop.

I would like to have it launching bokeh server, so that the application was self contained, rather than having to start server in separate shell.

Looking at start.py of server, seems that it should be a question of simply replacing

ioloop.IOLoop.instance().start()

with tornado.platform.asyncio’s AsyncIOMainLoop().install().

Now, before I start messing up distribution files, is there a previously proper tested way to embed server in asyncio’s looped app ?

Thanks

I'm not sure offhand though what you describe sounds sensible. Can you make this an issue on GH? Then we can more easily solicit some other opinions. Perhaps this configuration can be an option at startup.

Thanks,

Bryan

···

On Dec 3, 2014, at 12:20 AM, Ricardo <[email protected]> wrote:

Hi.
Inspecting the source this seems to be possible, but wanted to check if there is direct support to it, instead of me changing some distribution files.

The ipython application I'm working on, hooks up an asyncio loop to ipythons PyOS_inputhook, allowing me to integrate inprocess the console input, my asyncio application and tornado webserver with asyncio loop.
I would like to have it launching bokeh server, so that the application was self contained, rather than having to start server in separate shell.

Looking at start.py of server, seems that it should be a question of simply replacing

    ioloop.IOLoop.instance().start()

with tornado.platform.asyncio's AsyncIOMainLoop().install().

Now, before I start messing up distribution files, is there a previously proper tested way to embed server in asyncio's looped app ?

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/238ba6fb-3973-488f-8bb5-a0bb6518bca5%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

I think a better way is for you to create your own startup script - I can demonstrate how to do that tomorrow. There are a ton of deployment options for web applications, and for many of them even having a bokeh-server script doesn't make sense (like gunicorn for example)

···

On 12/05/2014 04:28 PM, Bryan Van de Ven wrote:

I'm not sure offhand though what you describe sounds sensible. Can you make this an issue on GH? Then we can more easily solicit some other opinions. Perhaps this configuration can be an option at startup.

Thanks,

Bryan

On Dec 3, 2014, at 12:20 AM, Ricardo <[email protected]> wrote:

Hi.
Inspecting the source this seems to be possible, but wanted to check if there is direct support to it, instead of me changing some distribution files.

The ipython application I'm working on, hooks up an asyncio loop to ipythons PyOS_inputhook, allowing me to integrate inprocess the console input, my asyncio application and tornado webserver with asyncio loop.
I would like to have it launching bokeh server, so that the application was self contained, rather than having to start server in separate shell.

Looking at start.py of server, seems that it should be a question of simply replacing

     ioloop.IOLoop.instance().start()

with tornado.platform.asyncio's AsyncIOMainLoop().install().

Now, before I start messing up distribution files, is there a previously proper tested way to embed server in asyncio's looped app ?

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/238ba6fb-3973-488f-8bb5-a0bb6518bca5%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.