The architecture of the Bokeh system — depicted in the figure below — involves the decoupling of an application programming interface (API), written using the Bokeh Python library, from the browser-side rendering of JavaScript objects, supported by the BokehJS backend. The Bokeh library enables programmers to construct figures and layouts, process data, and specify various forms of data interaction. From that Python code, JSON objects are generated and communicated to BokehJS for rendering in a browser backend, such as HTML Canvas, WebGL, or SVG. The default backend is HTML Canvas, but other backends can be specified for particular use cases.

This architecture provides several useful features:

  • It allows developers to write their visualization code in Python, a higher-level language with a rich ecosystem of additional packages, rather than in JavaScript.
  • It allows for some aspects of user interaction to take place directly in the browser, without requiring return communication to the Python frontend.
  • It enables programmers to develop application frontends in other languages, such as R, Scala, and Julia, which only need to be able to generate BokehJS-compatible JSON objects in the same manner that the default Python library does.
Bokeh software architecture
Bokeh Architecture Diagram - The Bokeh system consists of the Bokeh library, the BokehJS backend that runs in a browser, and the JSON objects that are generated by the library for rendering in the browser.
(source: https://docs.bokeh.org/en/latest/docs/dev_guide/bokehjs.html)
 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Inclusivity Statement