London, Dec 2013

Message Driven Architecture in Grails
Daniel Woods
Message Driven Architecture in Grails

About Me
@danveloper

/danveloper

#editor
danielpwoods@gmail.com
Message Driven Architecture in Grails
QUICK OVERVIEW: SPRING INTEGRATION
Message Driven Architecture in Grails
GATEWAY
gateway.request(obj)

Gateway Service
Interface

Message Channel

Somewhere
Message Driven Architecture in Grails
HANDLER CHAIN
Gateway Service
Interface

Message Channel

Handler
Handler
Handler
Handler
Message Driven Architecture in Grails

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
Function #1
Room Search

Function #2
Booking
Message Driven Architecture in Grails
Function #1
Room Search

• 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
Message Driven Architecture in Grails
FUNCTION #1 – ROOM SEARCH
Gateway Service
Interface

Room Search
Provides:
List<Room>

RatingEngine
Provides:
List<PublishedRoom>

Message Channel

PublishedRoomServic
e

DB
Message Driven Architecture in Grails
Function #2
Booking

• 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
Message Driven Architecture in Grails
FUNCTION #2 – BOOKING
PublishedRoomServic
e

Gateway Service
Interface

Provides:
PublishedRoom

RatingEngine
Provides:
PublishedRoom

Booking Service

Message Channel

Notify
Hotel
MetricsService
Pass-Thru:
Booking

EmailService

Provides:
Booking

DB
Message Driven Architecture in Grails
PIPELINE WITH WORKFLOW GROUPS
Message Channel

AppPipeline

Room Search
Provides:
List<Room>

Message Router

RatingEngine

SearchRequest Handler
PublishedRoomService

Message Channel

Provides:
List<Publishe
dRoom>

BookingRequest Handler

DB

Message Channel

PublishedRoomService
Provides:
PublishedRoom
RatingEngine
Provides:
PublishedRoom
Booking Service
Notify
Hotel

MetricsService

Pass-Thru:
Booking
EmailService

Provides:
Booking
DB
Message Driven Architecture in Grails

WHY GO MESSAGE DRIVEN?
Message Driven Architecture in Grails

THANK YOU


More Related Content

PPTX
Communication in a Microservice Architecture
PDF
Event Carried State Transfer @ LeanIX
PPTX
Communication in a Microservice Architecture (Ljubljana Backend Meetup 2021)
PPTX
Api Gateway - What's the use of an api gateway?
PPTX
You probably don't need microservices
PDF
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
PPT
Effective API Gateway
PPTX
NSBCon 2014 London - Mark Taling and Roy Cornelissen
Communication in a Microservice Architecture
Event Carried State Transfer @ LeanIX
Communication in a Microservice Architecture (Ljubljana Backend Meetup 2021)
Api Gateway - What's the use of an api gateway?
You probably don't need microservices
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
Effective API Gateway
NSBCon 2014 London - Mark Taling and Roy Cornelissen

What's hot (14)

PPTX
Aplicaciones en tiempo real con SignalR
PDF
APIdays Paris 2018 - Disagree with “I Agree”. Enforcing Better GDPR Complianc...
PDF
Mastering the api hell
PDF
Consumer-centric API Design
PDF
APIdays Paris 2018 - What a Mesh! Laurent Doguin, DevRel VP, Clever Cloud
PPTX
Spring cloud-netflix-oss-microservices
PDF
Hybrid Integration using BizTalk and Azure
PPTX
Jumpstart: Building Your First App with MongoDB
PDF
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
PDF
Logic Apps: El Poder de la nueva Integración (por Félix Mondelo)
PDF
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
PDF
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
PPTX
Intro to Knative
PDF
BizTalk Server 2016: What's new (por Mariano Robles)
Aplicaciones en tiempo real con SignalR
APIdays Paris 2018 - Disagree with “I Agree”. Enforcing Better GDPR Complianc...
Mastering the api hell
Consumer-centric API Design
APIdays Paris 2018 - What a Mesh! Laurent Doguin, DevRel VP, Clever Cloud
Spring cloud-netflix-oss-microservices
Hybrid Integration using BizTalk and Azure
Jumpstart: Building Your First App with MongoDB
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
Logic Apps: El Poder de la nueva Integración (por Félix Mondelo)
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Intro to Knative
BizTalk Server 2016: What's new (por Mariano Robles)
Ad

Viewers also liked (13)

