Optimize for desirable results

Whether it's a complex traffic network or a complex architecture, identifying the right goal, finding the right principles to focus on and optimizing your system design will give you the best chance of success.

By Ronnie Mitra
February 7, 2016
Traffic Traffic (source: Pixabay)

If you are attempting to build a microservices architecture you probably have a lot of questions: What size should the services be? What should the teams look like? What tools should we be using? These are important factors for the system you are creating, but in our experience adopting a larger perspective on the system can lead to better results. Sweden’s road system provides us with a real-life example of this principle.

The Swedish traffic system has the world’s lowest rate of traffic related fatalities. Getting to that point wasn’t an accident. Although you’ll find the same traffic control mechanisms in Sweden that are used almost everywhere else in the world, you’ll also see evidence of a system that is purposefully designed to be safe. The focus on safety is thanks to a program launched in 2009 called Vision Zero, with the laudable goal of reducing the number of road accident related deaths to zero. The program is based on a few core principles:

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more
  • Traffic systems must be designed to prioritize safety
  • Improved safety is a byproduct of system design, not driver skill
  • A holistic approach is used to achieve results including speed limit changes, road marking, education, and innovation

Adhering to these principles has had a profound effect on how road systems are designed. Traditional traffic systems are designed to balance an acceptable level of risk to humans with a desire to improve mobility and traffic flow. But, the Swedish traffic system prioritizes safety to the extent that the flow of traffic may actually be impeded. By identifying a specific design goal, the designers are able to make decisions that are far more likely to produce a safer road system overall.

Rather than attempting to eliminate all possible accidents, designers focus only on eliminating ones that could lead to serious injury or death. Instead of relying on skilled drivers who drive defensively, Vision Zero designed road systems account for the common mistakes and failures that human drivers make.

In the end, rather than focusing only on specific techniques or innovations to improve safty, Vision Zero produces a design culture that prioritizes safety above all else. The implementation details and the innovations that can make that happen naturally follow, leading to the desired result over time.

This type of initiative demonstrates how driving the right culture and good habits can produce systems with desirable behaviors. Identifying an optimization goal for a system and developing a few core principles can have remarkable effects in terms of the output that is produced. The trick is to identify the correct goal and make the necessary trade-offs to achieve it. At the API Academy, we believe that technology organizations can benefit from the same type of thinking.

Netflix has gained attention for building an architecture that epitomizes the microservices way of building an application architecture. They’ve manage to grow a culture that optimizes for speed of development and high availability. As Adrian Cockfort describes, principles such as immutability, separation of concerns, anti-fragility, and high-trust are core to continually making decisions that are in tune with their optimization goal. What Netflix does especially well is to focus on the optimizations that will help their business product the most.

But, not all organizations look like Netflix, nor do they all have the same business goals and constraints. For example, the optimizations that Netflix has successfully introduced in their own company may not be as easily adoptable in a large insurance firm. More importantly, a different optimization goal may need to be identified to address the challenges that are considered most important for this organization.

Whether it’s a complex traffic network or a complex architecture, identifying the right goal, finding the right principles to focus on, and optimizing your system design will give you the best chance of success. Optimizing a design for desirable results necessarily involves making trade-off decisions, so it is vital that you optimize for the right result. In the upcoming book on microservices architecture I’m co-authoring with Mike Amundsen, we provide some helpful guidance on identifying the correct optimization and the principles that will help drive it.

Editor’s note: Ronnie’s co-author, Mike Amundsen, will be speaking at our Software Architecture conference in a session that reviews twelve patterns and practices for building APIs that can safely evolve over time and client applications that can adapt to those changes without relying on explicit versioning systems or repeated redeployment.

This post is a collaboration between O’Reilly and CA Technologies. See our statement of editorial independence.

Post topics: Software Architecture