Upload
britt-king
View
481
Download
0
Embed Size (px)
Citation preview
http://particular.net
Powering front end apps with NServiceBus
Sean Farmar – Mauro Servienti
Solution Architects @ Particular Software
Agenda
• Targeted responses overview
• Scale out issues
• Technical solutions
• Architectural implications
Targeted responses overview
• Also identified as Request/Reply
• Technical requirements may drive in the Request/Reply direction:• As seen with Elton Stoneman: SignalR clients
• IoT devices that cannot participate in a pub/sub based architecture
• Integrations with third party services or legacy systems
Queue
Request / Reply scenario
SignalRclient
HTTP basedFront-end
Back-endsystem
Message MessageSocket
Reply MessageReply Message
Queue
Request / Reply “Scale out” issue
SignalRclient
Front-endInstance-1
Back-endsystem
Message MessageSocket
Reply MessageReply Message
Front-endInstance-2
Front-endInstance-n
Socket
Instances Cluster
Request / Reply “Callbacks” scenario
Queue
SignalRclient
Front-endInstance-1
Back-endsystem
Message MessageSocket
Return Message
Front-endInstance-2
Front-endInstance-n
Instances Cluster
Retu
rnM
essage
“Callbacks” Scale Out issue
Queue
SignalRclient
Front-endInstance-1
Back-endsystem
Message MessageSocket
Return Message
Front-endInstance-2
Front-endInstance-n
Instances Cluster
Retu
rnM
essage
Backplane: transport agnostic
Queue
SignalRclient
Front-endInstance-1
Back-endsystem
Message MessageSocket
Reply / Event
Front-endInstance-2
Front-endInstance-n
Instances Cluster
backp
lane
Reply Message CopyNote: A backplane is a Single Point of Failure
Unique Queue Per Endpoint Instance
SignalRclient
Front-endInstance-1
Back-endsystem
Message MessageSocket
Reply / EventFront-endInstance-2
Front-endInstance-n
Instances Cluster
Exchange
Reply / Event Copy
Instance-2 binding
Note: Transport dependent
Single Responsibility Principle
• Backplanes and Unique Qs force endpoints to have one responsibility:• Talk to the SignalR client (in our sample)
• Be the bridge connecting 2 different infrastructures using different transports
• Such endpoints can’t have any business responsibility:• All the instances would receive a copy of the message
• All the instances would try to execute the same business logic