-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R&D: Service map graph visualization #25539
Comments
Pinging @elastic/apm-ui |
@jasonrhodes can you describe me a bit better what type of graph you are looking to draw and what kind of relationships and layout you are going to draw? I've done in the past a lot of work with various graph libraries, from a plain d3 force layout to cytoscape.js, sigmajs. If you can detail me the constraints and the idea of layout I can suggest you some ways to go. The new EUIChart implementation is a reimplementation from scratch of the xy charts and doesn't use any existing vis library. Here maybe also @monfera can support you on a graph library to choose. So to recap, it will be great to have the following specification:
|
@markov00 sure! I'll try to answer your questions below:
I think force layout or similar is going to be required to show nodes in the least confusing way possible. There will be a concept of a "primary node" for the first iteration of this feature, which would be the service you are looking at, and it should probably look like the rest of the nodes proceed from that primary one in some way, if possible. Where the others go after that is less important, but having them deterministically go to the same place on refresh or subsequent visits to the same map (with the same nodes) would probably be a good thing if possible.
/shrug! Probably need to make sure it works with a lot, but as usual, we aren't sure how many services a user might have. I think by far the most common case will be only a few nodes at a time, though (less than 10, possibly less than 5).
Some kind of mobile-friendly hover/click hybrid on nodes and edges is probably enough for us for now. We plan to have data about the node and the edge that we'd like to display tooltips for in each case.
Not strictly necessary. :) |
Hi, weighing in here per @snide's suggestion because we've tackled a similar "possibly unbounded DAG visualization" problem in the Logstash Pipeline Monitoring UI in Kibana and wanted to share some lessons we learnt. In the first version of this UI, we used the webcola library to layout the Logstash pipeline DAG, giving the library certain constraints to come up with a force-directed layout. This worked well for small DAGs, particularly ones with few edges (since one of the constraints was to try and minimize edge overlaps or crossings). But when users tried to visualize more complex DAGs, things got messy fast. Eventually we realized that we could get away with a simpler layout that was more representative of a Logstash pipeline configuration anyway. So we ended up removing the original DAG layout implementation and introducing a simpler layout instead. However, before we had the epiphany that we could get away with a simpler layout, we tried to think of how we could scale up the original DAG layout visualization. I'll share some of our thoughts as best as I can recall now (@andrewvc, @justinkambic please feel free to chime in and help me out if I missed anything):
Hope some of the above lessons are helpful to you. Happy to answer follow up questions as well! |
Excellent writeup @ycombinator . The key takeaway I have is that rendering arbitrary topologies quickly and beautifully is very hard. The usual advice of making it work for the simple case then expending effort to make the complex case work doesn't really apply. Our initial progress on simple small graphs was deceptive. Once the graphs increased in complexity rendering them in a way that was actually useful to anyone became impossible. This isn't just about the mathematical complexity of determining these layouts. At a certain size a graph is just a hard to trace visually for a human (though they look cool). I'm not familiar with the domain here, but if you think it will be at all common for there to be larger graphs I'd strongly recommend having a large test case as a part of early experiments. |
Echoing what others have said - it's worth defining the maximum level of complexity you're prepared to handle and the contingency you'll display in that case as an early part of the design. Based on what I've read here it sounds like the structures we're talking about don't have the same complexity concerns as Logstash pipelines, but it's still valuable to be cognizant of the issues @ycombinator and @andrewvc mentioned. |
Oh, one note about cytoscape. It's pretty limited in terms of rendering. IIRC they've moved away from SVG to canvas, which is faster to render, but often yields blurry results for custom elements (and has obvious accessibility issues) |
Interesting discussion folks! Minor addition: @jasonrhodes you mentioned determinism, it's likely not news that as of v4.* @markov00 I haven't done much graph visualization other than tampering with Sankey internals, which is in theory adequate for DAG visualization as basically I agree with the sentiment here that it's next to impossible to meaningfully visualize large graphs, maybe the trick is to somehow have ways for aggregating less interesting areas of the graph, and/or filtering non-relevant parts, or adaptively emphasizing the part in focus (eg. via node size and opacity, link saliency, drawing these on top) and perhaps providing navigation analogous to panning, zooming, drill-down, filtering etc. |
I want to share this repo that can be maybe useful to compute a bit faster a graph force layout: |
@jasonrhodes the design is pretty! |
@katrin-freihofner We might not need this issue since the POC implementation has started here: #42120. Either way, this looks like a design issue, so I've moved it to the Design board. |
Closing this in favor of: #42120 |
We need to test drive a few graph visualization options with a small proof-of-concept to determine what will work the best for the Service Maps UI.
We should start by considering React Vis force-graph (https://github.com/uber/react-vis-force) because it is the same chart library family we are currently using.
We should also loop in @markov00 to see what he's building for the visualization group and if there is any overlap we should be aware of. Basic design direction below:
The text was updated successfully, but these errors were encountered: