Plans for a re-write of server-side apps?

Hi all,

I just noticed @bryevdv’s comment on the google group that “… requires using a bokeh-server, but writing server apps is something else we are in the process now of making much simpler.”

Server-apps are an important part of the Pycon talk I’m working on, so is there any way I can learn more about these plans before I’m too deep into finalizing my talk?

Many thanks,

Sarah Bird

Hi Sarah,

I think @bryevdv is mainly referring to the bokeh-server simpleapp PR.

There are many ideas going on regarding bokeh-server and how to make it easier, more powerful and flexible and FWIW this should be one of the priorities we should focus on. I think we could/should try to put some of those ideas down better in the short term (at least I should :slight_smile: ). I’m not sure though about how these will fit in the short-mid-long term plans. I’m sure Bryan have a better view about this.

In general we’d be happy to help you with what you need for your talk, so let us know if you have specific questions that we can address…

Fabio

···

On Tuesday, March 17, 2015 at 6:48:09 AM UTC+1, Sarah Bird wrote:

Hi all,

I just noticed @bryevdv’s comment on the google group that “… requires using a bokeh-server, but writing server apps is something else we are in the process now of making much simpler.”

Server-apps are an important part of the Pycon talk I’m working on, so is there any way I can learn more about these plans before I’m too deep into finalizing my talk?

Many thanks,

Sarah Bird

Its not a rewrite - it’s a simpler way of building some simple apps, which is layered on top of the old method

specifically:

https://github.com/bokeh/bokeh/blob/feature/simpleapp/examples/app/stock_applet/stock_app_simple.py

An excerpt:

    @simpleapp(select1, select2)
def stock2(ticker1, ticker2):
pretext = PreText(text="", width=500)
df = get_data(ticker1, ticker2)
source = ColumnDataSource(data=df)
source.tags = ['main_source']
p = figure(
title="%s vs %s" % (ticker1, ticker2),
plot_width=400, plot_height=400,
tools="pan,wheel_zoom,box_select,reset",
title_text_font_size="10pt",
)
p.circle(ticker1 + "_returns", ticker2 + "_returns",
size=2,
nonselection_alpha=0.02,
source=source
)
stats = df.describe()
pretext.text = str(stats)
hist1 = hist_plot(df, ticker1)
hist2 = hist_plot(df, ticker2)
line1 = line_plot(ticker1, source)
line2 = line_plot(ticker2, source, line1.x_range)
return dict(scatterplot=p,
statstext=pretext,
hist1=hist1,
hist2=hist2,
line1=line1,
line2=line2)
@stock2.layout
def stock2_layout(app):
widgets = AppVBoxForm(app=app, children=['ticker1', 'ticker2'])
row1 = AppHBox(app=app, children=['scatterplot', 'statstext'])
row2 = AppHBox(app=app, children=['hist1', 'hist2'])
all_plots = AppVBox(app=app, children=[row1, row2, 'line1', 'line2'])
app = AppHBox(app=app, children=[widgets, all_plots])
return app
@stock2.update(['ticker1', 'ticker2'])
def stock2_update_input(ticker1, ticker2, app):
return stock2(ticker1, ticker2)
@stock2.update([({'tags' : 'main_source'}, ['selected'])])
def stock2_update_selection(ticker1, ticker2, app):
source = app.select_one({'tags' : 'main_source'})
df = get_data(ticker1, ticker2)
if source.selected:
selected_df = df.iloc[source.selected, :]
else:
selected_df = df
hist1 = hist_plot(df, ticker1, selected_df=selected_df)
hist2 = hist_plot(df, ticker2, selected_df=selected_df)
app.objects['hist1'] = hist1
app.objects['hist2'] = hist2
app.objects['statstext'].text = str(selected_df.describe())
stock2.route("/bokeh/stocks2/")
···

On Mar 17, 2015 6:44 AM, “Fabio Pliger” [email protected]m.io wrote:

Hi Sarah,

I think @bryevdv is mainly referring to the bokeh-server simpleapp PR.

There are many ideas going on regarding bokeh-server and how to make it easier, more powerful and flexible and FWIW this should be one of the priorities we should focus on. I think we could/should try to put some of those ideas down better in the short term (at least I should :slight_smile: ). I’m not sure though about how these will fit in the short-mid-long term plans. I’m sure Bryan have a better view about this.

In general we’d be happy to help you with what you need for your talk, so let us know if you have specific questions that we can address…

Fabio

On Tuesday, March 17, 2015 at 6:48:09 AM UTC+1, Sarah Bird wrote:

