SlideShare a Scribd company logo
Asynchronous Messaging Sergey Shishkin http:// shishkin.org Image source:  http://www.flickr.com/photos/joits/1110215271/
Agenda Why Messaging? –  And what’s wrong with good old RPC? Sample scenario –  News module of the Prism’s StockTrader RI Under the hood of Message Bus – Building a Message Bus in 37 lines of code – And what those 37 lines did not cover? Image source:  http://www.flickr.com/photos/mychatham/206928250/
Communication Styles Remote Procedure Calls Synchronous High coupling One-Way Messages Asynchronous Loose coupling
Fallacies of Distributed Computing* *  http:// en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing The network is reliable Latency is zero Bandwidth is infinite The network is secure Topology doesn't change There is one administrator Transport cost is zero The network is homogeneous Image source:  http://www.flickr.com/photos/pascalcharest/308357541/
Composite Applications Image source:  http://www.flickr.com/photos/curiouslee/2136283589/ Modularized applications are similar to distributed ones GUI composition is solved by: Common region infrastructure Event-based GUI synchronization Same pattern in broader context Common Message Bus infrastructure Message-based components integration
Tenets of Service-Orientation* Image source:  http://www.flickr.com/photos/hyper-world/2401419260/ Boundaries are explicit Services are autonomous Services share schema and contract, not class Service compatibility is based upon policy *  http://msdn.microsoft.com/en-us/magazine/cc164026.aspx
Messaging Patterns *  http://www.enterpriseintegrationpatterns.com/toc.html Message Bus is a central place for implementing integration patterns*
Advantages of Messaging (I) Image source:  http://www.flickr.com/photos/renaissancechambara/2288556895/ Loose coupling Separation of concerns Orthogonal architecture
Advantages of Messaging (II) Testing Scalability
Disadvantages of Messaging Dependency tracing Who is publishing that message? Is publishing of that message required? Debugging Same as debugging of multithreaded apps Learning curve It’s not a new technology, it’s a paradigm shift Requires different mindset and discipline Image source:  http://www.flickr.com/photos/lwr/2257112719/
Guidelines Consider  messaging to loose coupling Avoid  RPC across modules/business services/bounded contexts* * In terms of DDD Image source:  http://www.flickr.com/photos/rodneytrotter/3323664794/
Look ahead Messaging is the default communication style for cloud-based services Silverlight does not support synchronous communication out of the box Image source:  http://www.flickr.com/photos/bestrated1/2441332480/
DEMO
References Composite WPF guidance aka “Prism”, StockTrader RI http://compositewpf.codeplex.com/ StockTrader with messages (revision 12, as shown in demo) http://code.google.com/p/messagingwpf/source/browse/trunk/src/StockTraderRI/ Some OSS messaging frameworks http://code.google.com/p/masstransit/ http://www.nservicebus.com https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/esb/ Fallacies of distributed computing http ://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing Four tenets of service orientation http://msdn.microsoft.com/en-us/magazine/cc164026.aspx Enterprise integration patterns http ://www.enterpriseintegrationpatterns.com/toc.html

More Related Content

PPTX
REST - You're Doing It Wrong
PPTX
NOSQL - not only sql
XLS
Plants names mangalapuzha
PDF
Hadoop & no sql new generation database systems
PPTX
Orthogonal Architecture
PDF
Hitchhiker's Guide to Functional Programming
PPTX
NServiceBus workshop presentation
PDF
Introduction to NServiceBus
REST - You're Doing It Wrong
NOSQL - not only sql
Plants names mangalapuzha
Hadoop & no sql new generation database systems
Orthogonal Architecture
Hitchhiker's Guide to Functional Programming
NServiceBus workshop presentation
Introduction to NServiceBus

Similar to Asynchronous Messaging @DNUG Cologne, 07.04.2009 (20)

PDF
Rigadevdays - Communication in a microservice architecture
PPTX
Scalable Persistent Message Brokering with WSO2 Message Broker
PPTX
NServiceBus - building a distributed system based on a messaging infrastructure
PPTX
Messaging in .NET via MassTransit by Arturs Karbone at .NET focused 73rd DevC...
PPTX
Message Oriented Middleware
PDF
Taking the hippie bus to the enterprise
PDF
Designing Distributed Systems
PPTX
Software Architecture taxonomies - Integration patterns
ODP
Are you weak in the middle?
PDF
Simple Solutions for Complex Problems - Boulder Meetup
PDF
Simple Solutions for Complex Problems - Boulder Meetup
PPTX
Message and Stream Oriented Communication
PPTX
SOA Pattern-Asynchronous Queuing
PDF
Devit - forget about http requests
PDF
Inter-Process Communication in distributed systems
PPTX
designing distributed scalable and reliable systems
PPTX
Azure Messaging Services 2
PDF
Messaging is not just for investment banks!
PDF
Unit 4.pdf
PPTX
Introduction to NServiceBus
Rigadevdays - Communication in a microservice architecture
Scalable Persistent Message Brokering with WSO2 Message Broker
NServiceBus - building a distributed system based on a messaging infrastructure
Messaging in .NET via MassTransit by Arturs Karbone at .NET focused 73rd DevC...
Message Oriented Middleware
Taking the hippie bus to the enterprise
Designing Distributed Systems
Software Architecture taxonomies - Integration patterns
Are you weak in the middle?
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup
Message and Stream Oriented Communication
SOA Pattern-Asynchronous Queuing
Devit - forget about http requests
Inter-Process Communication in distributed systems
designing distributed scalable and reliable systems
Azure Messaging Services 2
Messaging is not just for investment banks!
Unit 4.pdf
Introduction to NServiceBus
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Encapsulation theory and applications.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
August Patch Tuesday
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
project resource management chapter-09.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Hybrid model detection and classification of lung cancer
PDF
Mushroom cultivation and it's methods.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
OMC Textile Division Presentation 2021.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A comparative study of natural language inference in Swahili using monolingua...
A novel scalable deep ensemble learning framework for big data classification...
Encapsulation theory and applications.pdf
WOOl fibre morphology and structure.pdf for textiles
Assigned Numbers - 2025 - Bluetooth® Document
August Patch Tuesday
Group 1 Presentation -Planning and Decision Making .pptx
cloud_computing_Infrastucture_as_cloud_p
Heart disease approach using modified random forest and particle swarm optimi...
MIND Revenue Release Quarter 2 2025 Press Release
project resource management chapter-09.pdf
Zenith AI: Advanced Artificial Intelligence
NewMind AI Weekly Chronicles - August'25-Week II
Hybrid model detection and classification of lung cancer
Mushroom cultivation and it's methods.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
OMC Textile Division Presentation 2021.pptx
Ad

Asynchronous Messaging @DNUG Cologne, 07.04.2009

  • 1. Asynchronous Messaging Sergey Shishkin http:// shishkin.org Image source: http://www.flickr.com/photos/joits/1110215271/
  • 2. Agenda Why Messaging? – And what’s wrong with good old RPC? Sample scenario – News module of the Prism’s StockTrader RI Under the hood of Message Bus – Building a Message Bus in 37 lines of code – And what those 37 lines did not cover? Image source: http://www.flickr.com/photos/mychatham/206928250/
  • 3. Communication Styles Remote Procedure Calls Synchronous High coupling One-Way Messages Asynchronous Loose coupling
  • 4. Fallacies of Distributed Computing* * http:// en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing The network is reliable Latency is zero Bandwidth is infinite The network is secure Topology doesn't change There is one administrator Transport cost is zero The network is homogeneous Image source: http://www.flickr.com/photos/pascalcharest/308357541/
  • 5. Composite Applications Image source: http://www.flickr.com/photos/curiouslee/2136283589/ Modularized applications are similar to distributed ones GUI composition is solved by: Common region infrastructure Event-based GUI synchronization Same pattern in broader context Common Message Bus infrastructure Message-based components integration
  • 6. Tenets of Service-Orientation* Image source: http://www.flickr.com/photos/hyper-world/2401419260/ Boundaries are explicit Services are autonomous Services share schema and contract, not class Service compatibility is based upon policy * http://msdn.microsoft.com/en-us/magazine/cc164026.aspx
  • 7. Messaging Patterns * http://www.enterpriseintegrationpatterns.com/toc.html Message Bus is a central place for implementing integration patterns*
  • 8. Advantages of Messaging (I) Image source: http://www.flickr.com/photos/renaissancechambara/2288556895/ Loose coupling Separation of concerns Orthogonal architecture
  • 9. Advantages of Messaging (II) Testing Scalability
  • 10. Disadvantages of Messaging Dependency tracing Who is publishing that message? Is publishing of that message required? Debugging Same as debugging of multithreaded apps Learning curve It’s not a new technology, it’s a paradigm shift Requires different mindset and discipline Image source: http://www.flickr.com/photos/lwr/2257112719/
  • 11. Guidelines Consider messaging to loose coupling Avoid RPC across modules/business services/bounded contexts* * In terms of DDD Image source: http://www.flickr.com/photos/rodneytrotter/3323664794/
  • 12. Look ahead Messaging is the default communication style for cloud-based services Silverlight does not support synchronous communication out of the box Image source: http://www.flickr.com/photos/bestrated1/2441332480/
  • 13. DEMO
  • 14. References Composite WPF guidance aka “Prism”, StockTrader RI http://compositewpf.codeplex.com/ StockTrader with messages (revision 12, as shown in demo) http://code.google.com/p/messagingwpf/source/browse/trunk/src/StockTraderRI/ Some OSS messaging frameworks http://code.google.com/p/masstransit/ http://www.nservicebus.com https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/esb/ Fallacies of distributed computing http ://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing Four tenets of service orientation http://msdn.microsoft.com/en-us/magazine/cc164026.aspx Enterprise integration patterns http ://www.enterpriseintegrationpatterns.com/toc.html