wm1011g01

Upload: bridget-powell

Post on 03-Jun-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 WM1011G01

    1/26

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM. Copyright IBM Corporation 2011

    5.4.1.1

    Introduction to

    WebSphere MQ

  • 8/12/2019 WM1011G01

    2/26

    Copyright IBM Corporation 2011

    Unit objectives

    After completing this unit, you should be able to:

    Explain the positioning of messaging and queuing in the current

    business environment

    Provide a high-level view of WebSphere MQ functions

    Describe the breadth of coverage of WebSphere MQ products

  • 8/12/2019 WM1011G01

    3/26

    Copyright IBM Corporation 2011

    The enterprise IT environment of today

    I T e n v i r o n m e n t s a r e in c r e a s i n g l y h e t e r o g e n e o u s an d c o m p l e x

    Th e r o l e o f m o d e r n m i d d l e w a r e is t o i n t e g r a t e a n d s im p l i f y

    Transactions

    Legacy systems andapplications

    Networks

    Databases

    Intranets

    Value chainextranets

    Internet

    Customers

  • 8/12/2019 WM1011G01

    4/26 Copyright IBM Corporation 2011

    IBM WebSphere reference architecture

    Business servicesWebSphere Business Monitor

    Infrastructure services

    Developmentservices

    WebSphereBusiness

    IntegrationModeler,

    WebSphereIntegration

    Developer

    Managementservices

    Interactionservices

    WebSpherePortal Server

    Processservices

    WebSphereProcess Server

    Informationservices

    WebSphere

    InformationIntegrator

    Partnerservices

    WebSpherePartner Gateway

    Businessapplication

    services

    WebSphereApplication Server

    AccessservicesWBI and

    WebSphereAdapters, HATS

    Connectivity services, ESBWebSphere MQ

    WebSphere Enterprise Service Bus,WebSphere Message Broker

    Service registry

  • 8/12/2019 WM1011G01

    5/26 Copyright IBM Corporation 2011

    Why are interfaces so expensive to build and maintain?

    Application interface logic is intertwined with business logic

    Tightly integrated interfaces are difficult to change

    The more interfaces, the more complex the application interface

    logic may exceed business logic.

    Reuse becomes difficult and impractical

  • 8/12/2019 WM1011G01

    6/26 Copyright IBM Corporation 2011

    Service-oriented architecture (SOA)

    Message

    queuing

    Abstractsconnectivity

    logic from

    application

    Traditionalmessage

    brokering

    Abstractsconnectivity and

    mediation logic

    from application

    Messageand

    service brokering

    Reducesapplication to core

    business functions

    (that is, a service)

    Application Application

    Connectivity,

    mediation, andadditional logic

    Direct

    connectivity

    Connectivity,mediation, and

    additional logic

    buried in application

    Application

    Connectivity

    logic

    SERVICES

    Connectivity,

    mediation, andadditional

    logic

    Mediation and

    additional logic

    Additionallogic

    Connectivity and

    mediation logic

    Degree of flexibility and reuse

    Linesof

    code

  • 8/12/2019 WM1011G01

    7/26 Copyright IBM Corporation 2011

    Program-to-program communication

    BA

    QueueApplication Application

  • 8/12/2019 WM1011G01

    8/26 Copyright IBM Corporation 2011

    Synchronous application design model

    BA

    Queue 1

    Queue 2

  • 8/12/2019 WM1011G01

    9/26 Copyright IBM Corporation 2011

    Extended asynchronous application design model

    B

    A

    C

    Queue 1

    Queue 2

  • 8/12/2019 WM1011G01

    10/26

    Copyright IBM Corporation 2011

    Time independence

    BA

    BA

    BA

    BA

    Not available

    Not available

    Not available

    Not available

  • 8/12/2019 WM1011G01

    11/26

    Copyright IBM Corporation 2011

    Three styles of communication

    C o n v e r s a t i o n a l

    A B

    A

    B

    Me s s a g i n g

    C a l l - a n d - r e t u r n

    A

    Call B

    B

    Returnto A

  • 8/12/2019 WM1011G01

    12/26

    Copyright IBM Corporation 2011

    WebSphere MQ eliminates application network concerns

    ApplicationsApplications

    Network

    Networkinginterface

    Applications

    MQI

    Queuemanager

    Applications

    MQI

    Queuemanager

    Networkinginterface

    Networkinginterface

    MCAMCA

  • 8/12/2019 WM1011G01

    13/26

    Copyright IBM Corporation 2011

    Local and remote queues concept

    Program BProgram A Program C

    QM2:Local

    queue,transmit

    queue

    Q1: Localqueue

    Queuemanager

    QM1

    Queuemanager

    QM2

    Q2: Localqueue

    System 1 System 2

    MQPUTQ2, QM2

    MQPUT Q1 MQGET Q1 MQGET Q2MQI

    Dead letterqueue

  • 8/12/2019 WM1011G01

    14/26

    Copyright IBM Corporation 2011

    MQI calls

    Major calls

    MQCONN

    MQCONNX

    MQDISC

    MQOPEN

    MQCLOSE

    MQPUT

    MQPUT1

    MQGET MQSUB

    MQSUBRQ

    Minor calls MQBEGIN

    MQCMIT

    MQBACK

    MQINQ

    MQSET

    Applications

    MQI

    Queuemanager

    Queue managerobject

    Namelist objectProcess

    definitionobject

  • 8/12/2019 WM1011G01

    15/26

    Copyright IBM Corporation 2011

    Message composition

    Set by application and queue manager Header

    MQMD (message descriptor)

    Application data

    Any sequence of bytes

    Meaningful only to the sending and receiving applications

    Not meaningful to the queue manager

    Application dataHeader

    Message = header + application data

  • 8/12/2019 WM1011G01

    16/26

    Copyright IBM Corporation 2011

    Parallel processing application design

    Car

    Flight

    Hotel

    MQPUT CAR.RENTAL

    MQPUT FLIGHT

    MQPUT HOTEL

    MQGET reply-to queue

    CAR.RENTAL

    FLIGHT

    HOTEL

    MQPUT

    MQPUT

    MQPUT

    Reply-to queue

  • 8/12/2019 WM1011G01

    17/26

    Copyright IBM Corporation 2011

    Triggering

    Processdefinition

    object

    MQPUT A.Q

    Program A

    Trigger types: FIRST DEPTH

    EVERY

    Applicationqueue(A.Q)

    Initiationqueue(I.Q)

    Triggermonitor

    1

    2

    34

    6

    5

    MQGET I.Q

    MQGET A.Q

    Program B

    Queue manager

  • 8/12/2019 WM1011G01

    18/26

    Copyright IBM Corporation 2011

    Client/server application model

    Insurance agent

    Insurance agent

    Insurance agent

    Applicationclients

    Queue = service

    Message = request Reply-to queue name in

    message descriptor Multiple instances of

    server possible

    Insurancequotations

    Applicationserver

    Insurance

    data

  • 8/12/2019 WM1011G01

    19/26

    Copyright IBM Corporation 2011

    WebSphere MQ client

    WebSphere MQ

    application

    Communicationsstack

    Client stub

    WebSphere

    queue manager

    Communicationsstack

    Serverconnection

    Client system Server system

    (no queue manager existson this system)

    Communicationlink

  • 8/12/2019 WM1011G01

    20/26

    Copyright IBM Corporation 2011

    Unit of work 3

    Unit of work 1

    Data integrity

    Unit of work

    Write

    Send

    Sync point

    ReceiveWrite

    Sync point

    database

    database

    Database

    Database

    Two phasecommit

    Unit of work 2Write

    PutSync point

    A.Q(xmitq) B.Q

    Get

    WriteSync point

    Asynchronous model

    Synchronous model

  • 8/12/2019 WM1011G01

    21/26

    Copyright IBM Corporation 2011

    Remote queuemanager

    Security

    |USERID| |

    Message context

    Local queuemanager

    Queues Administrative

    commandsMCA

    MCA

    Authenticationencryption

    Database

    MQMD Application data

  • 8/12/2019 WM1011G01

    22/26

    Copyright IBM Corporation 2011

    Unit summary

    Having completed this unit, you should be able to:

    Explain the positioning of messaging and queuing in the current

    business environment

    Provide a high-level view of WebSphere MQ functions

    Describe the breadth of coverage of WebSphere MQ products

  • 8/12/2019 WM1011G01

    23/26

    Copyright IBM Corporation 2011

    Checkpoint questions (1 of 2)

    1. WebSphere MQ uses an interface for programs to access resources

    called:

    a. The program-to-program API.

    b. The Message Queue Interface.c. The synchronous model.

    d. Triggering.

    2. True or False: WebSphere MQ only supports messaging and queuing

    in an asynchronous environment.

    3. True or False: In WebSphere MQ triggering, the queue managerstarts the triggered program.

  • 8/12/2019 WM1011G01

    24/26

    Copyright IBM Corporation 2011

    Checkpoint answers (1 of 2)

    1. WebSphere MQ uses an interface for programs to access resources

    called:

    a. The program-to-program API.

    b. The Message Queue Interface.c. The synchronous model.

    d. Triggering.

    Answer: b.

    2. True or False: WebSphere MQ only supports messaging and queuing

    in an asynchronous environment.

    Answer: False. WebSphere MQ also supports messaging and queuing in a

    synchronous environment.3. True or False: In WebSphere MQ triggering, the queue manager

    starts the triggered program.

    Answer: False. The trigger monitor starts the triggered application.

  • 8/12/2019 WM1011G01

    25/26

    Copyright IBM Corporation 2011

    Checkpoint questions (2 of 2)

    4. A message consists of:

    a. Application data.

    b. A WebSphere MQ trailer.

    c. A security header.d. A message descriptor.

    e. All the above.

    5. All WebSphere MQ messages have a header. It is the:

    a. MQXQH (transmission header).

    b. MQDLK (dead letter header).

    c. MQMD (message descriptor).d. MQTH (trigger header).

  • 8/12/2019 WM1011G01

    26/26

    Copyright IBM Corporation 2011

    Checkpoint answers (2 of 2)

    4. A message consists of:

    a. Application data.

    b. A WebSphere MQ trailer.

    c. A security header.

    d. A message descriptor.

    e. All the above.

    Answer: a and d, although it is possible for a message to contain only a messagedescriptor and no application data. Security information, known as the

    message context, is part of the message descriptor.

    5. All WebSphere MQ messages have a header. It is the:

    a. MQXQH (transmission header).

    b. MQDLK (dead letter header).

    c. MQMD (message descriptor).

    d. MQTH (trigger header).

    Answer: c. The MQMD (message descriptor) is always included a WebSphere MQmessage.