Hi all,

I just noticed @bryevdv’s comment on the google group that “… requires using a bokeh-server, but writing server apps is something else we are in the process now of making much simpler.”

Server-apps are an important part of the Pycon talk I’m working on, so is there any way I can learn more about these plans before I’m too deep into finalizing my talk?

Many thanks,

Sarah Bird

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/b7fb8215-bff3-47c0-bab9-8f89a10161f4%40continuum.io.

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

Fabio, Hugo, thank you!

Hugo, that’s really helpful. Looks like that’s going ready to be merged, and forging ahead, so I’ll try and include SimpleApp.

Fabio, very exciting to see server-side develop more (along with actions plugin infrastructure and all the other cool things that are brewing)! You all are super responsive so I feel I’m getting all the support I need in preparation.

Thanks again, bird!

···

On Tuesday, March 17, 2015 at 4:31:31 AM UTC-7, Hugo Shi wrote:

Its not a rewrite - it’s a simpler way of building some simple apps, which is layered on top of the old method

specifically:

https://github.com/bokeh/bokeh/blob/feature/simpleapp/examples/app/stock_applet/stock_app_simple.py

An excerpt:

    @simpleapp(select1, select2)
def stock2(ticker1, ticker2):
pretext = PreText(text="", width=500)
df = get_data(ticker1, ticker2)
source = ColumnDataSource(data=df)
source.tags = ['main_source']
p = figure(
title="%s vs %s" % (ticker1, ticker2),
plot_width=400, plot_height=400,
tools="pan,wheel_zoom,box_        select,reset",
title_text_font_size="10pt",
)
p.circle(ticker1 + "_returns", ticker2 + "_returns",
size=2,
nonselection_alpha=0.02,
source=source
)
stats = df.describe()
pretext.text = str(stats)
hist1 = hist_plot(df, ticker1)
hist2 = hist_plot(df, ticker2)
line1 = line_plot(ticker1, source)
line2 = line_plot(ticker2, source, line1.x_range)
return dict(scatterplot=p,
statstext=pretext,
hist1=hist1,
hist2=hist2,
line1=line1,
line2=line2)
@stock2.layout
def stock2_layout(app):
widgets = AppVBoxForm(app=app, children=['ticker1', 'ticker2'])
row1 = AppHBox(app=app, children=['scatterplot', 'statstext'])
row2 = AppHBox(app=app, children=['hist1', 'hist2'])
all_plots = AppVBox(app=app, children=[row1, row2, 'line1', 'line2'])
app = AppHBox(app=app, children=[widgets, all_plots])
return app
@stock2.update(['ticker1', 'ticker2'])
def stock2_update_input(ticker1, ticker2, app):
return stock2(ticker1, ticker2)
@stock2.update([({'tags' : 'main_source'}, ['selected'])])
def stock2_update_selection(    ticker1, ticker2, app):
source = app.select_one({'tags' : 'main_source'})
df = get_data(ticker1, ticker2)
if source.selected:
selected_df = df.iloc[source.selected, :]
else:
selected_df = df
hist1 = hist_plot(df, ticker1, selected_df=selected_df)
hist2 = hist_plot(df, ticker2, selected_df=selected_df)
app.objects['hist1'] = hist1
app.objects['hist2'] = hist2
app.objects['statstext'].text = str(selected_df.describe())
stock2.route("/bokeh/stocks2/")

On Mar 17, 2015 6:44 AM, “Fabio Pliger” [email protected] wrote:

Hi Sarah,

I think @bryevdv is mainly referring to the bokeh-server simpleapp PR.

There are many ideas going on regarding bokeh-server and how to make it easier, more powerful and flexible and FWIW this should be one of the priorities we should focus on. I think we could/should try to put some of those ideas down better in the short term (at least I should :slight_smile: ). I’m not sure though about how these will fit in the short-mid-long term plans. I’m sure Bryan have a better view about this.

In general we’d be happy to help you with what you need for your talk, so let us know if you have specific questions that we can address…

Fabio

On Tuesday, March 17, 2015 at 6:48:09 AM UTC+1, Sarah Bird wrote:

Hi all,

I just noticed @bryevdv’s comment on the google group that “… requires using a bokeh-server, but writing server apps is something else we are in the process now of making much simpler.”

Server-apps are an important part of the Pycon talk I’m working on, so is there any way I can learn more about these plans before I’m too deep into finalizing my talk?

Many thanks,

Sarah Bird

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/b7fb8215-bff3-47c0-bab9-8f89a10161f4%40continuum.io.

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