Acknowledging CAP at the Root -- in the Domain - - PowerPoint PPT Presentation

acknowledging cap at the root in the domain model
SMART_READER_LITE
LIVE PREVIEW

Acknowledging CAP at the Root -- in the Domain - - PowerPoint PPT Presentation

Acknowledging CAP at the Root -- in the Domain Model Eric Evans Domainlanguage.com Twi>er: ericevans0 #dddesign Gap between formalism and


slide-1
SLIDE 1

Acknowledging ¡CAP ¡at ¡the ¡Root ¡

  • ­‑-­‑ ¡in ¡the ¡Domain ¡Model

¡

Eric ¡Evans ¡ Domainlanguage.com ¡ Twi>er: ¡ericevans0 ¡ ¡#dddesign ¡

slide-2
SLIDE 2

Gap ¡between ¡formalism ¡and ¡ ¡ ¡pracFce ¡

slide-3
SLIDE 3

2 4 2 1

Vessel ¡Voyage ¡XYZ ¡

OAK LGB SHA HKG

slide-4
SLIDE 4

Vessel ¡Voyage ¡ABC ¡

SEA LGB SNG

slide-5
SLIDE 5

Cargo ¡IFnerary ¡

SEA LGB HKG

slide-6
SLIDE 6

Our ¡Cargo ¡Needs ¡2 ¡Voyages ¡

slide-7
SLIDE 7

Schedules ¡and ¡IFneraries ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡13:20 ¡Th ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡

¡

slide-8
SLIDE 8

* * *

startLocation endLocation availableTime layover cargoId Origin Destination Arrival Deadline Weight ... Schedule vesselVoyageId assignedVessel ... Vessel Voyage departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg loadLocation loadTime unloadLocation unloadTime Leg Itinerary Cargo

slide-9
SLIDE 9

Schedules ¡and ¡IFneraries ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡13:20 ¡Th ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡

¡

slide-10
SLIDE 10

Delay ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡13:20 ¡Th ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡

¡

slide-11
SLIDE 11

New ¡Schedule ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡3:00 ¡Sa ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ ¡7:15 ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡3:00 ¡Sa ¡(next) ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡(next) ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡(next) ¡

¡

slide-12
SLIDE 12

* * *

startLocation endLocation availableTime layover cargoId Origin Destination Arrival Deadline Weight ... Schedule vesselVoyageId assignedVessel ... Vessel Voyage departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg loadLocation loadTime unloadLocation unloadTime Leg Itinerary Cargo

slide-13
SLIDE 13
  • IFnerary ¡corresponds ¡to ¡Vessel ¡Voyage ¡
  • IFnerary ¡connected ¡
  • Layover ¡> ¡24 ¡hours ¡

¡ ¡ ¡

Some ¡Consistency ¡Rules ¡

slide-14
SLIDE 14

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Mo unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

slide-15
SLIDE 15

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 7:15 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime=13:20Th 3:00 Sa departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th 3:00 Sa departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

slide-16
SLIDE 16

Aggregates ¡

slide-17
SLIDE 17

Aggregates: ¡ ¡ Consistency ¡Boundaries ¡

  • Aggregates ¡are ¡always ¡internally ¡consistent. ¡

– Invariants ¡apply ¡at ¡every ¡transacFon ¡commit ¡

  • Aggregates ¡“eventually ¡consistent” ¡with ¡each ¡
  • ther. ¡

– Asynchronous ¡updates ¡propagate ¡through ¡system ¡ ¡

  • Limit ¡Interconnectedness. ¡

– References ¡limited ¡to ¡aggregate ¡roots. ¡

slide-18
SLIDE 18

Draw ¡Aggregate ¡Boundaries ¡

(But probably not these!)

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

slide-19
SLIDE 19

Allowed ¡State ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡3:00 ¡Sa ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡3:00 ¡Sa ¡(next) ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡(next) ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡(next) ¡

¡

slide-20
SLIDE 20

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Mo unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

slide-21
SLIDE 21

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

slide-22
SLIDE 22

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

Too ¡Interconnected ¡

slide-23
SLIDE 23

Reference ¡Root ¡

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage

slide-24
SLIDE 24

Allowed ¡State ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡13:20 ¡Th ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡3:00 ¡Sa ¡(next) ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡(next) ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡(next) ¡

¡

slide-25
SLIDE 25

