Some Observations on Observer

The Applications tab in Observer displays a diagram of running applications and supervision trees. This is a really impressive capability, especially given that Observer was written decades ago.

However, we can (and should, IMHO) do better these days. For example:

  • Observer’s diagrams don’t scale gracefully. If there are dozens of processes in a pool, the user should be able to collapse that part of the diagram, hiding the details. Etc.

  • There’s also the aspect of discoverability and progressive disclosure. (PIDs such as “<0.110.0>” are a bit opaque…) So, the user should be able to learn a little by hovering over an icon and learn a lot more by clicking on it.

  • The diagrams only show a single view of the system. There are lots of graphs and trees that could be diagrammed, to good effect. Imagine being able to examine dependencies, message flows, process creation, etc.

Given the size of systems being built these days, it amazes me that developers can maintain a mental model of what’s going on. Yes, LLMs can help a lot, but at some point the human has to provide intent, assess behavior and results, etc. Chats and dashboards are part of the answer, but (IMHO) diagrams should be, as well.

Although creating a diagram-enabled browser for Elixir systems would have been just a pipe dream in the past, we now “have the technology” to make it happen:

  • There are a variety of open source diagramming tools (e.g., D3, Graphviz) that allow generation of static and/or dynamic diagrams. LLMs can use these tools directly and (for deterministic results) generate tools to do so.

  • Phoenix LiveView could generate and present desired web pages and diagrams “on the fly”. Other tooling (e.g., graph databases) could store supporting data. Finally, LLMs can do the heavy lifting of creating the needed code.

Frankly, I’m amazed that I haven’t seen any work in this direction. Am I missing something?

4 Likes

I know basically nothing about this topic, but I do know that mix xref graph can be used to graph dependencies. There is also this neat tool by @axelson which does a good job of visualizing the data:

Just mentioning in case you aren’t familiar with these.

3 Likes

I note that both DepViz and mix xref graph already use the DOT tool from the GraphViz project. FWIW, DOT can generate SVG files, which an LLM can manipulate to match the user’s preferences.