38
Matt Greenwood Scott Draves

Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

  • Upload
    pydata

  • View
    311

  • Download
    4

Embed Size (px)

DESCRIPTION

The Beaker Notebook is a new open source tool for collaborative data science. Like IPython, Beaker uses a notebook-based metaphor for idea flow. However, Beaker was designed to be polyglot from the ground up. That is, a single notebook may contain cells from multiple different languages that communicate with one another through a unique feature called autotranslation. You can set a variable in a Python cell and then read that variable in a subsequent R cell, and everything just works – magically. Beaker comes with built-in support for Python, R, Groovy, Julia, and Javascript. In addition, Beaker also supports multiple kinds of cells for text, like HTML, LaTeX, Markdown, and our own visualization library that allows for the plotting of large data sets. This talk will motivate the design, review the architecture, and include a live demo of Beaker in action.

Citation preview

Page 1: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Matt Greenwood

Scott Draves

Page 2: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Beaker is a notebook-style development environment for

working interactively with complex datasets.

Its polyglot architecture allows you to switch between

languages or add new ones with ease.

Page 3: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 4: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 5: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Beaker is Polyglot

Page 6: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Autotranslation

# set in Python

beaker.x = 10

// use in Javascript

beaker.x + 1

JSON

Page 7: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 8: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 9: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 10: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 11: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 12: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 13: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 14: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 15: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 16: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

server

client

Web Browser, HTML5, Angular, MVC

JSON

Doc

Model

nginx

Core Server

Jetty

Jersey

Jackson

Guice

Groovy

GroovyR Python Javascript…

Evaluator Plugins

IPython/ZMQ

Python

Output Plugins

HTML Plot Table …

R

Java/Rserve

Page 17: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 18: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

open source

polyglot

notebook

autotranslation

easy to extend

easy to use

Page 19: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

www.BeakerNotebook.com

Page 20: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Page 21: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Autotranslation

# set in Python

beaker.x = 10

// use in Javascript

beaker.x + 1

Page 22: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { }# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

// Groovy

Page 23: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

// GroovyCore Server

beaker: { }# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

Page 24: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker.x = 5+5

beaker: { }# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

Page 25: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker.x = 5+5

beaker: { }# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

set(“x”, 10)

Page 26: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker.x = 5+5

beaker: { }# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

se

t(“x

”, 1

0)

Page 27: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10 }# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

Page 28: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

“be

ake

r.x +

1”

Page 29: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

Page 30: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

Page 31: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

ge

t(“x

”)

Page 32: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

10

Page 33: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

10

Problem:

the request and

the reply are in

different threads

Page 34: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

1010

Problem:

the request and

the reply are in

different threads

Solution:

use a

java.util.concurrent.

SynchronousQueue

Page 35: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

beaker.x + 1

10

Page 36: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

⇒ 11

Page 37: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

11

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1

// Groovy

beaker.x = 5+5

# Python

⇒ 11

Page 38: Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook

Core Server // Groovy

beaker: { x: 10}# Python

beaker.x + 1 ⇒ 11

// Groovy

beaker.x = 5+5

# Python