Slide 1

Slide 1 text

INTEGRATING BOUNDED CONTEXTS USING DOMAIN-DRIVEN DESIGN & MESSAGING @indu_alagarsamy

Slide 2

Slide 2 text

Source: http://www.themost10.com/interesting-facts-about-starbucks/

Slide 3

Slide 3 text

Source: https://www.theatlantic.com/business/archive/2015/01/the-logic-of-long-lines/384870/

Slide 4

Slide 4 text

Source: http://www.huffingtonpost.com/2015/04/11/peter-dinklage-game-of-thrones-scene-secret-meaning_n_7046990.html

Slide 5

Slide 5 text

Cashier Barista MakeTheDrink(drinkSpecs); drink object ProcessCharge(); return drink; OrderDrink(); Temporal Coupling

Slide 6

Slide 6 text

Source: http://ihateworkinginretail.ooid.com/wp-content/uploads/2014/09/BARISTA1.jpg

Slide 7

Slide 7 text

Source: http://www.holytaco.com/9-most-annoying-people-starbucks/

Slide 8

Slide 8 text

DrinkOrdered CustomerDrinkPrepared Cashier Barista OrderDrink Publish - Subscribe

Slide 9

Slide 9 text

Source: http://www.iainclaridge.co.uk/blog/wp-content/uploads/2013/01/snow_bus.jpg EVENT-DRIVEN ARCHITECTURE

Slide 10

Slide 10 text

Source: http://www.planetmountain.com/img/1/12182.jpg QUEUES

Slide 11

Slide 11 text

COMMANDS & EVENTS @indu_alagarsamy Something of importance happened Do something Domain Event Command

Slide 12

Slide 12 text

WHEN an aircraft type is changed: Passenger gets notified with a new booking proposal Passenger can cancel flight Passenger can accept proposed booking @indu_alagarsamy

Slide 13

Slide 13 text

@indu_alagarsamy EVENTSTORMING Source: dddeurope.com

Slide 14

Slide 14 text

Mycenae, Greece A Business Process can be triggered by an event from a different bounded context AircraftTypeHasChanged FLIGHT PLANNING BOUNDED CONTEXT BOOKING BOUNDED CONTEXT WHEN an aircraft type is changed @indu_alagarsamy

Slide 15

Slide 15 text

Mycenae, Greece Multiple messages can take part in a business process AircraftTypeHasChanged NotifyCustomer RebookFlight BookingWasCancelled @indu_alagarsamy FLIGHT PLANNING BOUNDED CONTEXT BOOKING BOUNDED CONTEXT

Slide 16

Slide 16 text

WHEN an aircraft type is changed: Only passengers with Premium status gets notified with a new booking proposal Passenger can cancel flight Passenger can accept proposed booking @indu_alagarsamy

Slide 17

Slide 17 text

BOOKING LOYALTY CustomerWasPromotedToGold CustomerWasPromotedToPlatinum Customer PromotionInfo FLIGHT PLANNING AircraftTypeHasChanged ProposeRebooking @indu_alagarsamy Make Autonomous Decisions

Slide 18

Slide 18 text

@indu_alagarsamy Talk to domain experts. Eventstorm with them. Models are not perfect Evolve and refactor with an obsession for domain language Strive for Autonomy. Use events to communicate between bounded contexts

Slide 19

Slide 19 text

THANK YOU @indu_alagarsamy https://indu.dev https://go.particular.net/ddd2020