0

Backgroud: consumer data visualization app, scaling from a prototype to production.

Current setup: Front-end (React) takes some user input (say car make and model) and sends it to the backend as POST request. Backend (python/FastAPI) parses the request, runs some DB queries and calculations, generates a Bokeh plot and sends it to the frontend as JSON/string. The frontend shows this JSON in its specified div, and we're done. If the plot requires callbacks, they are implemented as CustomJS, with the callback again hitting that same API (with new args collected from the page, as needed), getting JSON and replacing the current plot with the newly received one.

Contemplated alternative setup: Backend sends only data and Bokeh plot is generated on the client side with BokehJS.

Questions

  1. What are pros and cons of the alternative?
  2. How does the JS interface of Bokeh compare to Python, in terms of:
    • maturity
    • documentation
    • features
    • flexibility
    • performance
    • anything else?
  3. Will it be harder or easier to maintain, extend, abstract/refactor these plots in JS as compared to Python?
  4. Is client- or server-side plot generation better suited to our use case where user interactions are not visual (natively supported by Bokeh like scroll etc.) but require new data from the server?
  5. Anything else we need to know?

Any advice would be much appreciated.

Tim
  • 236
  • 2
  • 8

0 Answers0