Reliability in Message-Oriented Middleware

22
Reliability in Reliability in Message-Oriented Message-Oriented Middleware Middleware Daniel de Pedro Castillo Daniel de Pedro Castillo University of Helsinki, May 2007 University of Helsinki, May 2007

description

Reliability in Message-Oriented Middleware. Daniel de Pedro Castillo University of Helsinki, May 2007. Contents. Introduction Importance of reliability in MOM Types of reliability Strategies to achieve reliability Summary. Introduction. Middleware - PowerPoint PPT Presentation

Transcript of Reliability in Message-Oriented Middleware

Page 1: Reliability in Message-Oriented Middleware

Reliability inReliability inMessage-OrientedMessage-Oriented

MiddlewareMiddleware

Daniel de Pedro CastilloDaniel de Pedro CastilloUniversity of Helsinki, May 2007University of Helsinki, May 2007

Page 2: Reliability in Message-Oriented Middleware

ContentsContents

IntroductionIntroduction

Importance of reliability in MOMImportance of reliability in MOM

Types of reliabilityTypes of reliability

Strategies to achieve reliabilityStrategies to achieve reliability

SummarySummary

Page 3: Reliability in Message-Oriented Middleware

IntroductionIntroduction

Middleware Middleware

Software that connects software Software that connects software components and applications, used to components and applications, used to support complex distributed applications.support complex distributed applications.

Message-Oriented Middleware (MOM) Message-Oriented Middleware (MOM) Type of inter-application communication Type of inter-application communication software that generally relies on software that generally relies on asynchronous message-passing.asynchronous message-passing.

Page 4: Reliability in Message-Oriented Middleware

Properties of MOM (I)Properties of MOM (I)

AsynchronyAsynchronyCommunication between systems to Communication between systems to establish connection not needed. establish connection not needed. Programs don’t execute serially and take Programs don’t execute serially and take turns waiting on each other (non-blocking)turns waiting on each other (non-blocking)QueuesQueuesMessages are stores in queues until the Messages are stores in queues until the recipient is ready to read them. Messages recipient is ready to read them. Messages can be read as FIFO or a priority criteriacan be read as FIFO or a priority criteria

Page 5: Reliability in Message-Oriented Middleware

Properties of MOM (II)Properties of MOM (II)

Fewer channelsFewer channels

Because of asynchronous communication fewer Because of asynchronous communication fewer communication channels needed:communication channels needed:

- easier to manage- easier to manage

- more efficient- more efficient

PersistencyPersistency

Persistent messages stored in non-volatile Persistent messages stored in non-volatile storage can be reinstated after system restart.storage can be reinstated after system restart.

Non-persistent messages stored only in memoryNon-persistent messages stored only in memory

Page 6: Reliability in Message-Oriented Middleware

Importance of reliability in MOM (I)Importance of reliability in MOM (I)

ReliabilityReliability

1) Property which guarantees that data is 1) Property which guarantees that data is correctly delivered to the recipientcorrectly delivered to the recipient

2) Ability of a system to perform and 2) Ability of a system to perform and maintain its functions in routine maintain its functions in routine circumstances as well as hostile or circumstances as well as hostile or unexpected circumstancesunexpected circumstances

Page 7: Reliability in Message-Oriented Middleware

Importance of reliability in MOM (II)Importance of reliability in MOM (II)

Two concerns in communicationTwo concerns in communication- Time for delivering the messageTime for delivering the message

Example: video-conference in real-timeExample: video-conference in real-time- Quality of the message (integrity)Quality of the message (integrity)

Example: e-mail, web navigationExample: e-mail, web navigation

What is needed in MOMWhat is needed in MOM

MOM uses asynchronous communication. Time MOM uses asynchronous communication. Time is not an issue. Integrity and non-corrupt data is not an issue. Integrity and non-corrupt data are more importantare more important

Page 8: Reliability in Message-Oriented Middleware

Aspects of reliability (I)Aspects of reliability (I)

Toleration of failuresToleration of failures

Repeatedly send messages until it is Repeatedly send messages until it is acknowledged by the recipient. Middleware acknowledged by the recipient. Middleware guarantees the delivery and sender can throw-guarantees the delivery and sender can throw-and-remove the messageand-remove the message

Isolation of clientsIsolation of clients

Clients send and receive messages though Clients send and receive messages though middleware, they don’t deal with each other middleware, they don’t deal with each other directlydirectly

Page 9: Reliability in Message-Oriented Middleware

Aspects of reliability (II)Aspects of reliability (II)

Order deliveryOrder delivery

Important in asynchronous environments, where Important in asynchronous environments, where messages are stored in the middlewaremessages are stored in the middleware

Message attributesMessage attributes

Messages can be attributed with properties such Messages can be attributed with properties such as expiration timestamps, priority, reply-to as expiration timestamps, priority, reply-to address… checked by the middleware to ensure address… checked by the middleware to ensure the correct usage of themthe correct usage of them

Page 10: Reliability in Message-Oriented Middleware

Aspects of reliability (III)Aspects of reliability (III)

