Emergent Behavior
- of -
Complex Systems

@danielgsims

SYSTEM

Cohesive group of interconnected components

component

component

component

component

props

service

service

service

service

requests

class

class

class

class

methods

publisher

consumer

consumer

consumer

events

Complexity

Simple

Many Components

Complex Interactions

Emergence

A system's behavior emerges from the interactions of its components.

Game of Life

Millennium Bridge

Users are a component of your system.

Flash Crash 2010

  • Trading algorithms for computers in the NYSE

  • 36 minutes - lost 9% of the market

  • Second Largest Drop in DJIA

  • Chaotic Input

    • Fat Finger Trades

    • Large Directional Bets

    • High Frequency Trade

  • Turned it on and off again

  • Aftermath

It can be hard to determine the root cause of unexpected behavior.

We need a shift in how we think about, develop and maintain our systems.

  • Command Module

  • Electronics

  • Cooling System

Designing a spacecraft

  • Plug door for High Pressure environment
     
  • Silver coated wire
     
  • Ethelyne Glycol - subzero
    ​antifreeze

I just make websites.

- Somebody I work with

  • Privacy

  • Security

  • Operational Success

  • Reputation

  • Manage Complexity

  • Study the behavior of our systems

  • Respond to unexpected behavior

Simplify Interactions

Modules

Interface

Behavior

Modules

Cognitive Overhead

Benefit

Think Deep

Simple

Complicated

  • What, now how
  • Use well established design patterns
  • Use common architectures
  • Speak the same language

Understand Your Users

User

zipcode

Content
Service

content

Database

Cache (1min)

Geography
Service

determine geo area

fetch content

80% of the US Population lives within 384 Metro Areas

The system becomes more performant the more its used.

  • Scaling policies

  • Cache requirements

  • Database throughput

Working Code Is Not Enough

Bigger Picture

  • How will the system change technically
  • How will the system grow

  • Focus on a strong foundation

  • Think about technical debt

Service

Service

Service

Dev

infrastructure

infrastructure

infrastructure

Ops

Service

Service

Service

infrastructure

infrastructure

infrastructure

External
Users

Developers

Internal Users

  • Get a wide angle view of your systems

  • Establish Service Level Objectives

  • Observability into your systems

    • Real User Monitoring

    • Application Performance Metrics

    • Business Indicators

  • ​Test Real Life Scenarios

    • ​Load Tests

    • Real Data

The whole is greater than the sum of its parts.

  • Domain Driven Design by Eric Evans
  • Site Reliability Engineering by Beyer, et al
  • A Philosophy of Software Design by John Ousterhout
  • https://principlesofchaos.org/
  • Criteria for Modularization by Parnas
  • Million Dollar Microsecond from Radio Lab

Resources

@danielgsims

Emergent Behavior of Complex Systems

By Daniel Sims

Emergent Behavior of Complex Systems

  • 138