SlideShare una empresa de Scribd logo
1 de 68
Message
Oriented
Middleware
A peek into the middle
of the enterprise
software architecture
stack.
AGENDA
This is what we will peek into
Architecture Fundamentals
AGENDA
This is what we will peek into
Different Kinds of
Architecture
Let us traverse through
the way computer and
software architecture has
moved through the
decades.
ARCHITECTURE:
ARCHITECTURE:
ARCHITECTURE:
ARCHITECTURE:
Monolithic
RPC
EAI
SOA
IOT
Rise of the Web
Rise of the Frameworks
Rise of the Middleware
Rise of the Services
Rise of the Machines
Revisiting the
fundamentals………
• Synchronous Communication.
• Asynchronous Communication.
• State Handling and Finite states.
• Multi-threading.
• Publisher-Subscriber.
Synchronous - Asynchronous Communication
State handling and finite states
Multi threading
Publisher Subscriber
WORKFLOWS
Tech Stack
• A peek into a software technical
stack of a company.
SLACK
Tech Stack of Slack
Applications in
the Enterprise
• A peek into how
applications in the
enterprise are stationed
and interact with each
other
MIDDLEWARE
 Introduction
 Messages and Queues
 Message Queues
 Configuring message
queues
Block
Representation of
middleware Application Layer
Middleware
Server/Platform/
OS side
Application Layer
Middleware
Server/Platform/
OS side
• Middleware is a link between two or
more objects:
Different parts of the application
Different local applications
Different distributed applications
• Is computer software that provides
services to software applications
beyond those available from the
operating system. Essentially,
middleware is a software glue.
• Assists applications to interact or
communicate with other applications,
networks, hardware, and/or
operating systems.
Objectives
• Hide heterogeneity.
• Location independence.
• Common functionality needed by many
applications.
• Software portability and mobile code.
• Help integrate legacy facilities.
• Aid application interoperability.
• Aid scalability.
• Reliability and Availability.
• Reduce application development and
maintenance.
Middleware
• Middleware supports and simplifies
complex distributed applications.
• It includes web servers, application
servers, messaging and similar tools
that support application development
and delivery.
• Middleware is especially integral to
modern information technology based
on XML, SOAP, Web services, and
service-oriented architecture.
Types of Middleware
• Database Middleware.
Enables applications to communicate with one or more
local or remote database.
• Application Server Middleware
Used as middleware between browser and legacy systems
• Messaging Middleware:
Transactional – X/Open XA
Procedural – XML-RPC...
Object oriented – CORBA...
• Message oriented Middleware
Message QueuesBrokersBus
ESB
• Transaction Processing Middleware
MESSAGE
QUEUES
&
MESSAGE
ORIENTED
MIDDLEWARE
Messages:
 Messages:
Communication
conveyed from one
person or group to
another.
 Example: email, chat,
notifications, etc,
Queues:
 Queue: Queue is a
form of arrangement,
where items are
processed in
sequential order.
 Example: Queues in
ATM, bill payment,
etc.
Message Queues:
 Is a design pattern used in system
architecture which is used to achieve fail
safe and high availability. It follows store
and forward communication.
 Advantages:
 Allows application to connect in
asynchronous way.
 Allows to handle multiple request at
same time.
 Decoupling design in achieved in the
application using MQ
 Uses:
 Email service
 Web chat
 Notication and Alerting service
 Order Processing in e-commerce
sites
Configuration:
A message queue can be configured in the following different ways:
 Private Queue
 Sending to a private queue requires sender
authentication.
 Defines different access rights.
 Public Queue
 All senders may send messages without
access control.
 Journal Queue
 Keeps a copy of every received message
for logging or monitoring purposes.
 Dead Letter Queue
 Queue that holds undeliverable messages
(messages that time out due to time-to-
live (TTL) expiry or whose queue address
could not be resolved).
 Bridge / connector queue:
 Connects different queue systems, e.g.
MSMQ and JMS based messaging systems.
MESSAGE ORIENTED
MIDDLEWARE
(MOM)
Message Oriented Middleware is
a specific class of middleware
that supports the exchange of
general-purpose messages in a
distributed application
environment.
Message
Oriented
Middleware
• Messages are
exchanged
asynchronously
between distributed
applications (senders
and receivers).
• Solves problem of
client having to know
where the server is
and what needs to be
done.
• The message queue
serves as a central
exchange of messages
(hub and spoke
architecture, queue routes
messages to the
destination queue).
• A message queue provides
additional decoupling
between senders and
receivers.
• The queue may perform
additional functions such
as filtering, message
transformations (e.g.
enrich messages with data
from a DB) and load
balancing and is also
referred to as message
broker.
Key Components of a MOM
Message
Receiver
Message Router Message Delivery
Network
BLOCK DIAGRAM:
FEATURES:
 Asynchronous operation:
 Sending of messages is unblocking. The
sender application may continue its work,
the sender queue tries to deliver the
message on behalf of the sender
application (until successful).
 Transaction support:
 Sending and receiving a series of messages
may be „packed“ into a transaction. Either
all messages are successfully sent and
received or none.
 In-order delivery:
 Messages are queued in the order
they are sent. However, messages
may „overtake“ messages other
based on priorities.
 Priority-based delivery:
 Messages are queued according to
a priority scheme (the receiver
queue passes messages with
highest priority first to the receiving
application).
FEATURES:
 Message formatting:
 Possibility to “wrap“messages into formats
such as SOAP over HTTP, XML or plain text.
 Notification services (triggers):
 Receiver: MOM sends notifications of new
enqueued messages to the receiver.
 Sender: MOM sends notifications of the
successful delivery of sent messages to the
sender.
 Message filtering: The queue performs
filtering based on different criteria:
 Message properties (message header
fields), e.g. priority.
 Message body (e.g. SQL expression).
 Message routing:
 Message forwarding through intermediate
message queues (= brokers).
 Message routing may be based on different
criteria (e.g. current workload on
destination queues for load balancing).
 Message security:
 Apply security functions like message
authentication, encryption and message
integrity.
FEATURES:
 Supported message transport
protocols:
 TCP or UDP (simplest transport protocol)
 HTTP or HTTPs (good for sending
messages over the Internet)
 SMTP
 FTP
 Messaging system proprietary transport
protocol
 Message peek and receive:
 Peeking allows a receiving application to
receive a copy of a message from a queue.
The message is left in queue. Only a
receive operation actually removes the
message from the queue ("pop" a
message).
 Delivery mode, Quality of Service
(QoS):
 Guaranteed delivery, highest QoS
 Persistent mode, messages survive queue
crashes.
Different Kinds of Messaging Models
• Let us go thorough a few models of
Asynchronous interaction where the
Client and server are loosely
coupled Messages are queued and
applications are integrated, support
is provided for reliable delivery and
messages that could be processed
by intermediate messaging servers.
P2P: Point to Point
 1 queue per receiver (application)
 1-to-1 (1 sender, 1 receiver) or N-to-
1 messaging (many senders, 1
receiver)
Publish-Subscribe
 1-to-N or N-to-N distribution of
messages (same message may be
received by multiple receivers if
these are subscribed).
 Similar to a message board. Rather
than distributing messages to
queues, the message broker routes
messages to subscribers. Thus
messages may be sent to multiple
receivers (multicast).
FIFO Queues
 First In First out Queues
 All messages have the same priority
level.
 Messages are delivered in the order
they are sent.
Priority Queues
• Messages are buffered in FIFO
queues and ordered based on
priority.
• N.B.: The ordering applies to the
set of messages that are in the
queue at a specific point in time
(= messages that are not yet
received by an application).
• .
Different Kinds of Messages and
Acknowledgements
Types of Messages
• Persistent Messages
Message that can be stored in disk/database.
Messages that can be retrieved upon startup.
Messages that guarantee delivery.
• Non-Persistent Messages
Message is kept in volatile memory.
Offers high performance compared to persistent message
Once the queue goes down the messages in the message
queue is lost.
Types of Message
Acknowledgements
• Automatic Acknowledgements.
• Explicit Acknowledgements.
• JMS Transaction based
acknowledgements.
• At most once  Messages may be lost but are
never redelivered.
• At least once  Messages are never lost but
may be redelivered. The sending queue keeps
the message in persistent store until it receives a
positive acknowledge of the correct reception of
the message by the target application. After a
crash, the sending queue does not query the
receiving queue if it already has received the
message, but just re-sends the message.
• Exactly once  Each message is delivered once
and only once. Guaranteed delivery, The sending
queue keeps the message in persistent store (like
exactly-once).
• Non-persistent mode. (no delivery guarantee,
lowest QoS):
Message Delivery
Semantics
Applications in
the Enterprise
• A peek into how
applications Look after
Message oriented
middleware enters the
fray.
Utilization:
Utilization:
• .
Different Kinds of Deployment of Message
Queues
Deployment:
Scaled Deployment:
ALTERNATIVES IN
THE MARKET
TODAY.
Alternatives:
There are many COTS message brokers and queuing servers that are available today.
However, there are certain alternatives terminologytechnology that can be used.
 Custom built Enterprise messaging
system using varieties of technology.
 Enterprise service bus architecture.
 Http server that support SSE.
 Data pipeline systems
ESB:
Enterprise Service Bus is a shared messaging layer for connecting applications and other
services throughout an enterprise infrastructure. It supplements its core asynchronous
messaging backbone with intelligent transformation and routing to ensure messages are
passed reliably. Services participate in the ESB using either web services messaging standards
or the Java Message System
 An ESB is software infrastructure that
simplifies the integration and flexible
reuse of business components using
a SOA. An ESB makes it easy to
dynamically connect, mediate, control
services and their interactions.
 ESB is not a Web Server or an
Application Server
 The ESB check list
 Standard compliance
 WS-* standards compliance (beware
of Vendor’s bias!)
 Interoperability
 WS Stack standard compliance
 Flexibility : REST | SOAP
Block Diagram:
A very high level block diagram of an ESB could be depicted as follows:
Web Service
Stack
Adapters and Connectors
Routing and Mediation
Messaging Backbone
Legacy
Systems
HTTP SSE:
HTTP based Server Sent Events achieves One Way Messaging where a web page
automatically gets updates from a server.
 The EventSource object is used to
receive server-sent event notifications
 We will need a server capable of
sending data updates (like PHP or
ASP or Glassfish(Jersey), ).
 We can consider using Server Sent
Events when we have some rapidly
updating data to display.
 Examples might include displaying
the status of a long running business
process, tracking stock price updates,
or showing the current number of
likes on a post on a social media
network.
Block Diagram:
A very high level block diagram of an SSE Server could be depicted as follows:
Data Pipelines:
Data pipeline are a system which allows to move data from one sub system to another sub
system within system or sometimes across system
 Helps to transform data from one
format to another
 Removes un necessary columns or
data points
 Mask sensitive information
 Insert Record
 Ability to speak with different
consumer and producer data.
 Data Pipeline system can also mimic
as message queue.
Block Diagram:
A very high level block diagram of an Data pipeline system could be depicted as follows:
HANDS-ON
Simple interaction using HTTP-
SSE
WORKFLOW:
A simple workflow that describes what will be happening
COTS tools
A very small brief of the various
tools that are used in the
industry for MOM kind of use.
ActiveMQ:
 Apache ActiveMQ is a JMS compliant
message broker
 Written in Java but support API for other
language to extend the functionality.
 Open Sourced and suitable for business
modesl.
 Provides reliability, performance, high
availability and security for messaging
 It offers extra set of features compared to
JMS standard specification.
 Supported Protocols
 Open-Wire (default in ActiveMQ; a binary
protocol)
 Clients for C++, Java and .NET
 STOMP Simple Text Oriented Messaging
Protocol; a text based protocol
 Clients for C, JavaScript, Perl, PHP, Python,
Ruby
 XMPP Used extensively in chat applications
 REST
 HTTP POST and GET
IBM WS MQ:
 Multiplatform MOM from IBM. Available on
IBM platforms, .Net, Linux etc.
 •Various APIs such as JMS, XMS (JMS API for
.Net, C/C++), MQI (MQ native interface).
 Main elements of WebSphere MQ:
 Queue manager: is the container for a
message queue, is responsible for
transferring messages to other queue
managers over a message channel. The
QM may reside on the same host as the
application or on a separate host.
 The main supported topologies are:
 Hub and spoke topology (P2P queues):
 Applications subscribe to "their" queue
manager.
 Routes to hub QM are manually defined in
spoke QMs.
 Distributed Pub-Sub:
 Applications subscribe to topics and send
messages to multiple receivers (publish).
 2 Topologies:
 Clusters and trees. Cluster of queue
manager connected by channels between
QMs. Published messages are sent to all
connected queue managers of the
published topic. Trees allow reducing the
number of channels between the QMS
MS MSMQ:
 Message infrastructure and a
development platform for creating
distributed, loosely coupled system
 It offers guaranteed message
delivery, efficient routing, security
and transaction support
 Guaranteed message delivery
(message delivered even when queue
is temporarily down).
 Message routing.
 Security (optional authentication and
encryption).
 Priority-based messaging.
 Different message transport
protocols.
 MSMQ can be run in 2 modes
 Workgroup Mode: Private Queues in
workgroup mode.
 Domain Mode: allows sending messages
between multiple domains, both private
and public queues are possible here
 Message size can not be more than 4
MB. 2GB Queue size limit
KAFKA:
 Open source streaming platform developed
at LinkedIn. A distributed publish-subscribe
messaging system that maintains feeds of
messages called topics
 Publishers write data to topics and
subscribers read from topics
 Kafka topics are partitioned and replicated
across multiple nodes in your Hadoop
cluster
 Enables “source to sink” data pipelines. Kafka
messages are simple, byte-long arrays that
can store objects in virtually any format with
a key attached to each message; often in
JSON
 E&L in ETL through Kafka Connect API
 T in ETL through Kafka Streams API
 Fault-tolerant
 Kafka is high throughput distributed message
system . Used to build data pipeline, real
time streaming and messaging system. Acts
as data collector: Collects data from various
source and aggregates to common format.
Built on top of Scala and Java. Kafka allows
to have separation of concern in application
level.
RabbitMQ:
 Open source message broker platform.
Receives messages from brokers and pushes
them to the registered consumers.
 The broker pushes messages—which are
queued in random order—toward the
consumers. Brokers are persistently
connected to consumer, and they know
which ones are subscribed to which queues.
Consumers cannot fetch specific messages,
but can receive them unordered unaware of
the queue state
 Messages, queues, and exchanges do not
persist unless otherwise instructed.
 If a broker is restarted or fails, the messages
are lost
 Has settings to make both queues and
messages durable. Moreover, non-critical
messages can be tagged by the producer to not
be sent to a durable queue
 Allows producers’ and consumers’ code to
declare new queues and exchanges. Several
replication and load balancing alternatives
 Message Patterns:
 Direct: Routes message to the queues which
matches the binding key
 Fanout: Broadcast messages to all queues that
are bound to it.
 Topic : Broadcast message to all queues that
are bound to it using binding keys
Thanks

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Messaging Systems on AWS
Messaging Systems on AWSMessaging Systems on AWS
Messaging Systems on AWS
 
Message queue architecture
Message queue architectureMessage queue architecture
Message queue architecture
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Amazon SQS overview
Amazon SQS overviewAmazon SQS overview
Amazon SQS overview
 
AWS ELB - Fundamentals
AWS ELB - FundamentalsAWS ELB - Fundamentals
AWS ELB - Fundamentals
 
Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...
Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...
Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practices
 
Introduction to Amazon Elastic File System (EFS)
Introduction to Amazon Elastic File System (EFS)Introduction to Amazon Elastic File System (EFS)
Introduction to Amazon Elastic File System (EFS)
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
 
STG301_Deep Dive on Amazon S3 and Glacier Architecture
STG301_Deep Dive on Amazon S3 and Glacier ArchitectureSTG301_Deep Dive on Amazon S3 and Glacier Architecture
STG301_Deep Dive on Amazon S3 and Glacier Architecture
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)
 
Amazon Kinesis
Amazon KinesisAmazon Kinesis
Amazon Kinesis
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Intro to Amazon S3
Intro to Amazon S3Intro to Amazon S3
Intro to Amazon S3
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Amazon_SNS.pptx
Amazon_SNS.pptxAmazon_SNS.pptx
Amazon_SNS.pptx
 

Similar a Message Oriented Middleware

High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
James Carr
 
1. Overview of Distributed Systems
1. Overview of Distributed Systems1. Overview of Distributed Systems
1. Overview of Distributed Systems
Daminda Herath
 

Similar a Message Oriented Middleware (20)

An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
 
Mq Lecture
Mq LectureMq Lecture
Mq Lecture
 
1480-techintrotoiib-150224130001-conversion-gate01.pptx
1480-techintrotoiib-150224130001-conversion-gate01.pptx1480-techintrotoiib-150224130001-conversion-gate01.pptx
1480-techintrotoiib-150224130001-conversion-gate01.pptx
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
RabbitMq
RabbitMqRabbitMq
RabbitMq
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
ISUG SSB Lior King
ISUG SSB Lior KingISUG SSB Lior King
ISUG SSB Lior King
 
C/S archtecture including basic networking
C/S archtecture including basic networkingC/S archtecture including basic networking
C/S archtecture including basic networking
 
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
 
Csc network
Csc networkCsc network
Csc network
 
Iso model
Iso modelIso model
Iso model
 
Linux Inter Process Communication
Linux Inter Process CommunicationLinux Inter Process Communication
Linux Inter Process Communication
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Topic 5- Communications v1.pptx
Topic 5- Communications v1.pptxTopic 5- Communications v1.pptx
Topic 5- Communications v1.pptx
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
 
1. Overview of Distributed Systems
1. Overview of Distributed Systems1. Overview of Distributed Systems
1. Overview of Distributed Systems
 
Event-driven architecture with Java technology stack
Event-driven architecture with Java technology stackEvent-driven architecture with Java technology stack
Event-driven architecture with Java technology stack
 