A ¡While ¡Later ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡

EsFmated ¡Layover ¡in ¡LGB: ¡ ¡3:00 ¡Sa ¡–10:15 ¡Sa ¡ ¡Elapsed: ¡45:55 ¡ ¡7:15 ¡ Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡08:30 ¡Sa ¡
  • ETA ¡SHA ¡21:00 ¡Sa ¡
  • ETD ¡SHA ¡06:30 ¡Su ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡3:00 ¡Sa ¡(next) ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡10:15 ¡Sa ¡(next) ¡
  • ETA ¡SEA ¡07:40 ¡Su ¡(next) ¡

¡

slide-26
SLIDE 26

A ¡few ¡seconds ¡(or ¡hours) ¡later ¡

IFnerary ¡HKG-­‑SEA ¡

  • HKG-­‑LGB ¡on ¡XYZ ¡
  • LGB-­‑ ¡SEA ¡on ¡ABC ¡
  • EsFmated ¡Layover ¡in ¡

LGB: ¡13:20 ¡Th ¡ ¡ 03:00 ¡Sa ¡–10:15 ¡Sa ¡

  • Elapsed: ¡45:55 ¡07:15 ¡

Voyage ¡Schedule ¡for ¡XYZ ¡

  • ETD ¡HKG ¡ ¡08:30 ¡Mo ¡
  • ETA ¡LGB ¡13:20 ¡Th ¡03:00 ¡Sa ¡
  • … ¡

Voyage ¡Schedule ¡for ¡ABC ¡

  • ETD ¡SNG ¡14:15 ¡Tu ¡
  • ETA ¡LGB ¡ ¡22:05 ¡Fr ¡
  • ETD ¡LGB ¡ ¡10:15 ¡Sa ¡
  • ETA ¡SEA ¡ ¡ ¡07:40 ¡Su ¡

¡

slide-27
SLIDE 27

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage vesselVoyageId = XYZ Schedule Changed

Domain ¡Event ¡

slide-28
SLIDE 28

Bounded ¡Context ¡

  • Aggregates ¡are ¡part ¡of ¡the ¡model ¡
  • Data ¡inconsistency ¡within ¡a ¡context ¡with ¡

model ¡consistency ¡

  • Strict ¡asserFons ¡about ¡what’s ¡consistent ¡when ¡
slide-29
SLIDE 29

startLocationCode= HKG endLocCode = SEA availableTime = 7:40 Su layover = 45:55 1st cargoId = AXB234Q Origin = HKG Destination = SEA Arrival Deadline = Tue next Weight = ... Schedule loadLocationCode = LGB loadTime = 10:15 Sa unloadLocCode = SEA unloadTime = 7:40 Su 2nd loadLocationCode = HKG loadTime = 8:30 Sa unloadLocCode = LGB unloadTime = 13:20 Th departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th VesselLeg departureLocCode = LGB EDT = 10:15 Sa unloadLocCode = SEA ETA = 7:40 Su vesselVoyageId = XYZ Vessel Voyage departureLocCode = HKG EDT = 8:30 Mo unloadLocCode = LGB ETA = 13:20 Th departureLocCode = SHA EDT = 6:30 Su unloadLocCode = LGB ETA = 13:20 Th departureLocCode = HKG EDT = 8:30 Sa unloadLocCode = SHA ETA = 21:00 Sa VesselLeg VesselLeg VesselLeg Leg Leg Itinerary Cargo Schedule vesselVoyageId = ABC Vessel Voyage vesselVoyageId = XYZ Schedule Changed vesselVoyageId = ABC Schedule Changed

Anticorruption Layer

Fewer ¡AssumpFons ¡

slide-30
SLIDE 30

Main ¡Points ¡

  • Aggregates ¡model ¡domain ¡knowledge ¡about ¡

logic ¡coupling ¡and ¡update ¡pa>erns. ¡

  • Domain ¡Events ¡represent ¡what ¡happened ¡in ¡

domain, ¡giving ¡meaning ¡to ¡state ¡change. ¡

  • Context ¡boundaries ¡mark ¡where ¡a ¡model ¡

allows ¡strong ¡asserFons. ¡

slide-31
SLIDE 31
  • Eric ¡Evans ¡
  • Domainlanguage.com ¡
  • Twi>er: ¡ericevans0 ¡ ¡#dddesign ¡