tutoriel ubimob 2005 1 gestion de transactions mobiles patricia serrano alvarado post doctorat cnrs...

63
Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado @ lifl.fr http:// www.lifl.fr /~ serrano

Upload: clarisse-lemaire

Post on 03-Apr-2015

104 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 1

Gestion de transactions mobiles

Patricia Serrano AlvaradoPost doctorat CNRS

Laboratoire LIFL, Projet [email protected]

http://www.lifl.fr/~serrano

Page 2: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 2

Plan

Les modèles d’exécution

Les techniques transactionnelles

traditionnelles

Analyse de travaux de transactions mobiles

Conclusions

Page 3: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 3

Transaction

Transforme une base de données d’un état cohérent à un autre état cohérent

Propriétés ACID Atomicité : tout ou rien Cohérence : contraintes d’intégrité de

données Isolation : exécution « isolée » Durabilité : mises à jour persistantes

Page 4: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 4

Transaction mobile (TM)

Transaction où ou moins une UMparticipe à l’exécution

Transaction où ou moins une UMparticipe à l’exécution

Page 5: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 5

1. Sur des UF

2. Sur des UM

3. Entre une UM et plusieurs UF

4. Entre plusieurs UM

5. Entre plusieurs UM/ UF

Modèles d’exécution des TM

Chaque modèle d’exécution a besoin d’un contexte particulier

génère différent coûts d’exécution

Chaque modèle d’exécution a besoin d’un contexte particulier

génère différent coûts d’exécution

Page 6: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 6

Model d’exécution 1Sur des UF

DB MUMUMU

DB

Fixed Network

DB

Wireless LAN Cell (11 - 54 Mbps)

BSMU

DB

MUDB

MU

BS BS

FU

MT request

MT results

MT execution

Mobile Unit

Wireless network

FU

BS

Fixed Unit

Base Station

MU

Fixed network

DB DB system

Page 7: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 7

Model d’exécution 2Sur des UM

DB MUMUMU

DB

Fixed Network

DB

Wireless LAN Cell (11 - 54 Mbps)

BSMU

DB

MUDB

MU

BS BS

FU

Synchronization request

Synchronization results

MT execution

Mobile Unit

Wireless network

FU

BS

Fixed Unit

Base Station

MU

Fixed network

DB DB system

DB

Page 8: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 8

Model d’exécution 3Entre une UM et plusieurs UF

DB MUMUMU

DB

Fixed Network

DB

Wireless LAN Cell (11 - 54 Mbps)

BSMU

DB

MUDB

MU

BS BS

FU

MT request

MT results

MT execution

MT execution

Mobile Unit

Wireless network

FU

BS

Fixed Unit

Base Station

MU

Fixed network

DB DB system

DB

Page 9: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 9

Model d’exécution 4Entre plusieurs UM

DB MUMUMUDB

Fixed Network

DB

Wireless LAN Cell (11 - 54 Mbps)

BSMU

DB

MUDB

MU

BS BS

FU

MT request

MT results

MT execution

MT execution

Mobile Unit

Wireless network

FU

BS

Fixed Unit

Base Station

MU

Fixed network

DB DB system

Page 10: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 10

Model d’exécution 5Entre plusieurs UM et UF

DB MUMUMUDB

Fixed Network

DB

Wireless LAN Cell (11 - 54 Mbps)

BSMU

DB

MUDB

MU

BS BS

FU

MT request

MT execution

MT executionMT results

MT execution

Mobile Unit

Wireless network

FU

BS

Fixed Unit

Base Station

MU

Fixed network

DB DB system

Page 11: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 11

Plan

Les modèles d’exécution

Les techniques transactionnelles

traditionnelles

Analyse de travaux de transactions mobiles

Conclusions

Page 12: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 12

Les protocoles de validation Assurent la propriété d’atomicité

Le plus utilisé : Two Phase Commit (2PC)

Son interface a été standardisée Normes OSI TP, CCR, TIP Spécifications CORBA OTS et JTS

Page 13: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 13

2PC dans l’environnement mobile

Très couteaux : 2p messages

Si déconnexion des UM Exécution sur UF

Résultats délivrés à la reconnexion

Exécution sur UM Commit « local » et à la

