Mapping Constraints

Barry O Sullivan 2019 -  @barryosull

  • Software Contractor
  • Jack of all trades
    • Architect/Product/Legacy Dev
  • PHP Dublin Organiser
  • DDD IE Co-Organiser

@barryosull

Barry O Sullivan

Who am I

What this talk is about

Your System

New Feature

What are "Constraints"?

A constraint is something that limits or controls what you can do.

Tactical

Constraints

Value

Data validity

Hard rules on accepted values

  • Email address
  • Cost
  • Mailing Address
  • Flight number

Represented by "Unit" tests

Low level

Value

What values are allowed

Value

Data validity

Temporal

What changes are allowed, given previous values

Hard rules on state changes

E.g. "Cannot check out a cart that is empty"

Represented by "Unit" tests

Mid level

Value

Temporal Scope

"An itinerary cannot change once it's completed" - Entity

"Org itineraries must have a unique, incrementing ID" - Org

"All email addresses must be unique" - System

Wide scope of temporal constraints = bottlenecks

How large is the boundary

Behavioural

What can a user do

"As an agent I can create a travel plan for a client"

Represented by "Acceptance" tests

Think of them as "User stories"

High level, combination of value & temporal

Value

Modelling Constraints

Event Storming

Model Processes (Behavioural)

  1. Map out events/changes
  2. Map out temporal constraints
  3. Map out values in events

Implementation

  • Type of app (web/desktop/mobile)
  • Architecture
  • Infrastructure
  • Release process

A Story of Modelling

Software for Small/Medium sized Travel Agencies

Building the Product

  • Event Sourced web app
  • Event Storming used for modelling with domain experts
  • Value/Temporal/Behavioural Constraints modelled and unit tested

Why it Didn't Work

  • Product was expensive to change
  • Existing constraints got in the way
    (constraints became constraints)
  • Modelled wrong business problem
  • Tried to pivot, ran out of funding

The Cost of 

Constraints 

Learning from experience

Cost of Implementing Constraints

  • Value
  • Temporal
  • Behavioural

£

££

£££

Cost of Changing Constraints

Migrating to new constraints

  • Model required changes
  • Change existing system
  • Upgrade historical data
  • Ensure it's all valid
  • Value
  • Temporal
  • Behavioural

Culling Constraints

Culling Constraints

O

X

Not all constraints are created equal

O

O

X

X

X

X

X

Categorise

Constraints

  • Core/Supporting/General
  • Assumptive
  • Idealistic
  • Imposed vs self-imposed

Constraint Rigidity

"Well actually . . . "

Another Story of Modelling

Building NoteWorthy

Constraining our Constraints

  • Event stormed all processes
  • Categorised by Core/Supporting/General
  • Categorised by value/risk/complexity (cost)
  • Culled ruthlessly
  • Only built what we needed

Modelled Constraints

Auth

Idea Submission

Proposal Publishing

Crowd Funding

Story Publishing

Generic

Firebase Auth

Assumptive

Typeform + Trello

Core

Web App

Generic*

GoFundMe

 

Core

Existing System

Existing Systems

Legacy Constraints

The legacy system will exert control

It is a key constraint

Legacy Constraint Discovery

  • Explore
  • Discuss
  • Define

Modelling with Legacy*

* Now with more microservices!

  • Culture
  • The team
  • Processes
  • Politics

Meta Constraints

  • Constraints define your system
  • Constraints are expensive
  • Explore then cull your constraints
  • Simplicity is king
  • Legacy systems exert control

Wrap up

Q&A

@barryosull

Mapping Constraints

By Barry O' Sullivan

Mapping Constraints

How do we define the constraints of our system? A simple question, but one we often get wrong. Too often we model constraints mechanically rather than exploring and challenging them. This leads to brittle systems and bloated software. How do we move past this? This talk is an exploration of the very concept of constraints and how they affect the systems we build. We're going to look at the different types of constraints and the impact they have over time. We'll explore techniques we can use to map, define and refine these constraints, elevating what's important and dropping everything else. We'll also look at legacy, organisational and meta-system constraints and how they impact what we build and how we build it. Mapping constraints is core to what we do, let's get better at it.

  • 1,928