Message integrationMessage integrationMessages usually are part of a business process and an Messages usually are part of a business process and an atomic unit-of-work. Middleware atomically groups atomic unit-of-work. Middleware atomically groups messages and other process activitiesmessages and other process activitiesExamples of products and protocolsExamples of products and protocols

- IBM Websphere MQ (MQ series)- IBM Websphere MQ (MQ series)

- TIBCO Rendezvous- TIBCO Rendezvous- Microsoft Message Queueing (MSMQ)- Microsoft Message Queueing (MSMQ)- Reliable HTTP (HTTPR)- Reliable HTTP (HTTPR)- WS Reliability protocol- WS Reliability protocol- WS Reliable-messaging protocol- WS Reliable-messaging protocol

Page 11: Reliability in Message-Oriented Middleware

Types of reliabilityTypes of reliability

Endpoint-to-endpoint reliability

Application-to-middleware reliability

Application-to-application reliability

Page 12: Reliability in Message-Oriented Middleware

Endpoint-to-endpoint reliabilityEndpoint-to-endpoint reliability

A message, once delivered from an application (process) to the messaging middleware, is guaranteed to be available for consumption by the receiving processMessages are made persistent locally on the sender and receiver sides before and after they are being sentAll messages are given unique identifiers, so that a message sender (the endpoint on the sender side) can re-send a message until it gets a positive acknowledgment of receipt by the receiver (the endpoint on the receiver side)

Page 13: Reliability in Message-Oriented Middleware

Application-to-middleware reliabilityApplication-to-middleware reliability

Message delivery guarantees (exactly-once, at-most-once, at-least-once)

Fault-tolerant invocation (of the messaging endpoint)

Ability to atomically group messaging operations with other application actions

Page 14: Reliability in Message-Oriented Middleware

Application-to-application reliabilityApplication-to-application reliability

Middleware endpoint-to-endpoint reliability and application-to-middleware reliability provide the foundation on which (higher-level) distributed business processes can be developed

Distributed business processes are constructed from basic application-to-application interactions.

Page 15: Reliability in Message-Oriented Middleware

Strategies to achieve reliabilityStrategies to achieve reliability

Simple Object Access Protocol (SOAP)

Strategies for endpoint-to-endpoint reliability

Strategies for application-to-middleware reliability

Strategies for application-to-application reliability

Page 16: Reliability in Message-Oriented Middleware

Simple Object Access Protocol (SOAP)

SOAP is a protocol for exchanging XML-based messages over computer networks, normally using HTTP

Both synchronous and asynchronous models.

SOAP messages contain an envelope, message headers and a message body

SOAP can be considerably slower than other middleware technologies such as the Common Object Request Broker Architecture (CORBA)

Page 17: Reliability in Message-Oriented Middleware

Strategies for endpoint-to-endpoint reliability (I)

Soap-over-HTTP (synchronous)

HTTP is only reliable as long as connection stays alive. Needs middleware to be reliable if the connection fails: HTTPR

Soap-over-HTTPR (synchronous)

Combined with some persistent storage capability supports middleware endpoint-to-endpoint reliability

Page 18: Reliability in Message-Oriented Middleware

Strategies for endpoint-to-endpoint reliability (II)

Soap-over-MQ (asynchronous)- The middleware endpoints are message queue managers provided by the messaging middleware product- The persistent stores are message queuesEnterprise messaging middleware- Middleware endpoint-to-endpoint reliability can also be achieved by employing enterprise messaging middleware directly, independent of SOAP- Middleware must be leveraged to support XML messaging

Page 19: Reliability in Message-Oriented Middleware

Strategies for application-to-middleware reliability (I)

Soap-over-HTTP (synchronous)- Reliability mechanisms may be implemented as part of the application- The application can therefore ensure that its components for creating, storing, and delivering messages are all accessed reliably.Soap-over-Middleware (asynchronous)- SOAP-over-HTTPR or SOAP-over-MQ- The application-to-middleware guarantees that can be provided are the message delivery guarantees of the underlying transport- The reliability of the local procedure calls between the application and the local endpoint.

Page 20: Reliability in Message-Oriented Middleware

Strategies for application-to-middleware reliability (II)

Enterprise messaging middleware- The "direct middleware" option of using MQ for XML messaging describes the case where the application uses the reliable middleware's API to send and receive messages.- Application-to-middleware reliability relates to the direct use of the underlying middleware's API and its reliability features

Page 21: Reliability in Message-Oriented Middleware

Strategies for application-to-application reliability

Direct transaction processingAn agreement protocol such as two-phase commit (2PC) is used to directly include one application's transaction processing as part of another application's transaction processingQueued transaction processing- Applications interact indirectly using reliable message-oriented middleware- A transaction service integrates messaging resources (for example queues) with other resources used by the applications (for example databases) is also needed

Page 22: Reliability in Message-Oriented Middleware

SummarySummary

- We have introduced what the middleware and message-oriented middleware are and their role in communication systems, both synchronous and asynchronous

- The concept of reliability has been explained, and also its different aspects and types: endpoint-to-endpoint middleware, application-to-middleware middleware and application-to-application middleware

- Some strategies for achieving reliability have been also discussed, as well as some actual technologies and protocols, such as SOAP