reconnexion commit « global » Exécution répartie UM/UF

Annulation de la transaction !

Commit

(1) Prépare

Appli Coord Part

(2) Vote

(3) Décision

(4) Acq

Acq

(5)

Journalisation

Page 14: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 14

Les protocoles de contrôle de concurrence

Assurent la propriété d’isolation

Le plus utilisé : Two Phase Locking (2PL)

OSI TP recommande son utilisation

Page 15: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 15

2PL dans l’environnement mobile

Phase de verrouillage Une fois un verrou libéré aucun autre verrou peut être

acquis Phase de libération de verrous

Acquisitionde verrous

TempsLibérationVerrous lecture Libération de

Verrous d’écriture

Si déconnexion des UM Exécution sur UF

Résultats délivrés à la reconnexion

Exécution sur UM exécution « locale » et à la

reconnexion synchronisation «globale »

Exécution répartie UM/UF Temps de blocage indéfini !

Page 16: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 16

Plan

Les modèles d’exécution

Les techniques transactionnelles

traditionnelles

Analyse de travaux de transactions mobiles

Conclusions

Page 17: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 17

Organisation de l’analyse

Propositions se focalisant sur les propriétés ACID Clustering, Two-tier replication, Pro-motion, Semantics-

based, Reporting, Prewrite

Propositions se focalisant sur le mouvement et la déconnexion (approche intergicielle) Kangaroo, MDSTPM, Moflex

Produits commerciaux Pointbase, FastObjects, Oracle, IBM

Le modèle AMT et l’intergiciel TransMobi

[P. Serrano-Alvarado et al, 2004a]

Page 18: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 18

Propositions se focalisant sur les propriétés ACID

Page 19: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 19

Clusters

C1

C2

Clustering (1)

DB

MU

DB

DB

MU

DBFU

DBFU

DBMU

DBMU

DBFU

L’objectif est de maintenir la cohérence des données

Fortement connecté

Données liées sémantiquement oustockées à proximation

[E. Pitoura and B. Bhargava, 1999]

Page 20: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 20

Clustering (2)

C1

C3C2

VF VS

VSVS

Opération pendantla connexion

Opération pendant la déconnexion

Serialisabilité sur une copie

Intégration de clusters(réconciliation syntaxique)

Unité mobile

Unités fixes

Ci : Cluster iVS : Version stricteVF : Version faibleTS : Transaction stricteTF : Transaction faiblelf : lecture faibleef : écriture faiblecl : commit localal : abort localls : lecture strictees : écriture strictecg : commit globalag : abort global

TF{lf,ef,cl/al} ST{ls,es,cg/ag}

• Dans un cluster les données sont localement sérialisables• Des divergences sont possibles entre clusters• Transactions réparties sont possibles dans un cluster avec de techniques traditionnelles

[E. Pitoura and B. Bhargava, 1999]

Page 21: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 21

Two-tier replicationVM : Version maîtreVT : Version TentativeTB : Transaction baseTT : Transaction tentativeA : Copie maîtresseA’ : Copie secondaireA” : Copie secondaire modifiée

MV

MVMV

Station base

Unité mobile

Unités fixes

A’, B’, C’

A’, B’, C A’, B, C’

MV

A, B’, C’

BT

BT

BTBT

TV

A”, B”, C”

TTOpération pendantLes déconnexion

Opération pendantconnexion

Duplication Lazy master

TT, critère d’acceptation

[J. Gray et al., 1996]

•Pendant les déconnexions, uniquement les TT sont utilisées•Les TT seront exécutées lord d’une reconnexion• Des transactions distribuées sont possibles pendant les déconnexions en assurant le schéma de duplication maître paresseux

Page 22: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 22

Pro-motion

Méthodes communes

Méthodes de type spécifique

Obligations(deadline) Donnée

Règles de cohérence(i<0<100)

Information d’état(dernière modif.)

Compact

AppliAppli

Registre des

compacts

Librairie des

classes

Agent des Compacts

Unité mobile

Unités fixes

Station baseGestion mobilité Log

Architecture

Gestion des

compactsSGBD

Stock des Compacts

Serveur

BDL’objectif est d’assurer une manipulation locale cohérente des

