Transcript
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


Top Related