Ruby Microservices with RabbitMQ
Ruby Microservices with RabbitMQRuby Microservices with RabbitMQ
Ruby Microservices with RabbitMQ
 

Más de Manuswath K.B

Más de Manuswath K.B (20)

Performance Management 101 on Self Evaluations and writing Self Appraisal for...
Performance Management 101 on Self Evaluations and writing Self Appraisal for...Performance Management 101 on Self Evaluations and writing Self Appraisal for...
Performance Management 101 on Self Evaluations and writing Self Appraisal for...
 
Setting yearly goals and kra’s
Setting yearly goals and kra’sSetting yearly goals and kra’s
Setting yearly goals and kra’s
 
Acronyms in the healthcare software space
Acronyms in the healthcare software spaceAcronyms in the healthcare software space
Acronyms in the healthcare software space
 
Product and Technical product backlog of pdf viewer
Product and Technical product backlog of pdf viewerProduct and Technical product backlog of pdf viewer
Product and Technical product backlog of pdf viewer
 
Different kind of healthcare providers
Different kind of healthcare providersDifferent kind of healthcare providers
Different kind of healthcare providers
 
The 5 second rule and its applicability to ux
The 5 second rule and its applicability to uxThe 5 second rule and its applicability to ux
The 5 second rule and its applicability to ux
 
Silence the effect of silence on the way a team functions
Silence the effect of silence on the way a team functionsSilence the effect of silence on the way a team functions
Silence the effect of silence on the way a team functions
 
Product mindset
Product mindsetProduct mindset
Product mindset
 
Problem oriented medical record
Problem oriented medical recordProblem oriented medical record
Problem oriented medical record
 
What to understand when you hear “Service Mindset” during your Performance Ap...
What to understand when you hear “Service Mindset” during your Performance Ap...What to understand when you hear “Service Mindset” during your Performance Ap...
What to understand when you hear “Service Mindset” during your Performance Ap...
 
Service companies vs product companies
Service companies vs product companiesService companies vs product companies
Service companies vs product companies
 
Annoying ads and popups
Annoying ads and popupsAnnoying ads and popups
Annoying ads and popups
 
Versioning your css and scripts
Versioning your css and scriptsVersioning your css and scripts
Versioning your css and scripts
 
Rule of thirds in web design
Rule of thirds in web designRule of thirds in web design
Rule of thirds in web design
 
What are patient demographical data
What are patient demographical dataWhat are patient demographical data
What are patient demographical data
 
About agile and pm’ing
About agile and pm’ingAbout agile and pm’ing
About agile and pm’ing
 
Hidden gotcha’s of various open source licenses
Hidden gotcha’s of various open source licensesHidden gotcha’s of various open source licenses
Hidden gotcha’s of various open source licenses
 
Principles of display design
Principles of display designPrinciples of display design
Principles of display design
 
The power of 7
The power of 7The power of 7
The power of 7
 
A bit about me. Introducing Manuswath
A bit about me. Introducing ManuswathA bit about me. Introducing Manuswath
A bit about me. Introducing Manuswath
 

Último

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Message Oriented Middleware

  • 1. Message Oriented Middleware A peek into the middle of the enterprise software architecture stack.
  • 2. AGENDA This is what we will peek into Architecture Fundamentals
  • 3. AGENDA This is what we will peek into
  • 4. Different Kinds of Architecture Let us traverse through the way computer and software architecture has moved through the decades.
  • 8. ARCHITECTURE: Monolithic RPC EAI SOA IOT Rise of the Web Rise of the Frameworks Rise of the Middleware Rise of the Services Rise of the Machines
  • 9. Revisiting the fundamentals……… • Synchronous Communication. • Asynchronous Communication. • State Handling and Finite states. • Multi-threading. • Publisher-Subscriber.
  • 10. Synchronous - Asynchronous Communication
  • 11. State handling and finite states
  • 15.
  • 16.
  • 17. Tech Stack • A peek into a software technical stack of a company.
  • 19. Applications in the Enterprise • A peek into how applications in the enterprise are stationed and interact with each other
  • 20. MIDDLEWARE  Introduction  Messages and Queues  Message Queues  Configuring message queues
  • 21. Block Representation of middleware Application Layer Middleware Server/Platform/ OS side Application Layer Middleware Server/Platform/ OS side • Middleware is a link between two or more objects: Different parts of the application Different local applications Different distributed applications • Is computer software that provides services to software applications beyond those available from the operating system. Essentially, middleware is a software glue. • Assists applications to interact or communicate with other applications, networks, hardware, and/or operating systems.
  • 22. Objectives • Hide heterogeneity. • Location independence. • Common functionality needed by many applications. • Software portability and mobile code. • Help integrate legacy facilities. • Aid application interoperability. • Aid scalability. • Reliability and Availability. • Reduce application development and maintenance.
  • 23. Middleware • Middleware supports and simplifies complex distributed applications. • It includes web servers, application servers, messaging and similar tools that support application development and delivery. • Middleware is especially integral to modern information technology based on XML, SOAP, Web services, and service-oriented architecture.
  • 24. Types of Middleware • Database Middleware. Enables applications to communicate with one or more local or remote database. • Application Server Middleware Used as middleware between browser and legacy systems • Messaging Middleware: Transactional – X/Open XA Procedural – XML-RPC... Object oriented – CORBA... • Message oriented Middleware Message QueuesBrokersBus ESB • Transaction Processing Middleware
  • 26. Messages:  Messages: Communication conveyed from one person or group to another.  Example: email, chat, notifications, etc,
  • 27. Queues:  Queue: Queue is a form of arrangement, where items are processed in sequential order.  Example: Queues in ATM, bill payment, etc.
  • 28. Message Queues:  Is a design pattern used in system architecture which is used to achieve fail safe and high availability. It follows store and forward communication.  Advantages:  Allows application to connect in asynchronous way.  Allows to handle multiple request at same time.  Decoupling design in achieved in the application using MQ  Uses:  Email service  Web chat  Notication and Alerting service  Order Processing in e-commerce sites
  • 29. Configuration: A message queue can be configured in the following different ways:  Private Queue  Sending to a private queue requires sender authentication.  Defines different access rights.  Public Queue  All senders may send messages without access control.  Journal Queue  Keeps a copy of every received message for logging or monitoring purposes.  Dead Letter Queue  Queue that holds undeliverable messages (messages that time out due to time-to- live (TTL) expiry or whose queue address could not be resolved).  Bridge / connector queue:  Connects different queue systems, e.g. MSMQ and JMS based messaging systems.
  • 30. MESSAGE ORIENTED MIDDLEWARE (MOM) Message Oriented Middleware is a specific class of middleware that supports the exchange of general-purpose messages in a distributed application environment.
  • 31. Message Oriented Middleware • Messages are exchanged asynchronously between distributed applications (senders and receivers). • Solves problem of client having to know where the server is and what needs to be done. • The message queue serves as a central exchange of messages (hub and spoke architecture, queue routes messages to the destination queue). • A message queue provides additional decoupling between senders and receivers. • The queue may perform additional functions such as filtering, message transformations (e.g. enrich messages with data from a DB) and load balancing and is also referred to as message broker.
  • 32. Key Components of a MOM Message Receiver Message Router Message Delivery Network
  • 34. FEATURES:  Asynchronous operation:  Sending of messages is unblocking. The sender application may continue its work, the sender queue tries to deliver the message on behalf of the sender application (until successful).  Transaction support:  Sending and receiving a series of messages may be „packed“ into a transaction. Either all messages are successfully sent and received or none.  In-order delivery:  Messages are queued in the order they are sent. However, messages may „overtake“ messages other based on priorities.  Priority-based delivery:  Messages are queued according to a priority scheme (the receiver queue passes messages with highest priority first to the receiving application).
  • 35. FEATURES:  Message formatting:  Possibility to “wrap“messages into formats such as SOAP over HTTP, XML or plain text.  Notification services (triggers):  Receiver: MOM sends notifications of new enqueued messages to the receiver.  Sender: MOM sends notifications of the successful delivery of sent messages to the sender.  Message filtering: The queue performs filtering based on different criteria:  Message properties (message header fields), e.g. priority.  Message body (e.g. SQL expression).  Message routing:  Message forwarding through intermediate message queues (= brokers).  Message routing may be based on different criteria (e.g. current workload on destination queues for load balancing).  Message security:  Apply security functions like message authentication, encryption and message integrity.
  • 36. FEATURES:  Supported message transport protocols:  TCP or UDP (simplest transport protocol)  HTTP or HTTPs (good for sending messages over the Internet)  SMTP  FTP  Messaging system proprietary transport protocol  Message peek and receive:  Peeking allows a receiving application to receive a copy of a message from a queue. The message is left in queue. Only a receive operation actually removes the message from the queue ("pop" a message).  Delivery mode, Quality of Service (QoS):  Guaranteed delivery, highest QoS  Persistent mode, messages survive queue crashes.
  • 37. Different Kinds of Messaging Models • Let us go thorough a few models of Asynchronous interaction where the Client and server are loosely coupled Messages are queued and applications are integrated, support is provided for reliable delivery and messages that could be processed by intermediate messaging servers.
  • 38. P2P: Point to Point  1 queue per receiver (application)  1-to-1 (1 sender, 1 receiver) or N-to- 1 messaging (many senders, 1 receiver)
  • 39. Publish-Subscribe  1-to-N or N-to-N distribution of messages (same message may be received by multiple receivers if these are subscribed).  Similar to a message board. Rather than distributing messages to queues, the message broker routes messages to subscribers. Thus messages may be sent to multiple receivers (multicast).
  • 40. FIFO Queues  First In First out Queues  All messages have the same priority level.  Messages are delivered in the order they are sent.
  • 41. Priority Queues • Messages are buffered in FIFO queues and ordered based on priority. • N.B.: The ordering applies to the set of messages that are in the queue at a specific point in time (= messages that are not yet received by an application).
  • 42. • . Different Kinds of Messages and Acknowledgements
  • 43. Types of Messages • Persistent Messages Message that can be stored in disk/database. Messages that can be retrieved upon startup. Messages that guarantee delivery. • Non-Persistent Messages Message is kept in volatile memory. Offers high performance compared to persistent message Once the queue goes down the messages in the message queue is lost.
  • 44. Types of Message Acknowledgements • Automatic Acknowledgements. • Explicit Acknowledgements. • JMS Transaction based acknowledgements.
  • 45. • At most once  Messages may be lost but are never redelivered. • At least once  Messages are never lost but may be redelivered. The sending queue keeps the message in persistent store until it receives a positive acknowledge of the correct reception of the message by the target application. After a crash, the sending queue does not query the receiving queue if it already has received the message, but just re-sends the message. • Exactly once  Each message is delivered once and only once. Guaranteed delivery, The sending queue keeps the message in persistent store (like exactly-once). • Non-persistent mode. (no delivery guarantee, lowest QoS): Message Delivery Semantics
  • 46. Applications in the Enterprise • A peek into how applications Look after Message oriented middleware enters the fray.
  • 49. • . Different Kinds of Deployment of Message Queues
  • 53. Alternatives: There are many COTS message brokers and queuing servers that are available today. However, there are certain alternatives terminologytechnology that can be used.  Custom built Enterprise messaging system using varieties of technology.  Enterprise service bus architecture.  Http server that support SSE.  Data pipeline systems
  • 54. ESB: Enterprise Service Bus is a shared messaging layer for connecting applications and other services throughout an enterprise infrastructure. It supplements its core asynchronous messaging backbone with intelligent transformation and routing to ensure messages are passed reliably. Services participate in the ESB using either web services messaging standards or the Java Message System  An ESB is software infrastructure that simplifies the integration and flexible reuse of business components using a SOA. An ESB makes it easy to dynamically connect, mediate, control services and their interactions.  ESB is not a Web Server or an Application Server  The ESB check list  Standard compliance  WS-* standards compliance (beware of Vendor’s bias!)  Interoperability  WS Stack standard compliance  Flexibility : REST | SOAP
  • 55. Block Diagram: A very high level block diagram of an ESB could be depicted as follows: Web Service Stack Adapters and Connectors Routing and Mediation Messaging Backbone Legacy Systems
  • 56. HTTP SSE: HTTP based Server Sent Events achieves One Way Messaging where a web page automatically gets updates from a server.  The EventSource object is used to receive server-sent event notifications  We will need a server capable of sending data updates (like PHP or ASP or Glassfish(Jersey), ).  We can consider using Server Sent Events when we have some rapidly updating data to display.  Examples might include displaying the status of a long running business process, tracking stock price updates, or showing the current number of likes on a post on a social media network.
  • 57. Block Diagram: A very high level block diagram of an SSE Server could be depicted as follows:
  • 58. Data Pipelines: Data pipeline are a system which allows to move data from one sub system to another sub system within system or sometimes across system  Helps to transform data from one format to another  Removes un necessary columns or data points  Mask sensitive information  Insert Record  Ability to speak with different consumer and producer data.  Data Pipeline system can also mimic as message queue.
  • 59. Block Diagram: A very high level block diagram of an Data pipeline system could be depicted as follows:
  • 61. WORKFLOW: A simple workflow that describes what will be happening
  • 62. COTS tools A very small brief of the various tools that are used in the industry for MOM kind of use.
  • 63. ActiveMQ:  Apache ActiveMQ is a JMS compliant message broker  Written in Java but support API for other language to extend the functionality.  Open Sourced and suitable for business modesl.  Provides reliability, performance, high availability and security for messaging  It offers extra set of features compared to JMS standard specification.  Supported Protocols  Open-Wire (default in ActiveMQ; a binary protocol)  Clients for C++, Java and .NET  STOMP Simple Text Oriented Messaging Protocol; a text based protocol  Clients for C, JavaScript, Perl, PHP, Python, Ruby  XMPP Used extensively in chat applications  REST  HTTP POST and GET
  • 64. IBM WS MQ:  Multiplatform MOM from IBM. Available on IBM platforms, .Net, Linux etc.  •Various APIs such as JMS, XMS (JMS API for .Net, C/C++), MQI (MQ native interface).  Main elements of WebSphere MQ:  Queue manager: is the container for a message queue, is responsible for transferring messages to other queue managers over a message channel. The QM may reside on the same host as the application or on a separate host.  The main supported topologies are:  Hub and spoke topology (P2P queues):  Applications subscribe to "their" queue manager.  Routes to hub QM are manually defined in spoke QMs.  Distributed Pub-Sub:  Applications subscribe to topics and send messages to multiple receivers (publish).  2 Topologies:  Clusters and trees. Cluster of queue manager connected by channels between QMs. Published messages are sent to all connected queue managers of the published topic. Trees allow reducing the number of channels between the QMS
  • 65. MS MSMQ:  Message infrastructure and a development platform for creating distributed, loosely coupled system  It offers guaranteed message delivery, efficient routing, security and transaction support  Guaranteed message delivery (message delivered even when queue is temporarily down).  Message routing.  Security (optional authentication and encryption).  Priority-based messaging.  Different message transport protocols.  MSMQ can be run in 2 modes  Workgroup Mode: Private Queues in workgroup mode.  Domain Mode: allows sending messages between multiple domains, both private and public queues are possible here  Message size can not be more than 4 MB. 2GB Queue size limit
  • 66. KAFKA:  Open source streaming platform developed at LinkedIn. A distributed publish-subscribe messaging system that maintains feeds of messages called topics  Publishers write data to topics and subscribers read from topics  Kafka topics are partitioned and replicated across multiple nodes in your Hadoop cluster  Enables “source to sink” data pipelines. Kafka messages are simple, byte-long arrays that can store objects in virtually any format with a key attached to each message; often in JSON  E&L in ETL through Kafka Connect API  T in ETL through Kafka Streams API  Fault-tolerant  Kafka is high throughput distributed message system . Used to build data pipeline, real time streaming and messaging system. Acts as data collector: Collects data from various source and aggregates to common format. Built on top of Scala and Java. Kafka allows to have separation of concern in application level.
  • 67. RabbitMQ:  Open source message broker platform. Receives messages from brokers and pushes them to the registered consumers.  The broker pushes messages—which are queued in random order—toward the consumers. Brokers are persistently connected to consumer, and they know which ones are subscribed to which queues. Consumers cannot fetch specific messages, but can receive them unordered unaware of the queue state  Messages, queues, and exchanges do not persist unless otherwise instructed.  If a broker is restarted or fails, the messages are lost  Has settings to make both queues and messages durable. Moreover, non-critical messages can be tagged by the producer to not be sent to a durable queue  Allows producers’ and consumers’ code to declare new queues and exchanges. Several replication and load balancing alternatives  Message Patterns:  Direct: Routes message to the queues which matches the binding key  Fanout: Broadcast messages to all queues that are bound to it.  Topic : Broadcast message to all queues that are bound to it using binding keys

