M obile Transactions and Synchronization M obile Transactions and - - PowerPoint PPT Presentation
M obile Transactions and Synchronization M obile Transactions and - - PowerPoint PPT Presentation
M obile Transactions and Synchronization M obile Transactions and Synchronization Can Trker ETH Zurich S eminar "Ubiquitous Information", 28.1 1 .2001 ... towards Pervasive Computing ... towards Pervasive Computing Gartner
2
... towards Pervasive Computing ... towards Pervasive Computing
- Gartner Group: "by 2003 more than 1
37 million business users will be involved in some form of remote work"
- Accenture: "by 2005 over 500 million mobile devices will offer
Internet access"
- Conclusions
– mobile hosts (M H; laptops, palmtops, smart phones, etc.)
- utstrips fixed hosts (FH; personal computers, desktops, etc.)
– the way information is created and processed will change
within this increasingly ubiquitous network
- Need
– infrastructure to coordinate concurrent information access and
processing in the presence of mobile hosts and users
3
Characteristics of M obility Characteristics of M obility
- M obile information sources and consumers
– physical access point to the network may change: sources as
well as consumers may move
– sources as well as consumers may be disconnected
- User and Context Awareness
– tracking/ monitoring information sources and consumers – consumer's information needs may shift with location change
- Data management techniques have to be revisited
Data Integration Data Integration Combining M any Sources Combining M any Sources Transactional Guarantees Transactional Guarantees Correctness Concerns Correctness Concerns Scalability Scalability Optimization + Careful Optimization + Careful Resource Sharing Resource Sharing Resource Limitations (Bandwidth, Resource Limitations (Bandwidth, M emory, Computing Power, ... ) M emory, Computing Power, ... )
4
Data base Data base Data base Data base
Fixed Host Fixed Host Fixed Host M obile Support Station CELL M obile Phone (WAP) Database Cluster M obile Support Station CELL
Data base Data base
Laptop Palmtop Laptop Laptop Fixed Network Terminals Disconnected Disconnected
M ovements and Disconnections M ovements and Disconnections
User/ User/ W orkspace W orkspace m ovem ent m ovem ent FH FH disconnection disconnection
Data base
Laptop
MH m ovem ent MH m ovem ent
Data base
Laptop
FH FH reconnection reconnection
Disconnected
MH MH disconnection disconnection MH MH reconnection reconnection
Disconnected
5
Abstractions Abstractions
Distributed & Federated DBMS, Data Integration, Conflict Resolution (Relational) DBMS DBMS & TP-Monitors with Concurrency Control & Recovery
Abstraction of Concurrency & System Failures
Object-relational DBMS with Object Methods, Triggers & Stored Procedures
Abstraction of Method I mplementations Abstraction of Distribution, Heterogeneity & Autonomy
Mobile DBMS, Context Maintenance, Replication & Synchronization, Profiling
Abstraction of Movements & Disconnections Abstraction of Data Storage
6
Transparency of M obility Transparency of M obility
- Challenge: information access and processing everywhere
and at anytime while supporting
– transparent disconnectionsand – transparent movements of users and information
components
- How much transparency is indeed needed and reasonable?
How much transparency is indeed needed and reasonable?
7
Characteristics of Transactions Characteristics of Transactions
- Logically related set of operations executed under certain
guarantees, e.g., – atomicity – consistency – isolation – durability
- Advanced transaction models rely on multi-tier transactions
– increase parallelism by exploiting application semantics – parent-child relationships
- M obile Transactions involve execution/ initiation on M H
– ACID cannot be supported generally – nevertheless: certain transactional guarantees shall be
ensured always and everywhere
8
Data base Data base
Fixed Host Fixed Host Fixed Host M obile Support Station CELL Database Cluster M obile Support Station CELL
Data base
Laptop Fixed Network Terminals Disconnected
Transaction Tiers Transaction Tiers
Data base
Laptop
Data base
Laptop
Global Global Subtransactions Subtransactions Local Local Transactions Transactions Mobile Mobile Transactions Transactions
9
Data base Data base
Fixed Host Fixed Host Fixed Host M obile Support Station CELL Database Cluster M obile Support Station CELL
Data base
Laptop Fixed Network Terminals Disconnected
Disconnection Disconnection-
- resistant Transactions
resistant Transactions
Data base
Laptop Start Transaction Start Transaction & Execute & Execute Operation 1 Operation 1 Execute Execute Operation 2 Operation 2 Disconnect Disconnect Execute Execute Operation 3 Operation 3 Commit Commit Reconnect Reconnect & Sync & Sync Operation 1 Operation 1 Operation 2 Operation 2 Operation 3 Operation 3
1
Disconnections Disconnections
- "The flight worker
The flight worker": Working in the "intended" disconnected mode requires some lazy replication techniques – updates are precommitted locally – precommitted updates are propagated asynchronously when
reconnected to the network
- conflicts may occur
- conflict resolution when a conflict arises
- Conflict detection via timestamps, version vectors, etc.
- Conflict handling
– optimistic (resolution): function-based, manual – pessimistic (avoidance): primary copy, ROWA, quorum
transparent to the user?
1 1
Data base Data base
Fixed Host Fixed Host Fixed Host M obile Support Station CELL Database Cluster M obile Support Station CELL
Data base
Laptop Fixed Network Terminals Disconnected
M ovement M ovement-
- resistant Transactions
resistant Transactions
Data base
Laptop Start Transaction Start Transaction & Execute & Execute Operation 1 Operation 1 Execute Execute Operation 2 Operation 2
MH m ovem ent MH m ovem ent
Data base
Laptop Commit Commit Operation 1 Operation 1 Execute Execute Operation 3 Operation 3 Operation 2 Operation 2 Operation 3 Operation 3
hand hand-
- off
- ff
leave leave join join
1 2
M ovements M ovements
- "The train/ tram/ bus worker
The train/ tram/ bus worker": Working while physically moving requires transparent support of cell migration and "unintended" disconnections – create subtransactions on several mobile support stations – coordinate these substranactions correctly – wireless communication and cost issues
- "The home worker
The home worker": Resume and/ or continue work at another host (mobile or fixed) – continue transactions – create new subtransactions (within the existing workspace /
transaction sphere) transparent to the user?
1 3
Issues of M obile Transaction M odels Issues of M obile Transaction M odels
- M H may have transaction processing capabilities
– M H may run transactions locally – M H may only initiate transactions on FH
- M H may change location and network connection while
transactions are being executed – split computations
- M H may disconnect while transactions are being executed
– long-lived processes – data replication
1 4
Characteristics of Advanced Transaction M odels Characteristics of Advanced Transaction M odels
- closed vs. open
–
child's results are visible to the parent only or to all?
- vital vs. non-vital
– parent's commitment depends on the child's commitment?
- dependent vs. independent
– child's commitment depends on the parent's commitment?
- substitutable vs. non-substitutable
– does there exists an alternative transaction?
- compensatable vs. non-compensatable
– are the results semantically undoable?
1 5
An Example of a M obile Transaction M odel: An Example of a M obile Transaction M odel: Kangaroo Transactions Kangaroo Transactions
T1 1 T1 2 T1 3 J
- ey
T1 M H Level M SS Level FH Level
Kangaroo Transaction
T21 T22 J
- ey
T2 T31 J
- ey
T3 Hop Hop
- On disconnect: J
Ts and Ts can complete but no more Ts are created
- On reconnect: the T resumes
- Hand-offs: new J
T runs on the new M SS (transaction split)
1 6
An Example of a M obile Transaction M odel: An Example of a M obile Transaction M odel: Kangaroo Transactions Kangaroo Transactions
- Builds on open nested and split transaction models
- Supports mobility and disconnections
- M H starts a Kangaroo Transaction (KT)
– A J
- ey Transaction (J
T) is started at the connected M SS
– T run on the FH (as open nested transaction) – If the M H changes location, the previous J
T is split and a new J T runs on the new location M SS
– J
T1 can commit independently from J T2
- If J
T1 fails: – Compensating mode: undoes the entire KT – Split mode:
- Previously committed J
Ts are not compensated
- No new J
Ts are initiated
- Current child transactions are committed or aborted upon
decision of the local DBM S
1 7
Overview of M obile Transaction M odels Overview of M obile Transaction M odels
- Temporal
Temporal
- M H Disconnection
M H Disconnection
- M H M ovement
M H M ovement
L L L L H H L L H H L L H H H H
M H Usage M H Usage
- Pro
Pro-
- M otion
M otion
Walborn & Chrysanthis 97 Walborn & Chrysanthis 97
- Toggle
Toggle Txs Txs
Dirckze & Gruenwald 98 Dirckze & Gruenwald 98
- M oflex
M oflex Txs Txs
Ku & Kim 00 Ku & Kim 00
- Substitutable
Substitutable
- Compensatable
Compensatable
- Open
Open
- Closed
Closed
- Non
Non-
- vital
vital Independent Independent Kangaroo Txs Kangaroo Txs
Dunham et al. 97 Dunham et al. 97
Weak/ Strict Txs Weak/ Strict Txs
Pitoura & Bhargava 94 Pitoura & Bhargava 94
M DSTPM M DSTPM Txs Txs
Yeo & Zaslavsky 94 Yeo & Zaslavsky 94
Isolation Isolation-
- Only
Only Txs Txs
Lu & Satyanarayanan 94 Lu & Satyanarayanan 94
Reporting Reporting-
- / Co
/ Co-
- Txs
Txs
Chrysanthis 93 Chrysanthis 93
User Profiling User Profiling Subtransaction Types & Subtransaction Types & M obility Support M obility Support
1 8
IBM DB2 Everyplace IBM DB2 Everyplace
FH Database DB2 Log Capture Apply Change Data Tables I nput Queue Mirror Database Mirror Table Staging Table Admin Control Database MH FH MH Database DB2 Everyplace Table Synchro Request Database Mid-Tier Layer Authentication And Subscription Checks Copy Updates And Resolve Conflicts Logging Write Updates
1 9
An Example of a Commercial M obile An Example of a Commercial M obile Database Approach: IBM Database Approach: IBM DB2 Everyplace DB2 Everyplace
- DB2 Everyplace, relational database residing on the M H
- DB2 Everyplace Sync Server
- M aster database on the FH
- Replication is asynchronous and on demand
– entire tables, subsets of columns/ rows, views, joins, unions
- Synchronization by publish and subscribe
– Refresh propagation: all data are sent to subscribers – Incremental propagation: only changes are propagated to the
subscribing M Hs
- Conflicts are handled by checking the version of each record
in each table in the replication subscription
- No savepoints, No transaction nesting
20
Overview of Commercial M obile DB Approaches Overview of Commercial M obile DB Approaches
- nly a few supports nested Txs (closed, vital, dependent)
- no compensating / alternative Tx
- "basic" data replication and synchronization techniques
- no transaction mobility (hand-offs)
- Savepoints
Savepoints
- Tx Nesting
Tx Nesting Sybase Anywhere Sybase Anywhere Oracle Lite Oracle Lite M icrosoft SQL Server CE M icrosoft SQL Server CE Informix Cloudspace Informix Cloudspace IBM DB2 Everyplace IBM DB2 Everyplace Subtransaction Types Subtransaction Types & M obility Support & M obility Support
21
HotSync HotSync
- M H stores data as records in PalmDBs
– each PalmDB is associated with an application – each record has a set of status bits indicating whether the
record has been created, modified, or deleted since last sync
- FH maintains it’s own copies of the PalmDBs, including it’s
- wn versions of the status bits
– also maintains a snapshot of each PalmDB taken immediately
after most recent sync
– runs HotSync M anager
- M H initiates synchronization (fast vs. slow sync)
- Problem: No support for synchronizing with multi-user
concurrent data sources – no notion of “interest” in a subset of the records in a database – no notion of transaction at all
22
SyncM L Standard SyncM L Standard
- Industry Consortium with most major players: Ericsson, Nokia,
M otorola, Palm, Psion, IBM , …
- Goal: enabling cross-format, cross-system synchronization
- Simple architecture
– – M H is
M H is intermittently intermittently connected connected und FH is und FH is continuously available continuously available
- Consists of a standard set of message types, each represented as
an XM L document
- Conflict resolution is dealt with abstractly
– only standard status codes to implement typical policies are given
FH initiates sync FH initiates sync FH FH Alerted Alerted FH FH sends entire DB sends entire DB to to M H M H Refresh, Refresh, FH FH only
- nly
FH FH sends only modified records to sends only modified records to M H M H One One-
- way,
way, FH FH only
- nly
M H M H sends entire DB sends entire DB to to FH FH Refresh, Refresh, M H M H only
- nly
M H M H sends only modified records to sends only modified records to FH FH One One-
- way,
way, M H M H only
- nly
M H M H sends all sends all records records Slow Slow -
- sync
sync M H M H and FH exchange and FH exchange only modified
- nly modified records,
records, M H M H sends first sends first Two Two-
- way
way
23
Summary Summary
- M obile transactional coordination has to deal with
– weak connectivity and frequent disconnections
- asynchronous, dynamic replication with profiling
- publish & subscribe for data recharging & propagation
– large-scale replication – user interaction / feedback – long-running tasks and decentralized commitments – real-time constraints
- Commercial mobile database approaches mostly neglect the
latter issues
24
Open Questions Open Questions
- Where to implement the abstraction of disconnections and
movements? – Do we really need extensions to transaction models? – Can we model mobility issues as additional steps of an overall
transactional process?
– Which part is only "network staff"? – ...
- Design of mobile transactional applications
– How to appropriately express mobility issues?
- connection duration and costs
- disconnection times
- data and function interests
- consistency requirements