question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Generate map of an entire system

See original GitHub issue

Feature Suggestion

Using the <DependencyGraph> component, visualize a map of an entire system.

image

In @Fox32 's #4392, among other PRs, we’re really starting to flesh out the linkages that the individual elements in the catalog include. We’re getting tables, pages in the org plugin, info on the entity AboutCards, etc.

The current system model is documented here: https://backstage.io/docs/features/software-catalog/system-model#ecosystem-modeling

Visualizing this model representing the as-is state, provides the following benefits:

  • Shows the current state of the system, as opposed to a ideal intended architecture
  • Allows new users to more easily understand how all of the components fit together
  • Provides those performing operations a better understanding of impacts of service degredation
  • Identifies gaps in an intended architecture: are we missing an API? maybe it exists but it hasn’t yet been added to the catalog? etc.

This example just uses this rough code:

 const exampleNodes = [
    { id: 'supporting-functions-domain' },
    { id: 'reporting-system' },
    { id: 'service-a' },
    { id: 'service-b' },
    { id: 'service-b' },
    { id: 'corporate-reporting-website' },
    { id: 'api-a' },
    { id: 'api-b' },
  ];
  
  const exampleEdges = [
    { from: 'reporting-system', to: 'supporting-functions-domain', label: 'part of' },
    { from: 'api-a', to: 'reporting-system', label: 'part of' },
    { from: 'api-b', to: 'reporting-system', label: 'part of' },
    { from: 'service-a', to: 'reporting-system', label: 'part of' },
    { from: 'service-b', to: 'reporting-system', label: 'part of' },
    { from: 'service-b', to: 'reporting-system', label: 'part of' },
    { from: 'corporate-reporting-website', to: 'reporting-system' },
    { from: 'corporate-reporting-website', to: 'reporting-system', label: 'part of' },
    { from: 'service-a', to: 'api-a', label: 'provides' },
    { from: 'service-b', to: 'api-b', label: 'provides' },

  ];

  ... snip ...

  return (
            <DependencyGraph
                nodes={exampleNodes}
                edges={exampleEdges}
                paddingX={50}
                paddingY={50}
                direction={'BT'}
              />
  );

Possible Implementation

  • I feel like this should be front and center as a simple way to digest a system, before drilling down further into tables of information, so maybe visible on the main System card in the org plugin? And/or, potentially exposable by the new explore plugin in some way as well, but I’m sure it can be iterated. But to be honest, once the component itself exists and is put into the code base, the project can continue to iterate as it finds it’s ideal home.
  • Each element in the graph should ideally be clickable, but if not in the first iteration I think that’s fine.

Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
andrewthauercommented, Feb 10, 2021

@adamdmharvey - This is really neat 🌮! We’ve been slowing starting to use C4 Model to describe systems and I think the Backstage ecosystem model maps quite nicely to the context/container/component diagrams within C4. Been meaning to try to model out one our our systems in the catalog. Would love to collaborate and/or help out on this 😄.

2reactions
adamdmharveycommented, Feb 9, 2021

I took a very quick stab at this yesterday, and wanted to just share here for feedback. I’d likely need to submit a draft PR for collaboration as the more advanced JavaScript programming is a bit beyond my skills.

image

  • In the picture, the map is still mostly static but I do generate the system name dynamically as a start.
  • This includes a new <SystemDiagram> card. At the moment, I placed it in plugin-catalog - does that make sense?
  • To freben’s point re hot take, I can see two ways of doing this, any thoughts on either?
    • Use the getEntityRelations() helper in a loop, collecting the relations suffixing results to the nodes/edges arrays.
    • Use the getEntities() for everything in a massive catalog in mem, and then loop through that (is this what you were eluding to @freben ?)

It’s for sure that last point I’ll be weak on, and to be fair what I did so far is the “easy part”. If others are willing, could open up a branch in the repo rather than my fork and throw up what I’ve got to see if it sticks. There’s free 🍕 in it for you. 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a spatial map series—ArcGIS Pro | Documentation
A spatial map series generates a set of output pages by taking a single layout and iterating over a set of map extents....
Read more >
Map-making, Step by Step - Esri
Map -making, step by step · Decide where you are mapping. Think about what kind of extent and scale you want. Then make...
Read more >
Create a Map from Excel Spreadsheet Data, Mapline Mapping ...
With Mapline you can easily create a map from Excel spreadsheet locations! Just paste your data to see a map within seconds.
Read more >
Whole System Mapping - Exercise - VentureWell
Step 1: Create a whole system map of your product. Time Estimate: 30—60 minutes. Sketch a mind-map of your product's (or service's) whole...
Read more >
Create or open a map - Computer - My Maps Help
Use My Maps to create or view your own maps. Create a map On your computer, sign in to My Maps. Click Create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found