Reactive Systems
Dave Farley
http://www.davefarley.net @davefarley77
Reactive Systems Dave Farley http://www.davefarley.net - - PowerPoint PPT Presentation
Reactive Systems Dave Farley http://www.davefarley.net @davefarley77 Reactive Systems 21st Century Architecture for 21st Century Problems Dave Farley http://www.davefarley.net @davefarley77 http://www.continuous-delivery.co.uk Our World Is
Dave Farley
http://www.davefarley.net @davefarley77
Dave Farley
http://www.davefarley.net @davefarley77 http://www.continuous-delivery.co.uk
21st Century Architecture for 21st Century Problems
Large Applications circa 2005:
Large Applications Now:
processors
Responsive Elastic Resilient Message Driven
“21st Century Problems are not best solved with 20th Century Software Architectures” The Evolution of modern hardware has changed many of the common assumptions of software development
Source: www.reactivemanifesto.org
Responsive:
Resilient:
Containment, Isolation and Delegation
Elastic:
Varying Workload
Input Rate By Increasing or Decreasing Resources that Service the Input
No Contention Points, No Central Bottlenecks
Message Driven:
for all of these properties
Constituents
Component ‘B’ Component ‘A’
Component ‘B’ Component ‘A’
Synchronous Comms Increases Coupling in Location and Time
Component ‘B’ Component ‘A’
Component ‘A’
Component ‘B’
Component ‘B’ Component ‘A’ BookStore Inventory
Order(“Continuous Delivery”) Reserve(“Continuous Delivery”) Order(“Continuous Delivery”) Reserve(“Continuous Delivery”) Ordered(“Continuous Delivery”) Ordered(“Continuous Delivery”)
BookStore Inventory
reserving
reserving
Order(“Continuous Delivery”) Reserve(“Continuous Delivery”) Ordered(“Continuous Delivery”) Ordered(“Continuous Delivery”) Order(“Better Aerobatics”) Reserve(“Better Aerobatics”) Ordered(“Better Aerobatics”)
Ordered(“Better Aerobatics”)
5
Component ‘B’
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 Expected(3) 3 4 3 4 3 3 4 1 2
Component ‘A’
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 5
Well Defined Protocols
Component ‘A’ Component ‘B’
Component ‘A’ Component ‘B’
Sensibly
Catastrophically or Loose Messages
By Applying Back-Pressure, Slowing Upstream Inputs
Component ‘B’ Component ‘A’
Queues are always full or always empty. Anything else is transitional, on its way to full or empty.
Slightly Faster Slightly Slower
Always Empty!
Queues are always full or always empty. Anything else is transitional, on its way to full or empty.
Component ‘B’ Component ‘A’ Slightly Faster Slightly Slower
Always Full!
Component ‘B’ Component ‘A’ Slightly Faster Slightly Slower
Always Full!
Back-Pressure!
Component ‘n’
re!
Component ‘A’ Component ‘B’
Horizontal (Cluster) and Vertical (Multicore) Scalability
Component ‘A’ Component ‘B’
Component ‘B2’ Component ‘B1’
Component ‘A’
Modern Hardware Should Change Our Assumptions
Siloed Teams Rigid Architecture
DB
UI Specialists Middleware Specialists DB Specialists
Cross-Functional Teams Organised by Business Function Distributed Service Architecture
Contexts
(DDD) - Eric Evans
Rule Them All”
Public API
Notification Service Market Management Application Customer Service Application TFX Application Public Web App Contact Service Trade Report Service Account Service Customer Service Market Management Payment Service Market Makers FIX Gateways Instrument Service Notification Service Market Data Consumers Clearing Gateways Public Message Bus Execution Venue Execution Venue Execution Venue (Markets & Matching) Execution Management Service Execution Management Service Execution Management Service (Accounts & Positions)
Control Message Bus
http://www.continuous-delivery.co.uk Dave Farley http://www.davefarley.net @davefarley77