données

•Il supporte de déconnexion•Localement les données sont manipulées

avec des techniques traditionnelles

[G. Walborn and P. Chrysanthis, 1999]

Page 23: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 23

Semantics-based

dcbaObjet Oa fragmenté(critère de sélection et

conditions de cohérence)

da

Fragments de Oa

Réintégration des fragments

(merging)

Serveur de BD

a b c d

DB

Unités mobile

Unités fixes

Appli Appli

MT = {e(Oa (a) )}MT = {l(Oa (d) )}Oa : object al : lecturee : écritureOa(b) : fragment b de l’objet a

Type de données• Listes• D’agrégation•Queues

•Il supporte la déconnexion•Localement, les données sont manipulées avec des techniques traditionnelles

[G. D. Walborn and Panos K. Chrysanthis, 1995]

Page 24: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 24

Reporting

Types de transaction• Atomiques• Reporting• Co-transactions• Non-compensables

Un cas possible des TM Reporting

DB

Délégation périodiqueDélégation à lavalidation

MT

Transaciton mobile(transaction globale)

Station base

TM={t1, Ct1, t2}

Unités fixes

Reporting non-compensables

t1,Ct1 t2

Unités mobile

Des transactions de compensation

Peuvent être associées

L’objectif est d’utiliser les unités fixes pour stoker ou gérer une partie

de l’exécution des TM

[P. Chrysanthis, 1993]

Page 25: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 25

Prewrite

Un cas possible d’utilisation des TM Prewrite

Unité mobile

Unité fixe

GD = Gestionnaire des donnéesGT = Gestionnaire des transac.a = variante d’écritureei = écriture ivi = validation ia’’ = variante de preécriturepli = prelecture ipei = preécriture ipvi = prevalidaiton i

TM1 = {pl1(a), pe1(a), pv1}

Object Oa’(variante de preécriture)

a’GT

Demande de l’objet Valeur preécriture assignée

a Objec Oa(variante

d’écriture)TM1 = {e1(a), v1}

GDStation base BD

[S. Madria and B. Bhargava, 2001]

Page 26: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 26

Analyse des propriétés ACID

Page 27: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 27

Atomicité ACID Assurée

Clustering et two-tier replication (en mode connecté) utilise des techniques de verrouillage (2PC)

Relâchée Validation locale (premier pas de la validation)

Pro-motion, Prewrite and Semantics-based: atomic commit protocol Clustering and Two-tier replication: local commit in disconnected

mode Validation globale (deuxiéme pas de validation SB/Serveur BD)

Clustering: réconciliation syntaxique des transactions faibles Two-tier replication: re-exécution des transactions tentatives

(critère d’acceptation) Pro-motion: vérifie la validité des compacts, procédures de

contingence Semantics-based: merge des fragments Prewrite: ni reconciliation ni re-exécution, uniquement les

opérations d’écriture sont exécutées Atomicité sémantique

Reporting: validation optimiste partiel + transactions de compensation

Page 28: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 28

CohérenceACID 2 versions de données

Clustering: version stricte (sérialisabilité sur une copie), version faible (degrés d’inchoérence)

Two-tier replication: version maîtresse (sérialisabilité sur une copie), version tentative

Prewrite: version d’écriture (version normale), variante preécriture (légèrement différente)

Encapsulation des données avec leur information de gestion Pro-motion: construction des compacts (critère de correction)

fragmentation et merge d’objets Semantics-based: fragmentation d’objets (conditions de

cohérence), merge Transactions de compensation

Reporting: transactions atomiques, reporting et co-transactions

Page 29: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 29

Isolation ACID Assurée

Copies exclusives Semantics-based (les fragments sont exclusives)

Relâchée Visibilité locale des résultats validés localement

Clustering, Two-tier replication, Pro-motion, Semantics-based Visibility globale des résultats validés localement

Reporting: atomic, reporting and co-transactions Autres aspects

Niveaux d’isolation Pro-motion détermine des méthodes de contrôle de

concurrence par compact Validation à deux phases

Semantics-based Clustering: quatre types de verrous et tableaux des conflits Prewrite propose deux types nouveaux de verrous (PR, PW,

R, W)

Page 30: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 30

DurabilitéACID Assurée

Validation globale Clustering, Pro-motion, Reporting

Validation locale Semantics-based: réduit la disponibilité des fragments Prewrite: échange beaucoup de messages

Relâchée Validation locale

Clustering, Two-tier replication Promotion peut donner quelques garanties mais il

existent des conditions que ne peuvet pas être respectées à cause des déconnexion (e.g. deadlines)

Page 31: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 31

Propositions se focalisant sur le mouvement et la

déconnexion

Page 32: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 32

Station base

Serveurs(sources)

KT

TJ: Trans JoeyTL: Trans LocaleTG:TransGlobale TK

Transactions Kangaroo

Unités mobile

Unités fixes

Soumission des transactions

Appli

Architecture du système

Un cas possible des transactions Kangaroo

TJ1

TL1,1 TL1,2 TL2,1 TL2,2TG1,1

TL1,1,2TL1,1,1

Coordination répartie

Hand-off TK

TJ2

SystemeGlobalde BD

BDBD

SGBD SGBD

ACID

LogGestiondes TM

(Tableaux de controleet d’état

Agent d’accès aux données

Niveauintergiciel

Multibases

•Pas de support pour des déconnexions•Support du déplacement

[M. Dunham et al., 1997]

Page 33: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 33

MDSTPM(Multidatabase Transaction Processing Manager Architecture)

Unités mobiles

Unités fixes

Soumission des transactions

Appli

BD DBMS

Architecture du système

LTM

[L. H. Yeo and A. Zaslavsky, 1994]

ACID

GTM

GRM

GIM

GGCCMM

Message queue facilityTransaction queueGlobal logGlobal transaction tableSite status table

Log

GT CoordinatorGCM: Coordinateur globalTM: Global transaction managerGRM: Global recovery managerGIM: Global interface manager

NiveauIntergiciel

Multibases

•There is support for disconnexions•There is not support for movement

Page 34: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 34

Moflex transactions

Mobile host

Fixed hosts

Moflex Transaction definition/submission

Appli

GTM

DB DBMS

LTM

DBDBMS

LTM

Adaptability when handoff occurs (rules: restart, split-restart, split-resume, continue) Location dependent transactions Multidatabase transactionwith execution dependencies: • Success• Failure• Time• Cost• Location

[K. Ku and Y. Ki, 2000]

Base station MTM

Moflex transactioncoordinatorMiddleware

level

MDBS

•There is not support for disconnexions•There is support for movement

Page 35: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 35

New middleware functions

to support mobile transactions

Page 36: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 36

New middleware functions (1) Movement management

Kangaroo: Data Access Agent on BS Communication with MUs and MDBS MT management and movement of MUs

KT and JT creation Logging of movement and execution state

recording Coordination of KT abortion (linked list)

Moflex Support of location dependent transactions Support of hand-off: restart, split-restart,

split-resume, continue

Page 37: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 37

New middleware functions (2) Disconnection management

MDSTPM: Message and queue facility (MQF) MU management with message and transaction

queues Asynchronous messages exchange Connection/disconnection (planned or not) Reconnection and recovery of MT

MT coordination Distributed in Kangaroo Centralized in MDSTPM (at the GTM where

the global transaction is initiated) and Moflex (at the current BS)

Page 38: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 38

Quelques produits commerciaux

Page 39: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 39

Pointbase Relational database, 100% Java Mono user, out-line operation Micro version

45-90Kb footprint Flate transactions SQL92

Embedded version 1Mb footprint Distributed transactions (2PC) Locking by line and 4 isolation levels of ANSI SQL92 (read

uncommitted, read committed, repeatable read, serializable) Pointbase UniSync

Biderectional synchronization with Oracle or SQL Server databases Publish/subscribe approach

Page 40: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 40

FastObjects j2 Object database, 100% java (before

Navajo Poet) Database components, modular

architecture, 450Kb footprint Locking by object and 4 isolation levels of

ANSI SQL92 Flate, nested and parallel transactions JDOQL, JDO and ODMG Duplication with a shadow database

approach

Page 41: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 41

Oracle Lite and OracleAS wireless OracleAS Wireless

Allows mobile access to applications on fixed hosts

PIM (Personal Information Manager) and email based on location

Pushes SMS (Short Message Service), WAP, voice Secure transactions from any MU

Oracle Lite Relational database, 50Kb-1Mb footprint Mono user, out-line operation Flate transactions Locking by line and 4 isolation levels of ANSI

SQL92 Mobile Sync

Bidirectional synchronization of several MU Locally updatable snapshots

Page 42: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 42

Websphere Everyplace andDB2 Everyplace of IBM WebSphere Everyplace

Allows data access from MU (email, PIM, business data)

Delivers to MU web pages and business applications Perception and location services for mobile

applications DB2 Everyplace

Relational database, 180Kb footprint Mono user, out-line operation Flate transactions

Sync Server Bidirectional synchronization with DB2, Oracle,

Informix, Sybase, MS SQL Server

Page 43: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 43

Organisation de l’analyse

Propositions se focalisant sur les propriétés ACID Clustering, Two-tier replication, Pro-motion, Semantics-

based, Reporting, Prewrite

Propositions se focalisant sur le mouvement et la déconnexion (approche intergicielle) Kangaroo, MDSTPM, Moflex

Produits commerciaux Pointbase, FastObjects, Oracle, IBM

Le modèle AMT et l’intergiciel TransMobi

[P. Serrano-Alvarado et al, 2004a]

Page 44: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 44

Resume of MT proposals

1. On FUs

3. Among a MU and + FUs4. Among several MUs

5. Among several MUs/FUs

2. On a MU

Existent transactional models

Execution models•Traditional technics are used• Disconnexion and movement management with middleware approachs

• Replication/synchronization problems• Local ressources optimisation

• Few transaction models and without disconnections

• Almost no one transaction model

Page 45: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 45

Quelques conclusions

Distributed execution models are not enough addressed

Not enough adaptability to ME

Not enough interest in reducing drawbacks of ME on mobile transaction execution (execution cost and frequent transaction failures)

ACID properties relaxed

The five execution models are not taken into account

Page 46: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 46

Le modèle AMT etl’intergiciel TransMobi

Page 47: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 47

The approach Associate description of the execution

context to transaction definition

Provide adaptability for supporting different execution models

To adapt transaction execution and to To adapt transaction execution and to reduce drawbacks of ME variationsreduce drawbacks of ME variations

To adapt transaction execution and to To adapt transaction execution and to reduce drawbacks of ME variationsreduce drawbacks of ME variations

Page 48: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 48

The AMT model

• Is an open nested transaction model• Relaxes ACID properties• Contains one or several execution

alternatives • Is able to use the five execution models• Is adaptable to context variations

Adaptable Mobile Transaction Model (AMT)

[P. Serrano-Alvarado, 2004] [P. Serrano-Alvarado et al, 2004b]

Page 49: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 49

AMT model structure AMT allows to define TAMT transactions

TAMT

ctki

EDk

EAk EAl

tli tlj

EDl

>||

DBA DBB DBC

Autonomous heterogeneous DBMS

EAk commit =>TAMT commit

tki abort =>EAk and TAMT

abort

tki tkj

Execution Alternative

Environment Descriptor

Sequential or parallel execution

Page 50: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 50

AMT model properties

ACID

Semantic atomicity

Semi-atomicity

Semantic consistency

Global serializability

TAMT

ctki

EDk

EAk EAl

tli tlj

EDl

>||

DBA DBB DBC

Autonomous heterogeneous DBMS

tki tkj

Conditioned by EAk

semantics

C

Formal specification in ACTA

Page 51: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 51

Environment descriptor (ED)

bandwidth-rateComm-price

:

high mediumfree cheap

Quality good medium EDb bb b

EDK

1 01 0

Characteristic Quality levels Unit

WN

MU

Connection-state Connected, disconnected --Bandwidth-rate high, medium, low KbpsCommunication-price free, cheap, expensive Euros/timeAvailable-battery full, half, low hh:mm:ssAvailable-cache full, half, low KbAvailable-persistent-memory full, half, low KbProcessing-capacity high, medium, low MipsTime-connection t hh:mm:ssLocation l l

Page 52: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 52

TransMobi middleware functions

Coordinate DBMS interaction by TAMT transactions and to ensure:

ACID

Semi-atomicity

TAMT

ctki

EDk

EAk EAl

tli tlj

EDl

||>

DBA DBB DBC

Semantic consistency

tki tkj

Semantic atomicity

Global serializability

Semi-atomicity

Semantic consistency

Semantic atomicity• CO2PC commit protocol

Global serializability• Adaptation of the OTM

technique Context awareness to choose

EAs

Support disconnections

Page 53: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 53

TransMobi deployment

DBMS

Trans

Recovery

CC

Reconcili

Replica

LightDBMS

Trans

CC

Recovery

Mobile UnitMobile Unit Fixed Units Fixed Units

SurveillanceMU,locali..

TransMobiAgent

SurveillanceWireless net

Application

TransMobi Server

TransMobi Server

TransMobi Client

Page 54: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 54

CO2PC commit protocol (1) Ensures EAk semantic atomicity

Compensatable tki -> anticipated commit

Non-compensatable tki -> global commit

Combination: optimistic commit and 2PC

Page 55: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 55

MUOpt-partic

LightDBMS Proxy

DBMSServerProxy

FUnon-opt-partic

coordinator

CO2PC commit protocol (2)

commit

ackvote

ack

decisionvote

decision

prepare

AdvantagesAdvantages Supports compensatable and non-compensatable transactions Resources can be released early Hides mobile aspect to underlying DBMS Requires only 2p messages on the wireless network

AdvantagesAdvantages Supports compensatable and non-compensatable transactions Resources can be released early Hides mobile aspect to underlying DBMS Requires only 2p messages on the wireless network

Page 56: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 56

The OTM adaptation (1) Serializability control of EAk (so TAMT) Direct conflictDirect conflict generation among EAk of

TAMT Management of a global serializability

graph Adaptation

Allow unilateral commit of tki (CO2PC)

Page 57: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 57

The OTM adaptation (2)

Graphmanager

TAMTj TAMTk

tk1tj1

tj1 > tk1 tk2 > tj2

TAMTk

tk2tj2

ticketk1

abort/commit

ticketj1

Nodecreation

TAMTj

DBA DBBTicketA TicketB

TAMTj = EAj {tj1, tj2}

TAMTk= EAk {tk1, tk2}

Nodecreation

ticketj2

ticketK2

AdvantagesAdvantages Allows heterogeneity of CC mechanisms Information about local ordering is not

required

AdvantagesAdvantages Allows heterogeneity of CC mechanisms Information about local ordering is not

required

Page 58: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 58

DBMSServer

TransMobiServer

FUnon-opt-partic

coordinatorMU

opt-partic

LightDBMS

TransMobiServer

TransMobiAgent

FU/BS

CO2PC, OTM and TransMobi

decision

vote - ticket

decision

Graphmanager

FU

vote - ticket

vote - ticketticket

ticket

abort/commit

decision

Graph management

ack - ticket

AdvantagesAdvantages Two messages on the wireless

network• For commit and the serializability process

Possibility of disconnection anytime

AdvantagesAdvantages Two messages on the wireless

network• For commit and the serializability process

Possibility of disconnection anytime

Page 59: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 59

Analysis of the AMT approach

Advantages Transactional adaptation to context variations Allows trade-off between different quality

criteria Autonomy Heterogeneity

Limitations Necessity of knowing the context execution

and the application quality criteria Transaction design potentially complex Application domain -> a priori knowledge of

transactions

Page 60: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 60

Plan

Les modèles d’exécution

Les techniques transactionnelles

traditionnelles

Analyse de travaux de transactions mobiles

Conclusions

Page 61: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 61

Conclusions Mobile environments are highly versatile and

face several resource constraints Many academic and industrial efforts have been

devoted to improve mobile transaction processing

New advanced transaction models are necessary where ACID properties are generally relaxed

Due to the mobile environment characteristics Mobile systems must be context aware Adaptation is necessary

Middleware approaches are necessary to support mobility

Page 62: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 62

Bibliographie [G. Bernard et al. 2004] G. Bernard, J. Ben-Hotman, L. Bougamin, G. Canals, B. Defude, J.

Ferrié, S. Gançarski, R. Guerraoui, P. Molli, P. Pucheral, C. Roncancio, P. Serrano-Alvarado, P. Valduriez. "Mobile Databases: a Selection of Open Issues and Research Directions". ACM SIGMOD Record, vol 33, number 2, June, 2004

[G. Bernard et al. 2003] G. Bernard, J. Ben-Hotman, L. Bougamin, G. Canals, B. Defude, J. Ferrié, S. Gançarski, R. Guerraoui, P. Molli, P. Pucheral, C. Roncancio, P. Serrano-Alvarado, P. Valduriez. "Mobilité et bases de données- Etat de l’art et perspectives" (Part I and  part II). Chronique Technique et Science Informatiques (TSI), 22 (3 y 4), 2003

 [P. Chrysanthis,1993] P. K. Chrysanthis. "Transaction Processing in a Mobile Computing Environment". IEEE Workshop on Advances in Parallel and Distributed Systems (APADS), Princeton, USA, October,1993

[M. Dunham et al., 1997] M. H. Dunham and A. Helal and S. Balakrishnan. "A Mobile Transaction Model that Captures Both the Data and the Movement Behavior". ACM/Baltzer Journal on special topics in mobile networks and applications, vol 2, num 2, 1997.

[J. Gray et al., 1996] J. Gray and P. Helland and P.O'Neil and D. Shasha. "The Dangers of Replication and a Solution". ACM SIGMOD Conference, Montreal, Canada, June 1996.

[K. Ku and Y. Ki, 2000] K. Ku and Y. Kim. "Moflex Transaction Model for Mobile Heterogeneous Multidatabase Systems". IEEE Workshop on Research Issues in Data Engineering, San Diego, USA, February 2000.

[S. Madria and B. Bhargava, 2001] S. K. Madria and B. Bhargava. "A Transaction Model for Improving Data Availability in Mobile Computing". Kluwer Academic Publishers Distributed and Parallel Databases (DAPD), vol 10 num 2, 2001.

Page 63: Tutoriel UbiMob 2005 1 Gestion de transactions mobiles Patricia Serrano Alvarado Post doctorat CNRS Laboratoire LIFL, Projet Jacquard Patricia.Serrano-alvarado@lifl.fr

Tutoriel UbiMob 2005 63

[E. Pitoura and B. Bhargava, 1999] S. K. Madria and B. Bhargava. "Data Consistency in Intermittently Connected Distributed Systems". IEEE Transactions on Knowledge and Data Engineering (TKDE), vol 11 num 6, 1999.

[P. Serrano-Alvarado, 2004] Patricia Serrano-Alvarado. "Transactions Adaptables pour les Environnements Mobiles". Ph.D. thesis on Computer Science, Joseph Fourier University (UJF), Grenoble, France, February 2004.

  [P. Serrano-Alvarado et al, 2004a] Patricia Serrano-Alvarado, Claudia L. Roncancio, Michel

Adiba. "A Survey of Mobile Transactions".  Journal on Distributed and Parallel Databases (DAPD), vol 16, number 2, September, 2004.

[P. Serrano-Alvarado et al., 2004b] Patricia Serrano-Alvarado, Claudia L. Roncancio, Michel Adiba, Cyril Labbé. "Adaptable Mobile Transactions and Environment Awareness".  In 19ièmes Journées Bases de Données Avancées (BDA), Lyon, France, October 2003.

[G.D. Walborn and P. Chrysanthis, 1999] G. D. Walborn and P. K. Chrysanthis. "Transaction Processing in PRO-MOTION". ACM Symp. on Applied Computing, San Antonio, USA, February 1999.

[G. D. Walborn and Panos K. Chrysanthis, 1995] G. D. Walborn and Panos K. Chrysanthis. "Supporting Semantics-Based Transaction Processing in Mobile Database Applications". Symp. on Reliable Distributed Systems (SRDS), Bad Neuenahr, Germany, September 1995.

[L. H. Yeo and A. Zaslavsky, 1994] L. H. Yeo and A. Zaslavsky. "Submission of Transactions from Mobile Workstations in a Cooperative Multidatabase Processing Environment". Int. Conf. on Distributed Computing Systems (ICDCS), Poznan, Poland, June 1994.