Message Driven Architecture enables Elasticity, Resilience and Availability
Message Driven Architecture in Grails
-
Upload
daniel-woods -
Category
Education
-
view
419 -
download
1
description
Transcript of Message Driven Architecture in Grails
![Page 1: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/1.jpg)
Message Driven Architecture in GrailsDaniel Woods
London, Dec 2013
![Page 3: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/3.jpg)
QUICK OVERVIEW: SPRING INTEGRATION
Message Driven Architecture in Grails
![Page 4: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/4.jpg)
GATEWAY
Message Driven Architecture in Grails
Gateway Service Interface
SomewhereMessage Channel
gateway.request(obj)
![Page 5: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/5.jpg)
HANDLER CHAIN
Message Driven Architecture in Grails
Message Channel Handler
Handler
Handler
Handler
Gateway Service Interface
![Page 6: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/6.jpg)
APPROACH TO MESSAGE DRIVEN ARCHITECTURE IN GRAILS
Message Driven Architecture in Grails
![Page 7: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/7.jpg)
MESSAGE DRIVEN ARCHITECTURE IS NOT ALWAYS THE SAME THING AS DISTRIBUTED ARCHITECTURE
Message Driven Architecture in Grails
![Page 8: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/8.jpg)
- BUILD THE SKELETON OF THE APPLICATION AS A MESSAGING PIPELINE
Message Driven Architecture in Grails
![Page 9: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/9.jpg)
Message Driven Architecture in Grails
Function #1Room Search
Function #2Booking
![Page 10: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/10.jpg)
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
![Page 11: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/11.jpg)
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
![Page 12: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/12.jpg)
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
![Page 13: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/13.jpg)
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
![Page 14: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/14.jpg)
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
![Page 15: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/15.jpg)
WHY GO MESSAGE DRIVEN?
Message Driven Architecture in Grails
![Page 16: Message Driven Architecture in Grails](https://reader035.fdocuments.net/reader035/viewer/2022062513/55587549d8b42aaa7e8b53ba/html5/thumbnails/16.jpg)
THANK YOU
Message Driven Architecture in Grails