Notas del editor

  1. For example, Astoria Oregon is a town on the Oregon coast well know for its starring role in the movie “The Goonies”. Today, we will take a trip from our school to Astoria through miles and time…
  2. Synchronous operation (caller is blocked until called returns). The client is blocked until the server (object operation) call returns (tight coupling). Connection overhead (each call needs marshalling, entails protocol overhead for network access etc.). Difficult to react to failures (server may throw an exception, may not be active etc.). Not well-suited for nested calls (server object calls back client object which potentially calls another server object operation). Asynchronous operation (caller is not blocked handles response app).
  3. You can use this type of slide for text, images, shapes and tables to help add information in a different way. Duplicate this slide to add additional images of important location in your visit.
  4. You can use this type of slide for text, images, shapes and tables to help add information in a different way. Duplicate this slide to add additional images of important location in your visit.
  5. You can use this type of slide for text, images, shapes and tables to help add information in a different way. Duplicate this slide to add additional images of important location in your visit.
  6. You can use this type of slide for text, images, shapes and tables to help add information in a different way. Duplicate this slide to add additional images of important location in your visit.
  7. Decoupled Integrated platforms /languages Reliable Communication Disconnected Throttled Scalability
  8. You can use this type of slide for text, images, shapes and tables to help add information in a different way. Duplicate this slide to add additional images of important location in your visit.