Scaling Domain Driven Design Greg Young IMIS Presentation Is Is - - PowerPoint PPT Presentation

scaling domain driven design
SMART_READER_LITE
LIVE PREVIEW

Scaling Domain Driven Design Greg Young IMIS Presentation Is Is - - PowerPoint PPT Presentation

Scaling Domain Driven Design Greg Young IMIS Presentation Is Is Not Discussion of DDD A DDD Tutorial being used in a large A Scalability Tutorial scale system Discussion of concepts that can be applied to other domains to


slide-1
SLIDE 1

Scaling Domain Driven Design

Greg Young IMIS

slide-2
SLIDE 2

Presentation

Is Is Not

 Discussion of DDD

being used in a large scale system

 Discussion of concepts

that can be applied to

  • ther domains to solve

common infrastructure issues

 A DDD Tutorial  A Scalability Tutorial

slide-3
SLIDE 3

Context

slide-4
SLIDE 4

IMIS

Algorithmic Trading Regression Analysis Data Warehousing

slide-5
SLIDE 5

Incoming Data

TSX / V

  • NT
  • RIM

NYSE

  • NT
  • EBAY

Nasdaq

  • RIMM
  • CSCO
slide-6
SLIDE 6

Challenges

 Large Amounts of Complex Business Logic  Large Amounts of Historical Data  Large Amounts of Real-Time Data  Nearly all Real-Time Data is Stateful  Extremely Low Latency (< 100 ms)

slide-7
SLIDE 7

DDD & Performant Systems

slide-8
SLIDE 8

DDD Scalability

slide-9
SLIDE 9

Bounded Contexts

 Language Specialization  Knowledge Hiding  Team Partitioning  Scalability??

slide-10
SLIDE 10

Context Mapping

Bounded Context Anti- Corruption Layer Core Domain

slide-11
SLIDE 11

Many Bounded Contexts do not need real time data…

slide-12
SLIDE 12

First Attempt

Remote Facade Domain Analysis Async

slide-13
SLIDE 13

Analysis

Pros Cons

 Easily Scalable  Simplicity  “Retrofitability”  Fractured Domain/

Duplicated Logic

 Wrong Language  Too Much Information

slide-14
SLIDE 14

If things seem hard, there is something wrong with the model…

slide-15
SLIDE 15

Are state changes domain concepts?

slide-16
SLIDE 16

Changes are First Class Citizens

Customer CustomerAddressChangedMessage GetStateChanges()

slide-17
SLIDE 17

Benefits

Explicit! Testing Auditing Optimism

slide-18
SLIDE 18

Annoyances

 Creating all of the messages (especially creates)  Not easily applied to an existing domain

slide-19
SLIDE 19

Reversed

Core Domain Anti- Corruption Layer Bounded Context

slide-20
SLIDE 20

How to send the state changes?

All or most of the data is needed Reporting

Pipeline

Only a fraction of data is needed Many Smaller Systems

Pub/Sub

slide-21
SLIDE 21

Reporting

Async Pipeline Domain Reporting Infrastructure

slide-22
SLIDE 22

Warm/Hot Replication

Async Pipeline Domain Mirrorrer

slide-23
SLIDE 23

Load Balancing w/ Optimistic Locking

Domain Mirrorrer

slide-24
SLIDE 24

Striping (Partitioning)

Async Pipeline Domain Striper Locator

slide-25
SLIDE 25

Summary

slide-26
SLIDE 26

Summary

 Bounded Contexts are Also for Scalability  Most Context Mapping Need not be Synchronous  State Changes are First Class Citizens

slide-27
SLIDE 27

Questions