Every system has an architecture (whether deliberately designed or not) and most systems change and evolve during their existence - which includes their architecture. Sometimes this happens gradually and sometimes in large jumps. Let's have a look at a simple example.
Basic Context Diagram for a Furniture Company
The main elements are:
- Sales Orderbook where sales staff book orders and designers occasionally view sales.
- Product Catalogue where designers record the details of new products.
- Warehouse Management application that takes orders and either delivers to customers from stock or forward orders to manufacturing.
The data flow is generally one way, with each system pushing out data with little feedback, due to an old batch-style architecture. For example, the designer updates product information but all the updates for the day are pushed downstream at end-of-day. The Warehouse application only accepts a feed from the Sales Orderbook, which includes both orders and product details.
There are multiple issues with a system like this:
- Modification to the products (new colours, sizes, materials etc) are not delivered to the manufacturer until after an order is placed. This means a long lead time for manufacturing and an unhappy customer.
- The sales orderbook receives a subset of the product information when updated. This means the information could become out-of-sync and not all of it is available.
- The warehouse system also relies on the sales orderbook for product information. This may be out of date or inaccurate.
- The designer does not have easy-to-access information about how product changes affect sales.
The users are unhappy with the system and want the processes to change as follows:
- The product designer wishes to see historic order information alongside the products in the catalog. Therefore the catalog should be able to retrieve data from the Sales Orderbook when required.
- Don't batch push products to the Orderbook and warehouse management. They should access the product catalog as a service when required.
Therefore the system is re-architected as follows:
This is a significant modification to how the systems works:
- The Sales Orderbook and Product Catalogue have a bi-directional relationship and request information from each other.
- Only orders are sent from the Sales Orderbook to the Product Catalogue.
- There is now a direct connection between the Warehouse Manager and the Product Catalogue.
- The product catalogue now provides all features the Designer requires. They do not need to access any other interfaces into the system.
However, if you place the two diagrams next to each other they look similar and the scale of the change is not obvious.
When we write code, we would use a ‘diff’ tool to show us the modifications.
I often do something similar on my architecture diagrams. For example:
System Before Modification
System After Modification
When placed side-by-side the differences are much more obvious:
I’ve used similar colours to those used by popular diff tools; with red for a removed relationship and green for a new relationship (I would use the same colours if components were added or removed). I’ve used blue to indicate where a relationship has changed significantly. Note that I’ve included a Key on these diagrams.
You may be thinking; why have I coloured before and after diagrams rather than having a single, coloured diagram? A single diagram can work if you are only adding and removing elements but if they are being modified it becomes very cluttered. As an example, consider the relationship between the Sales Orderbook and the Product Catalogue. Would the description on a combined diagram be "product updates", "exchange sales and product information", or both? How would I show which was before and after? Lastly, what would I do with the arrow on the connection? Colourise it differently from the line?
I find that having separate, colored diagrams for the current and desired system architectures allows the changes to be seen much more clearly. Having spoken to several software architects, it appears that many use similar techniques, however there appears to be no standard way to do this. Therefore we should make sure that we follow standard advice such as using keys and labelling all elements and connections.