5

The Spotify System Model: Automated Architecture Visualization at Spotify

 1 year ago
source link: https://www.infoq.com/news/2022/07/spotify-system-model-c4/?itm_source=infoq&itm_medium=popular_widget&itm_campaign=popular_content_list&itm_content=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The Spotify System Model: Automated Architecture Visualization at Spotify

Jul 27, 2022 2 min read

Spotify engineers recently published how they standardized architecture diagrams at the company. They defined a standard system model named the Spotify Software Model and adapted the C4 model to visualize it. This combination created a shared language used across the organization, which helps communication, aids decision-making, and supports Spotify's software's evolution.

Renato Kalman, senior engineer, and Johan Wallin, engineer at Spotify, explain the motivation for creating this framework:

Architectural diagrams are the bread and butter of software design and a foundational tool for communication and collaboration on software development. At Spotify, we have an incredibly complex network of thousands of interlinked software systems owned by hundreds of teams, so having a simple way to visualize these connections is essential. While capturing all of our software in one large diagram is technically possible, it would be very hard to understand and navigate. ​​We need tools to look at our architecture at different abstraction levels in order to make good design decisions and evolve our software in a sustainable way.

Spotify engineers store metadata about their software components in a software catalogue. To support standard architecture diagrams, they created the Spotify System Model, a set of core entities and abstractions that Spotify engineers can use to synthesize data about their software health, ownership, and dependencies. "We believe that a solid shared understanding and terminology around software and resources empower communication and collaboration, which is essential to success for a company at our scale," say Kalman and Wallin.

The C4 model is a lightweight graphical notation technique for modelling the architecture of software systems, created by Simon Brown. It is based on a structural decomposition of a system into containers and components. At Spotify, the engineers adopted the C4 notation and its best practices. However, they replaced its abstraction layer of contexts, containers and components with the Spotify System Model.

1Spotify-c4-overview-1658874293923.png
The C4 Model


Source: https://c4model.com/

Spotify uses Backstage to store the software catalogue metadata. Backstage is an open-source platform for building developer portals, driven by Spotify and is a CNCF incubation project. Using Backstage's extensibility, they created an Architecture plugin that generates C4 diagrams based on the Spotify System Model metadata stored in Backstage. Kalman and Wallin say that "having the system model available in Backstage has been very helpful for discovery purposes, understanding lifecycles, ownership, and relationships between software components, and automatically producing software visualization diagrams."

Several core entities make up the Spotify System Model. These include APIs representing boundaries between software components, Components representing individual pieces of software, and Resources that are infrastructure needed to operate components at runtime.

1Spotify-figure-1-1658874293923.png
Relationship between core entities
Source:

https://engineering.atspotify.com/2022/07/software-visualization-challenge-accepted/

As their catalogue has grown, those components have become increasingly hard to understand, review, and relate to each other. As a result, they've introduced additional abstractions that help understand the broader software ecosystem. Systems are collections of entities that cooperate to perform some function, and Domains are a collection of Entities and Systems related to a part of the business.

1Spotify-figure-2-1658874293923.png
A domain and a system in relation to core entities


Source: https://engineering.atspotify.com/2022/07/software-visualization-challenge-accepted

About the Author

Eran Stiller

Eran Stiller is the Lead Software Architect of badook, based in Melbourne, Australia. As a seasoned software architect and CTO, Eran designed, implemented and reviewed various software solutions across multiple business domains. With many years of experience in the software development world and a track record of public speaking and community contribution, Microsoft recognized him as a Microsoft Regional Director (MRD) since 2018 and a Microsoft Most Valuable Professional (MVP) on Microsoft Azure since 2016.

Show more

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK