Docsity

Queue Manager - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

Toggle sidebar
bg1
Queue Manager (cont’d)
•Also has some communication types of operations
–start and stop queue
–volatile queues (lost in a system failure)
–persistent sessions (explained earlier)
•System management operations
–monitor load
–report on failures and recoveries
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Queue Manager - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Queue Manager (cont’d)

Also has some communication types of operations

start and stop queue

volatile queues (lost in a system failure)

persistent sessions (explained earlier)

System management operations

monitor load

report on failures and recoveries

Example of Enqueue Parameters

(IBM MQSeries)

System-generated and application-assigned message Ids

Name of destination queue and reply queue (optional)

Flag indicating if message is persistent

Message type - datagram, request, reply, report

Message priority

Correlation id to link reply to request

Expiry time

Application-defined format type and code page (for I18N)

Report options - confirm on arrival (when enqueued)?,on delivery (when dequeued)?, on expiry?, on exception?

Routing

Forwarding of messages between queues

transactional, to avoid lost messages

batch forwarding of messages, for better throughput

can be implemented as an ordinary transaction server

Often, a lightweight client implementation supportsa client queue,

captures messages when client is disconnected, and

forwards them when communication to queue server isre-established

Implies system mgmt requirement to displaytopology of forwarding links

State of the Art

All app servers support some form of queuing

A new trend is to add queuing to the SQL DBMS

Oracle has it. Avoids 2PC for Txn2, allows queries, ….

Queuing is hard to build well. It’s a product ormajor sub-system, not just a feature.

Lots of queuing products with small market share.

Some major ones are

IBM’s MQSeries

BEA Systems MessageQ

Microsoft Message Queuing

Adapting RPC Marshaling for Queues

App

Proxy

Runtime

Runtime

Stub

App

call P return to app

pack argu-

ments

unpack

results

enqueue

request dequeue

reply

dequeue

request

enqueue

reply

unpack

argu- ments

pack

results

P

work return

wait

Client’s System

Server’s System

server

request

queue

client reply

queue

In effect, use queuing as a transport for RPC

Example – Queued Component in MSMQ

Docsity.com

Appendix B: Multi-Transaction Requests

Some requests cannot execute as one transaction because

It executes too long (causing lock contention) or

Resources don’t support a compatible 2-phase commit protocol.

Transaction may run too long because

It requires display I/O with user

People or machines are unavailable (hotel reservation system,manager who approves the request)

It requires long-running real-world actions(get 2 estimates before settling an insurance claim)

Transaction may be required to run independent ACIDtransactions in subsystems (placing an order, scheduling ashipment, reporting commission)

Managing Workflow with Queues

Each workflow step is a request

Send the request to the queue of the server that canprocess the request

Server outputs request(s) for the next step(s) of theworkflow

Submit expense

claim

Validate

claim

Get Manager

Approval

Authorize

Payment

Request

Automatic

Deposit

Email

notification