Skip to content

Version 2.0

Closed May 21, 2024 100% complete

A rework of the UI frontend using websockets and ScalaJS.

Key objectives:

  1. The UI, as currently implemented, has a lot of rough edges. 2.0 is a complete ground-up rewrite of the UI to eliminate the source of these papercuts.
    • React is not typesafe. This makes the code incredibly hard to maintain, especially given how much glue code there is wiring events …

A rework of the UI frontend using websockets and ScalaJS.

Key objectives:

  1. The UI, as currently implemented, has a lot of rough edges. 2.0 is a complete ground-up rewrite of the UI to eliminate the source of these papercuts.
    • React is not typesafe. This makes the code incredibly hard to maintain, especially given how much glue code there is wiring events and data through multiple layers of the reactive structure. The rewrite uses ScalaJS (See #60); Apart from stronger typechecking of internal code to avoid missed glue, the rewrite also shares code with the backend to ensure typesafety of the wire protocol.
    • React is slow. Any changes to the state of a react component force a full re-render of the node, even if it's only a child component that changes. Additionally, there is no support for incremental changes in response to list updates. The rewrite uses Rx, which allows more fine-grained reactivity, while decoupling conceptual and layout structures. The rewrite also defines a customized Reactive List structure that avoids unnecessary DOM re-layouts when elements are added or removed to a list.
    • The polling delay while scripts are running is slooooooow. The revised version uses websockets for push-based updates. (See #68)
  2. Mimir-API exists exclusively for the benefit of Vizier, and there is a significant amount of duplication between Vizier and Mimir-API. For example, org.mimirdb.data.Catalog plays virtually the same role as Vizier's Artifacts class, creating unnecessary work when managing datasets in Vizier (You need to allocate the output artifact, then separately create the dataset in Mimir). There's also already a few cases where it is really beneficial to break the Mimir abstraction around Spark... At this point, we may as well just define a dataset management layer directly in Vizier. (see #85)
  3. Mill is a far simpler build tool than SBT, and has better support for ScalaJS/ScalaJVM cross-compiled projects. We want to switch to mill.
  4. If time permits, this will also be a good opportunity to build in a more interactive spreadsheet mode that uses websockets and an interactive "Session" to build Vizual scripts rather than directly appending to the notebook.

This milestone is closed.

No open issues remain. View closed issues or see open milestones in this repository.