Polynote by Netflix — A Unified Notebook for Writing Polyglot Code

Ravishankar Nair
4 min readSep 20, 2020

Let’s start writing some small snippet of code in the favorite Jupyter notebook. Please see below video snippet:

Figure 1: See the execution in a Jupyter notebook

As you see, the output is changing depending on which cell we execute. At the end, if we remove all assignments, you will see the variable is still accessible, as Notebook does not understand whether the variable was deleted. Cells can be executed in any order, mutating this global hidden state that in turn affects the execution of other cells. And you don’t have any mechanism to share the executional order you might have used during development.

Welcome Polynote

Netflix has come up with a nice approach to overcome this situation. Code interpretation from scratch allowed Polynote to do away with the global, mutable state. By keeping track of the variables defined in each cell, Polynote constructs the input state for a given cell based on the cells that have run above it. First let’s install it and get started:

Currently Polynote is available in Linux and Mac. Polynote consists of a JVM-based server application, which serves a web-based client. To try it locally, find the latest release on the releases page and download the attached polynote-dist.tar.gz file (you’ll find it under Assets). Unpack the archive:

--

--

Ravishankar Nair

Consultant, inspiring speaker, author and technology evangelist. Architecting the Unknown