• Massive distribution / replication
• Nested transactions
• Transactions and web services
• Summary and final remarks
New Challenges
New Challenges
DDB and transactions in the past
- few nodes ( < 10 ?)- stable systems - stable net
Future
- Mobile systems
Q check out part of the DB and update "salesperson" application scenario
ÖMultimaster replication 2 – ~100 replicas Q Handheld devices
completely independent
- Sensor net data transactions?? - Web Service transactions
Replication schemes not scalable
hs / FUB dbsII-03-21DDBNext-3
Nested Transactions
Nested Transactions
Flat transaction model
up to now:
begin r(x), ……w(x) commitWhy not recursive?
TA ( r(x) , TA1(…..) w(x) TA2(…..))
Generalize savepoints
- Savepoints allow sequential transactions to be aborted partially, work between two savepoints is a subtransaction
Allow transaction /subtransaction trees
Each subtransaction may be aborted
subtransactionhs / FUB dbsII-03-21DDBNext-4
Nested Transactions
Nested Transactions
Nested transactions used to be an academic
exercise, become very important right now
- Object orientation
each method call is (may be) a subtransaction
- Business transactions between autonomous
systems (e.g. coordination of web services)
withdraw deposit
^ ^ t2 Withdraw (x, 1000) r (r) r (l) r (p) w (p) Search (...) r (p) Fetch (x) Modify (x) r (s) r (t) Append (h, ...)
Fetch (a) Fetch (d) Store (e) Modify (d) Modify (a)
r (t) w (t) r (t) w (t) r (s)w (s) ^ ^ Deposit (y, 1000) r (r) r (l) r (q) w (q) Search (...) r (q) Fetch (y) Modify (y)
Nested Transaction rules (*)
Nested Transaction rules (*)
Each transaction or subtransaction is bracketed by Start and Commit or Abort.
If a program is not executing a transaction, then Start creates a new top-level transaction If a program is executing inside a transaction,
then Start creates a subtransaction.
Commit and Abort by a top-level transaction have the usual semantics
If a subtransaction aborts, then all of its operations and
subtransactions are undone – top-level is notified, not aborted Until it commits, a subtransaction’s updated data items are only
visible to its subtransactions
After a subtransaction S commits, S’s updates are visible to other subtransactions of S’s parent.
hs / FUB dbsII-03-21DDBNext-7
Nested Transactions
Nested Transactions
Features
Top-level transactions like flat transactions.
- They’re ACID and bracketed by Start, Commit, Abort.Subtransaction abort is a new feature
Subtransactions of the same parent are isolated
from one another
Parent may decide to
compensate
a subtransaction
if another subtransaction aborts
(sometimes called
Multilevel TAs
)
hs / FUB dbsII-03-21DDBNext-8
Web service coordination
Web service coordination
"
Webservice increasingly tie together a large number
of participants forming large distributed applications"
How to
coordinate
the activities?
Coordination types in the
web service transaction
specification
:
- Atomic transactions (AT) used to coordinate activities having a short duration
- Business activities (BA) used to coordinate activities that are long in duration and desire to apply business logic - Web service can include both ATs and BAs
hs / FUB dbsII-03-21DDBNext-9 Example: Web service activities as nested transactions
Coordination framework of WS consists of: - activation service
- registration service - coordination service
Web service coordination
hs / FUB dbsII-03-21DDBNext-11
Web service coordination
Web service coordination
Registration service
Register and select protocol for the activity
Includes specification of transaction protocols and properties available for a particular web service
Coordination service
Controls activity completion processing for registered WS using selected coordination protocol
(until now: atomic transaction and business coordination) Context for created activity:
- Identifier
- expire (activity timeout) - coordination type - registration service
hs / FUB dbsII-03-21DDBNext-12
Transactional Web service: scenario of atomic TAs
hs / FUB dbsII-03-21DDBNext-13
Step 1: Application creates transactional activity
using WS coordination framework's activation
service
Step 2: Application registers
(as responsible driving the completion protocol)Step 3: Application performs operation on a Web service
Step 4: Register Resource with Reg. service for
processing
(only the first time, compare XA)Step 5-7: Ack , application completes acitivty
Step 8-11: 2PC
Example: Business activity
hs / FUB dbsII-03-21DDBNext-15
Example: Business activity abort
Example: Business activity abort
No 2 PC
Application decides to abort
(
Business Activity Failure
)
Coordinator sends compensation record
Compare nested transactions
Protocols defined in XML syntax with SOAP envelope
….. BUT
hs / FUB dbsII-03-21DDBNext-16
Specification for Web Service TA
Specification for Web Service TA
TWO different specifications by mainplayers
- Microsoft / IBM et al.
http://www.ibm.com/developerworks/library/ws-tanspec/
- Sun, Oracle, Iona et al
(see reader)
Seems to be more elaborate, includes e.g. subprotocols like
- status of work - Restart - Checkpoint
hs / FUB dbsII-03-21DDBNext-17
Business TA in large scale distributed, unstable
systems
Example: Buying electronic goods
n offerors, 1 client, bank
…
payment accept offer: contract
delivery
Trends for Transactions
Trends for Transactions
Example (cont.):
Nested Transaction
(offer) ( (contract (payment) (delivery) ) Important:
- delivery must be successful if payment successful
(electronic good!)
- payment must precede delivery. Why?
- payment sub TA must guarantee correctness (“don’t create or destroy money”)
compensation possible for payment (refund) not for delivery.
hs / FUB dbsII-03-21DDBNext-19
Trends for Transactions
Trends for Transactions
Business transactions in large scale distributed
systems:
may be nested
compensation important
atomicity is the problem, not (so much) isolation
“all or nothing “ too simple
Specific protocols for different steps of TA
like payment, contracts,
hs / FUB dbsII-03-21DDBNext-20