KEY
Booking.com & Perl
PDF
Introduction into JavaFX
PDF
Getting your Grails on
PPTX
PPTX
Neo4J and Grails
PPT
Play framework
PDF
Effective JavaFX architecture with FxObjects
PDF
JavaFX Uni Parthenope
PPTX
OpenJFX on Android and Devices
PDF
Building Java Desktop Apps with JavaFX 8 and Java EE 7
PDF
Application Architectures in Grails
PDF
Event-Driven Architecture (EDA)
PDF
Introduction of Booking.com
Booking.com & Perl
Introduction into JavaFX
Getting your Grails on
Neo4J and Grails
Play framework
Effective JavaFX architecture with FxObjects
JavaFX Uni Parthenope
OpenJFX on Android and Devices
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Application Architectures in Grails
Event-Driven Architecture (EDA)
Introduction of Booking.com
Ad

Similar to Message Driven Architecture in Grails (20)

PPTX
MongoDB Stitch Introduction
PPTX
Nov 2019 kafka with mongo db and confluent sydney
PDF
Bridging Microservices, APIs and Integration
PDF
Slicing and Dicing with Consequences: The Effect of Microservices on API Design
PDF
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
PPTX
AWS Cloud Technology And Future of Faster Modern Architecture
PDF
SERVERLESS PERSONAL TO-DO LIST APPLICATION
PPTX
Integrating with Aws s3
PPTX
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
PDF
Consul connect
PDF
Ymens - Bouncing off clouds - Rapid Development for Cloud Ready Applications...
PDF
Conquer Architectural Challenges with End-to-End JavaScript - enterJS 2014
PPTX
Gluecon keynote
PPTX
The Evolution of Cloud Architectures: Focusing More on the Business Logic
PPTX
MicroServices on Azure
PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
PPTX
Microservices with Net Core 8 and Net Core 6
PDF
Airflow techtonic template
PDF
The great migration embracing serverless first
PDF
apidays LIVE New York 2021 - API for multi-cloud management platform by Pawel...
MongoDB Stitch Introduction
Nov 2019 kafka with mongo db and confluent sydney
Bridging Microservices, APIs and Integration
Slicing and Dicing with Consequences: The Effect of Microservices on API Design
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
AWS Cloud Technology And Future of Faster Modern Architecture
SERVERLESS PERSONAL TO-DO LIST APPLICATION
Integrating with Aws s3
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
Consul connect
Ymens - Bouncing off clouds - Rapid Development for Cloud Ready Applications...
Conquer Architectural Challenges with End-to-End JavaScript - enterJS 2014
Gluecon keynote
The Evolution of Cloud Architectures: Focusing More on the Business Logic
MicroServices on Azure
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices with Net Core 8 and Net Core 6
Airflow techtonic template
The great migration embracing serverless first
apidays LIVE New York 2021 - API for multi-cloud management platform by Pawel...

More from Daniel Woods (14)

PPTX
Continuous Delivery with Spinnaker and OpenStack
PDF
High Performance Microservices with Ratpack and Spring Boot
PDF
Groovy in the Cloud
PPTX
Ratpack - SpringOne2GX 2015
PDF
Ratpack Web Framework
PPTX
Microservices: The Right Way
PDF
Ratpack Web Framework
PDF
Facilitating Continuous Delivery at Scale
PDF
Continuous Delivery with NetflixOSS
PDF
Server-Side JavaScript with Nashorn
PDF
Future of Grails
PPTX
Groovy for System Administrators
PPTX
Building Web Apps in Ratpack
PDF
Gainesville Web Developer Group, Sept 2012
Continuous Delivery with Spinnaker and OpenStack
High Performance Microservices with Ratpack and Spring Boot
Groovy in the Cloud
Ratpack - SpringOne2GX 2015
Ratpack Web Framework
Microservices: The Right Way
Ratpack Web Framework
Facilitating Continuous Delivery at Scale
Continuous Delivery with NetflixOSS
Server-Side JavaScript with Nashorn
Future of Grails
Groovy for System Administrators
Building Web Apps in Ratpack
Gainesville Web Developer Group, Sept 2012

Recently uploaded (20)

