sure how to handle my use case. The purpose of my example is to
stream data (say memory of a python process) from a python code
to the bokeh server to that users can monitor the memory of each
forked process of their simulation. As a start, users will only
view the plots on the Bokeh server. How can I do this from your
perspective?
For
multiple users, you are always really going to want to use the
“full native server” app, i.e. “bokeh serve myapp.py” style,
rather than using bokeh.client and push_session in a separate
python proecess. There are lots of examples under examples/app
in the GitHub repo.
Thanks,
Bryan
> On Oct 18, 2016, at 6:53 PM, bherman <herm...@gmail.com >
wrote:
>
> I am fairly new to Bokeh and am trying to stream data to
a Bokeh server. I stand up a Bokeh server using: bokeh serve
>
> Then in a separate script, I connect to the server,
create a new session and start streaming data. When I open on
a single firefox tab I see the data streaming. However, when I
connect on an additional tab (simulating multiple users
connecting to the Bokeh server) it is frozen. What is the
cause of this and what can I do so that “multiple users” can
connect and view the streaming data?
>
> from bokeh.client import push_session
> from bokeh.document import Document
> from bokeh.models.sources import ColumnDataSource
> from bokeh.plotting import figure
> import time
>
> session = push_session(Document(), session_id='lynx',
url="http://localhost:5006 ")
>
> data = ColumnDataSource(dict(x=[], y=[]))
>
> plot = figure()
> plot.line('x', 'y', source=data)
> session.document.add_root( plot)
>
> for i in xrange(1000):
> data.stream({'x': [i], 'y': [i]})
> print('Finished Iteration', i)
> time.sleep(2)
>
> --
> 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 bokeh+un...@continuum.io .
> To post to this group, send email to bo...@continuum.io .
> To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/570c59ef-5b49-42da-9383-da9d22d65305%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/570c59ef-5b49-42da-9383-da9d22d65305%40continuum.io) .
> For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout) .