message driven architecture in grails

Post on 17-May-2015

415 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Slides from my GGX 2013 talk. http://skillsmatter.com/podcast/home/message-driven-architecture-in-grails Code here: https://github.com/danveloper/ggx-2013-mda

TRANSCRIPT

Message Driven Architecture in GrailsDaniel Woods

London, Dec 2013

About Me

@danveloper /danveloper

#editordanielpwoods@gmail.com

Message Driven Architecture in Grails

QUICK OVERVIEW: SPRING INTEGRATION

Message Driven Architecture in Grails

GATEWAY

Message Driven Architecture in Grails

Gateway Service Interface

SomewhereMessage Channel

gateway.request(obj)

HANDLER CHAIN

Message Driven Architecture in Grails

Message Channel Handler

Handler

Handler

Handler

Gateway Service Interface

APPROACH TO MESSAGE DRIVEN ARCHITECTURE IN GRAILS

Message Driven Architecture in Grails

MESSAGE DRIVEN ARCHITECTURE IS NOT ALWAYS THE SAME THING AS DISTRIBUTED ARCHITECTURE

Message Driven Architecture in Grails

- BUILD THE SKELETON OF THE APPLICATION AS A MESSAGING PIPELINE

Message Driven Architecture in Grails

Message Driven Architecture in Grails

Function #1Room Search

Function #2Booking

Message Driven Architecture in Grails

• Need to find hotels with rooms that don’t have bookings for the date range requested• RoomSearch

• Need to hand off available rooms to be priced appropriately for the user• RatingEngine

• Need to store the rate that we have have generated for the user, to recall during booking

Function #1Room Search

FUNCTION #1 – ROOM SEARCH

Message Driven Architecture in Grails

Message Channel

Room Search

RatingEngine

PublishedRoomService

Gateway Service Interface Provides:

List<Room>

Provides:List<PublishedRoom>

DB

Message Driven Architecture in Grails

• Need to retrieved the room and the stored rate

• Need to validate room is still available• RoomSearch

• Re-rate the room to ensure no major discrepancy• RatingEngine

• Create the booking

Function #2Booking

FUNCTION #2 – BOOKING

Message Driven Architecture in Grails

Message Channel

RatingEngine

Booking Service

Gateway Service Interface

Provides:PublishedRoom

PublishedRoomService

Provides:PublishedRoom

NotifyHotel

DBProvides:BookingEmailService

Pass-Thru:Booking

MetricsService

PIPELINE WITH WORKFLOW GROUPS

Message Driven Architecture in Grails

Message Channel

AppPipeline

SearchRequest Handler

BookingRequest Handler

Message Channel Room Search

RatingEngine

PublishedRoomService

Provides:List<Room>

Provides:List<Publishe

dRoom>

DB

Message Channel

RatingEngine

Booking Service

Provides:PublishedRoom

PublishedRoomService

Provides:PublishedRoom

NotifyHotel

DB

Provides:Booking

EmailService

Pass-Thru:Booking

MetricsService

Message Router

WHY GO MESSAGE DRIVEN?

Message Driven Architecture in Grails

THANK YOU

Message Driven Architecture in Grails

top related