PPTX
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
DOCX
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
PDF
English 2nd semesteNotesh biology biopsy results from the other day and I jus...
PPTX
Approach to a child with acute kidney injury
PPT
hsl powerpoint resource goyloveh feb 07.ppt
PDF
GSA-Past-Papers-2010-2024-2.pdf CSS examination
PDF
Chevening Scholarship Application and Interview Preparation Guide
PPTX
climate change of delhi impacts on climate and there effects
PDF
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
PPSX
namma_kalvi_12th_botany_chapter_9_ppt.ppsx
PPTX
IT infrastructure and emerging technologies
PPTX
MMW-CHAPTER-1-final.pptx major Elementary Education
PPTX
GW4 BioMed Candidate Support Webinar 2025
PPTX
Cite It Right: A Compact Illustration of APA 7th Edition.pptx
PDF
Physical pharmaceutics two in b pharmacy
PPTX
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
PDF
faiz-khans about Radiotherapy Physics-02.pdf
PPTX
operating_systems_presentations_delhi_nc
PDF
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
PDF
FYJC - Chemistry textbook - standard 11.
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
English 2nd semesteNotesh biology biopsy results from the other day and I jus...
Approach to a child with acute kidney injury
hsl powerpoint resource goyloveh feb 07.ppt
GSA-Past-Papers-2010-2024-2.pdf CSS examination
Chevening Scholarship Application and Interview Preparation Guide
climate change of delhi impacts on climate and there effects
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
namma_kalvi_12th_botany_chapter_9_ppt.ppsx
IT infrastructure and emerging technologies
MMW-CHAPTER-1-final.pptx major Elementary Education
GW4 BioMed Candidate Support Webinar 2025
Cite It Right: A Compact Illustration of APA 7th Edition.pptx
Physical pharmaceutics two in b pharmacy
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
faiz-khans about Radiotherapy Physics-02.pdf
operating_systems_presentations_delhi_nc
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
FYJC - Chemistry textbook - standard 11.

Message Driven Architecture in Grails

  • 1. London, Dec 2013 Message Driven Architecture in Grails Daniel Woods
  • 2. Message Driven Architecture in Grails About Me @danveloper /danveloper #editor [email protected]
  • 3. Message Driven Architecture in Grails QUICK OVERVIEW: SPRING INTEGRATION
  • 4. Message Driven Architecture in Grails GATEWAY gateway.request(obj) Gateway Service Interface Message Channel Somewhere
  • 5. Message Driven Architecture in Grails HANDLER CHAIN Gateway Service Interface Message Channel Handler Handler Handler Handler
  • 6. Message Driven Architecture in Grails APPROACH TO MESSAGE DRIVEN ARCHITECTURE IN GRAILS
  • 7. Message Driven Architecture in Grails MESSAGE DRIVEN ARCHITECTURE IS NOT ALWAYS THE SAME THING AS DISTRIBUTED ARCHITECTURE
  • 8. Message Driven Architecture in Grails - BUILD THE SKELETON OF THE APPLICATION AS A MESSAGING PIPELINE
  • 9. Message Driven Architecture in Grails Function #1 Room Search Function #2 Booking
  • 10. Message Driven Architecture in Grails Function #1 Room Search • 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
  • 11. Message Driven Architecture in Grails FUNCTION #1 – ROOM SEARCH Gateway Service Interface Room Search Provides: List<Room> RatingEngine Provides: List<PublishedRoom> Message Channel PublishedRoomServic e DB
  • 12. Message Driven Architecture in Grails Function #2 Booking • 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
  • 13. Message Driven Architecture in Grails FUNCTION #2 – BOOKING PublishedRoomServic e Gateway Service Interface Provides: PublishedRoom RatingEngine Provides: PublishedRoom Booking Service Message Channel Notify Hotel MetricsService Pass-Thru: Booking EmailService Provides: Booking DB
  • 14. Message Driven Architecture in Grails PIPELINE WITH WORKFLOW GROUPS Message Channel AppPipeline Room Search Provides: List<Room> Message Router RatingEngine SearchRequest Handler PublishedRoomService Message Channel Provides: List<Publishe dRoom> BookingRequest Handler DB Message Channel PublishedRoomService Provides: PublishedRoom RatingEngine Provides: PublishedRoom Booking Service Notify Hotel MetricsService Pass-Thru: Booking EmailService Provides: Booking DB
  • 15. Message Driven Architecture in Grails WHY GO MESSAGE DRIVEN?
  • 16. Message Driven Architecture in Grails THANK YOU 

