Docsity

Workflows - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

Toggle sidebar
bg1
Workflows Can Violate
Atomicity and Isolation
•Since a workflow runs as many transactions,
–it may not be serializable relative to other workflows
–it may not be all-or-nothing
•Consider a money transfer run as 2 txns, T1 & T2
–Conflicting money transfers could run between T1 & T2
–A failure after T1 might prevent T2 from running
–These problems require application-specific logic
–E.g. T2 must send ack to T1’s node. If T1’s node times
out waiting for the ack, it takes action, possibly
compensating for T1
Docsity.com
pf3
pf4
pf5

Partial preview of the text

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

Workflows Can ViolateAtomicity and Isolation

Since a workflow runs as many transactions,

it may not be serializable relative to other workflows - it may not be all-or-nothing - Consider a money transfer run as 2 txns, T 1

& T

2

Conflicting money transfers could run between T 1 & T 2 - A failure after T 1 might prevent T 2 from running - These problems require application-specific logic - E.g. T 2 must send ack to T 1 ’s node. If T 1 ’s node times out waiting for the ack, it takes action, possiblycompensating for T 1

Automated Compensation

In a workflow specification, for each step, identify acompensation. Specification is called a saga.

If a workflow stops making progress,run compensations for all committed steps,in reverse order (like transaction abort). - Need to ensure that each compensation’s input isavailable (e.g. log it) and that it definitely can run(enforce constraints until workflow completes). - Concept is still at the research stage.

Maintaining Workflow State

Queue elements and pseudo-conversation requests areplaces places for persistent workflow state. Otherexamples:

Browser cookies (files that are read/written by http requests),containing user profile information - Shopping cart (in web server cache or database) - Such state management arises within a transaction too - Server scans a file. Each time it hits a relevant record, return it. - Issue: later calls must go to the same server, since only it knowswhere the transaction’s last call left off. - Sol’n 1: keep state in the message (like pseudo-conversation) - Sol’n 2: first call gets a binding handle to the server, so later callsgo to it. Server needs to release state when client disappears

Appendix C : Microsoft Message Queuing

(MSMQ)

Clients enqueue/dequeue to queue servers

API - Open/Close, Send/Receive - Each queue is named in the Active Directory - Additional functions: Create/Delete queue, Locate queue, Set/Getqueue properties, Set/Get queue security - Send/Receive can be - Transactional on persistent queues (transparently gets transactioncontext), using DTC - Non-transactional on persistent/volatile queues - Independent client has a local persistent queue store. - Processes ops locally, asynchronously sends to a server - Dependent client issues RPC to a queue server(easier to administer, fewer resources required)

MSMQ Interoperation

Exchange Connector - Send and receive messagesand forms through Exchange Server and MSMQ

MAPI transport - Send and receive messages andforms through MAPI and MSMQ

Via Level 8 Systems,

Clients - MVS, AS/400, VMS, HP-Unix, Sun-Solaris, AIX,OS/2 clients

Interoperates with IBM MQSeries