Editor's Notes

  • #2: Web development backed by a powerful messaging pipelineAn approach to architecture where messaging is a core conceptSpecifically going to talk about using Spring Integration as our Messaging framework within a Grails application
  • #4: Swiss Army Knife of messagingImplementation of the Enterprise Integration PatternsEIP talks about how we can effectively implement messaging, and outlines patterns for doing thatMore than just messaging abstraction, there’s a full tool setContinental benefits of having a Spring container
  • #5: Live code: mda-gateway
  • #6: Sometimes called a “Message Flow”
  • #7: Tirade about developer lack of flexibilityHate the argument that system is defined by its limitationsWrote a blog post about this ideaUsing it as a crutch because we weren’t liberal enough with the “limitations” is irresponsibleI always try to find ways to build applications that will be flexibleThis is good for agile since we don’t have that six-to-eighteen month requirements gathering periodIf a stakeholder didn’t get their thoughts in, shame on them!As developers we like agile, we want to be flexiblehate it when the business community wants to do the sameWant business community to come to us with fully formulated ideasComplain and get angry when requirements dramatically changeThat’s really one-sided of usNeed to build applications that are flexible to changing requirementsLet the business community discover requirements as we’re implementing them
  • #8: Sometimes maybe we get scared into thinking of splitting our app up and deploying brokers for the different piecesMDA is about extensibility and flexibility in your implementationStrictly speaking, MDA can be entirely in-memory within the appCan give you head-room to fit into a distributed architecture in the future“Forward thinking”
  • #9: I’ve talked about this idea of “Write it Once, Write it Right”By that, I don’t mean that you were able to foresee Need to approach application design in a different kind of wayStart at a very high level and think about what your application is and what it does. - Consider a contrived example of a banking system - *change slide*
  • #10: Think about the system at a very high level, in very broad termsWe can start to define some of the “functions” of the applicationThings that we know that we’ll need to satisfyIn Grails, our invocation point into these functions will be through a controller actionEach of the individual “functions” of the application can be thought of as a workflowSome “subsystem” of the application that handles a specific functionNo limit on how many workflows the application can accommodateFunctionally, workflows are discrete subsystems that can stand on their ownGreat for reusability (modularity)Design the application with messaging as a core tenant of the application architectureEach of the workflows will have their own, isolated messaging pipeline that the core will interface withInteraction with the workflows is managed through a centralized configurationOnly ever need to interact with one serviceGreat for testing, because we can focus on testing the domain logic and not the already-tested framework
  • #11: Start to hone-in on the actual implementation stepsThe more granular and fine-tuned we get with the workflowsThe more we can think about the workflows being encapsulatedDefining a contract with the workflowLike the workflows themselves, each of the steps of the workflow can be sustained on its ownDiscrete, reusable unitsFollows a somewhat “functional” style of programmingIn a more traditional application, we might create a service classWould lead to programmatic coupling of the stepsChain of Responsibility libraries (commons-chain) don’t necessarily lend themselves to centralized managementEasier to start violating SRPWhat do we hope to get out of a Message Driven Architecture?
  • #12: Sometimes called a “Message Flow”
  • #13: Start to hone-in on the actual implementation stepsThe more granular and fine-tuned we get with the workflowsThe more we can think about the workflows being encapsulatedDefining a contract with the workflowLike the workflows themselves, each of the steps of the workflow can be sustained on its ownDiscrete, reusable unitsFollows a somewhat “functional” style of programmingIn a more traditional application, we might create a service classWould lead to programmatic coupling of the stepsChain of Responsibility libraries (commons-chain) don’t necessarily lend themselves to centralized managementEasier to start violating SRPWhat do we hope to get out of a Message Driven Architecture?
  • #14: Sometimes called a “Message Flow”
  • #15: Sometimes called a “Message Flow”
  • #16: Ties back to Agile philosophy, where we discover and adapt the requirements and iterate rapidly on over an idea and base implementationComponent pieces of an application can be broken down to workflowsWorkflows can be built modularlySpring Integration gives us centralized management of those workflows through configuration&quot;Premiere Level of Encapsulation”Individual parts of the workflow can be replaced through configurationQuickly and easily adapt to evolving requirements and feature requestsIsolated workflow steps can be discretely unit-testedMuch more useful code coverage - Developing application in workflows adds relevance to the implementation - Easier to see the &quot;big picture&quot; - Workflows &amp; Workflow Steps are entirely reusable - Autowire candidates in Spring - Usable for batch too - Messaging &quot;plays nicely&quot; with other applications