• Nenhum resultado encontrado

Support for Context-Aware Data Management

N/A
N/A
Protected

Academic year: 2022

Share "Support for Context-Aware Data Management"

Copied!
30
0
0

Texto

(1)

Obj t O i t d D t b

Object-Oriented Databases

Support for Context-Aware Data Management

Version Model

Query Processor

Implementation

(2)

It's been a long way... g y

Workstation

Mainframe Computer Personal Computer Laptop Computer

What will be next?

next?

Palmtop Computer Media Phones Disappearing Computer

(3)

...and the road goes on and on. g

ƒ So far, information systems have always coped with these ever-changing platforms and requirements

ƒ hierarchical databases

ƒ network databases

ƒ relational databases

ƒ object-oriented databases

ƒ object-relational databases

i i d t b

ƒ engineering databases

ƒ lightweight databases

ƒ personal databases

ƒ personal databases

ƒ mobile databases

ƒ context-aware databases?co e a a e da abases

(4)

The Need for Context-Aware Computing p g

ƒ Mobile computing

ƒ device limitations, such as reduced interaction bandwidth

ƒ location, environment, tasks, preferences, history, device characteristics, ...

ƒ Pervasive computing

ƒ lack of traditional interfaces, such as keyboards or screens

ƒ environment, tasks, moods, preferences, history, personality, background

background, ...

ƒ Web engineering

t t d t ti d ti b h i

ƒ content adaptation and proactive behaviour

ƒ personalisation, internationalisation, access channel or mode, ...

(5)

Solutions for Context-Aware Computing p g

ƒ Models

ƒ context representation

ƒ context management

ƒ Infrastructures

ƒ context gathering

ƒ context processing and augmentation

ƒ trigger-based application adaptation

ƒ CASE tools

ƒ model-based generation of context-aware applications

(6)

Solutions for Context-Aware Computing p g

ƒ Very few context-aware information systems, but...

ƒ temporal databases

ƒ engineering databases (CAD, CAM)

ƒ software configuration management

...have addressed comparable problems in the past

ƒ Upshot

ƒ stratum approaches built on top of existing systems do not work

ƒ experience in models, storage, indexing and query languages

ƒ context-aware data management has different requirements in

t i d i d i

terms indexing and query processing

(7)

Positioning of Our Work g

Approaches Examples

Requirements Use cases

User studies Specifications

UML use case diagrams, ...

Usability, field tests, ...

Mock-ups, descriptions, ...

Modelling Data Models Software Models

Specifications Mock ups, descriptions, ...

E/R, Relational Model, OM, ...

OMT UML class diagrams

Implementation Manual

Software Models

Domain-specific Models

OMT, UML class diagrams, ...

OOHDM, WebML, Hera, ...

IDE (Eclipse Visual Studio )

Implementation Manual

Semi-Automatic

Automatic Code Generation

IDE (Eclipse, Visual Studio, ...) WebRatio

Platforms Relational Databases

Object-Oriented Databases (Programming) Languages

SQL Server, mySQL, Oracle, ...

ObjectStore, db4o, OMS, ...

Java, C#, JSP, XML, XSLT, ...

(8)

Context-Aware Information Systems y

ƒ Goals

ƒ Context-dependent query processing

- mobile computing, pervasive computing, web engineering

S t f li ti d l t

ƒ Support for application development

- web engineering, software engineering, product engineering

ƒ Approach Approach

ƒ Context notion and representation

ƒ Two-dimensional version modelTwo dimensional version model

- Alternative versions (variants) for run-time context-awareness - Revisional versions (revisions) for design-time system evolution

M t hi l ith t l t t t d d t i t

ƒ Matching algorithm to select content-dependent variants

- Compute best match rather than exact match

ƒ Integration into an object-oriented data management systemeg a o o a objec o e ed da a a age e sys e

(9)

Context in Information Systems y

ƒ

Context information is optional

ƒ

Information system has a well-defined default behaviour

ƒ

Available context information may vary

R lt i t d i d th th ifi d b t t

ƒ

Result is augmented or improved rather than specified by context

ƒ

Context representation needs to be general and open

(10)

Context, Context Space and Context State , p

ƒ Context space

ƒ context dimensions that are relevant to an application

ƒ S = {name1, name2, ..., namen}

i: 1 ≤ i ≤ n namei ∈ NAMES and therefore S ⊆ NAMES

ƒ Context Value

ƒ c = <name, value>, where name ∈ NAMES and value ∈ VALUES

ƒ Context

ƒ C(S) = {<name1, value1>, <name2, value2>, ..., <namem, valuem>}

= {c1, c2, ..., cm}

i: 1 i mnameS andc cC: c = cname = name

i: 1 ≤ i ≤ m nameiS and ci, cjC: ci = cjnamei = namej

ƒ Context state

special context C (S) ∀ nameS:<name value>C (S)

ƒ special context C(S), ∀ name S: <name, value> C(S)

(11)

Revisions and Variants

Revisions Variants

ƒ

design-time

ƒ

"off-line" queries

ƒ

run-time

ƒ

"on-line" queries q

ƒ

targeted at developers

ƒ

implicit and explicit creation

q

ƒ

targeted at users

ƒ

explicit creation only

ƒ

implicit and explicit creation

ƒ

serial

ƒ

explicit creation only

ƒ

parallel

(12)

OM Object Metamodel j

Simple Object

(13)

Version Model

ƒ Metamodel extended with variants and revisions

ƒ variants are structurally favoured over revisions

ƒ run-time performance versus design-time performance

ƒ Variants define a variant context C

v

(S)

ƒ defines in which context a variant can be used

ƒ no two variants of an object can define the same Cv(S)

ƒ Revisions are identified by a revision number

ƒ ascending sequence

ƒ counter is incremented when a new version is generated

ƒ All versions of an object have the same types

(14)

Versioned OM Object Metamodel j

Versioned Object

(15)

Evolution of a Versioned OM Object j

Latest Revision

<loc, de>

o927@2[1] o927@7[1]

object o927@0[0] o927@1[0] o927@4[0] o927@8[0]

Default Variant

<loc, uk>

o927@3[2] o927@6[2]

<loc, ch>

o927@5[3] o927@9[3]

<loc, ch>

<lang, fr>

_time_

(16)

Identifying and Referencing Objects y g g j

ƒ Both specific and generic references are supported

ƒ Object identifier format: o "id" @ "version" [ "variant" ]

ƒ Concept of default variant and latest version

ƒ Partially specified references can be completed automatically

ƒ Versioning of object graphs

ƒ Based on object references

- both generic and specific references can be used - local managed within objects uni-directional

- local, managed within objects, uni-directional

- versioning of relationships is dependent on versioning of objects

ƒ Based on associations

- relation between objects based on tuples of object identifiers - represented as object with revisions and variants

- global, managed outside objects, bi-directional

- versioning of relationships is independent of versioning of objects

(17)

Automatic Completion of Object Identifiers p j

ƒ For each dimension of the version model there is a default representation

ƒ Latest version

ƒ Default variant

ƒ Partially specified references are completed as follows y

ƒ o927[2] o927@4[2] default version

ƒ o927@3 o927@3[0] default variant

ƒ o927 o927@4[0] default version and variant

(18)

Context-Aware Query Processing Q y g

Simple Scoring Function

ƒ

Invoked for every object o accessed by the query evaluator

ƒ

Invoked for every object o accessed by the query evaluator

ƒ

Scoring function fs assigns a score value to every variant v of o

ƒ

Indicator functionIndicator function ffii uses matching condition (uses matching condition ( ) for context values≅) for context values

ƒ

The variant with the highest score smax is returned, if

ƒ there is only one variant with smax

ƒ the score smax is above the system threshold smin

(19)

Syntax for Context and Property Values y p y

The indicator function f

ii

supports the following syntax for both context and property values

Type Syntax Description Examples

atom x Atomic value en 27

atom x Atomic value en, 27

set x1{:xi} Set of atomic values S := {x x }

at:ch:de, red:blue

S := {x1, ..., xn} red:blue

range xmin..xmax Range of atomic values I := [x x ]

5.5..7.0, a f

I := [xmin, xmax] a..f

star * Wildcard *

(20)

Matching Condition ( g ( )) for Context Values

(21)

Examples p

object object

{(format,html), (lang,en)} {(format,html), (lang,en), (loc,uk)} {(img,wbmp), (lang,en), (loc,uk)}

object

o927@0[0] o927@1[1] o927@2[2]

object

o927@0[0] o927@1[1] o927@2[2]

<format, html>

<lang, en>

<lang, de>

<format, html>

<loc, uk>

<img, gif:png>

<lang, de>

<img, wbmp> <img, jpg>

<lang, en>

<loc, *>

2/2 1/2 0/2 2/3 2/3 0/3 0/3 1/3 2/3

be uam

est matc undesire

mbiguou

ch edus

(22)

Problems and Solutions

ƒ Selection of undesired variants

ƒ value prefixes (+, –) denote required and illegal matches

ƒ examples: <img, +wbmp>, <user, –fred>

ƒ Tie-breakers for ambiguous matches

ƒ weight factors w(n) for context dimensions

ƒ weight factors for matching classes (atom, set, range, wildcard)

ƒ handling of under and over-specified variants

ƒ General scoring function

(23)

Query Processing Modes

Q y g

ƒ Local

ƒ match context for every object individually

ƒ risk of "inconsistent" result sets

ƒ easy to integrate into existing query processor

ƒ Local with "convergence"

ƒ match context for every object individually

ƒ add "unmatched" variant context to context state

ƒ result depends on the structure of the query tree

ƒ Global

ƒ match context for all objects of the query tree

ƒ optimal, consistent and stable results

t ti ll l

ƒ computationally complex

(24)

Limitations and Issues

ƒ Sorted lists to specify user preferences

ƒ <lang=de_ch, de, en, it, fr>

ƒ update indicator function, makes matching more complex

ƒ Logical expressions to specify complex conditions

ƒ (lang=it && loc=ch) || (lang=it && loc=it)

ƒ rethink notion and representation of context!

ƒ Scalability

ƒ applications with large context space

ƒ information retrieval solutions (vector model, similarity measures)

ƒ However, experiences so far do not suggest major

problems related to these issues and limitations

(25)

Implementation p

ƒ

Extension to the OMSjp layer

ƒ adaptation of value model

Database Application

ƒ adaptation of value model

ƒ driver implementation handles versioning issues

OMS Pro Driver eOMS Driver OMS Avon Driver OMSjpInterface

ƒ

No high-level operational model

ƒ versions created manually

ƒ no support for merging or

OMS Pro Driver eOMS Driver OMS Avon Driver

no support for merging or deleting object versions

ƒ

Not accessible through

d l ti l

OMS Pro eOMS OMS Avon

declarative query language

(26)

OMSjp Value Model jp

toNative()

<<interface>>

OMSValue ()

<<interface>>

OMSObject

<<interface>>

OMSBaseValue

<<interface>>

OMSStructuredValue

<<interface>>

OMSBulkExtent

<<interface>>

OMSInstance getObjectID()

getDressTypes() browse() dress() strip()

getValue() getMemberValue()

setMemberValue() getStructuredType() setStructuredType()

<<interface>>

<<interface>>

getMemberType() setMemberType()

<<interface>>

<<interface>>

<<interface>>

OMSString <<interface>>

OMSSetExtent getInstanceType()

getAttributeValue() setAttributeValue() executeMethod()

getName() getType()

OMSMember

<<interface>>

getName() OMSType

<<interface>>

OMSStructuredType

<<interface>>

OMSBagExtent

<<interface>>

OMSRankingExtent getExtent()

setExtent() OMSAssociation count()

intersect() minus() product() union()

OMSCollection

<<interface>>

OMSReal

<<interface>>

<<interface>>

OMSInteger

getBulk() OMSAttribute

getAttribute() getSubTypes() getSuperTypes()

<<interface>>

OMSObjectType

yp

getSubTypes() getSuperTypes()

<<interface>>

OMSBaseType

<<interface>>

OMSSequenceExtent

closure() compose() div() domain()

<<interface>>

OMSBinaryCollection <<interface>>

OMSDate OMSBoolean

<<interface>>

OMSUri

g p yp ()

() ds() dr() inverse() nest() range() rs() rr() unnest()

<<interface>>

OMSCardinality

<<interface>>

OMSBulk

<<interface>>

OMSObjectID

(27)

Extended Value Model

OMSObject OMSObjectVersion

oid: OMSObjectID

types: Collection<OMSObjectType>

versions: Collection<OMSObjectVersion>

latestTimestamp: Timestamp defaultVariantId: OMSVariantID

latestRevision: Map<OMSVariantID, OMSObjectVersion>

defaultVariant: SortedMap<Timestamp OMSObjectVersion>

#getBaseObject(): OMSObject +getTimestamp(): Timestamp baseObject: OMSObject timestamp: Timestamp variantId: OMSVariantID

instances: Collection<OMSInstance>

+getObjectID(): OMSObjectID +getDressTypes()

+dress(type: OMSObjectType) +strip(type: OMSObjectType)

+createRevision(version: OMSObjectVersion): OMSObjectVersion t V i t( t t C t t) OMSObj tV i

defaultVariant: SortedMap<Timestamp, OMSObjectVersion> getTimestamp(): Timestamp +getVariantID(): OMSVariantID

+browse(type: OMSObjectType): OMSInstance

+createVariant(context: Context): OMSObjectVersion +getLatestRevision(): OMSObjectVersion

+getLatestRevision(id: OMSVariantID): OMSObjectVersion +getDefaultVariant(): OMSObjectVersion

+getDefaultVariant(ts: Timestamp): OMSObjectVersion

+getVersion(ts: Timestamp, id: OMSVariantID): OMSObjectVersion +match(context: Context): OMSVariantID

baseVersion: OMSObjectVersion type: OMSObjectType

OMSInstance

( )

#getBaseVersion(): OMSObjectVersion setBaseVersion(version: OMSObjectVersion) +getInstanceType(): OMSObjectType

+setAttributeValue(name: String, value: Object) +getAttributeValue(name: String): OMSValue +executeMethod(name: String in: Object[]) type: OMSObjectType

+executeMethod(name: String, in: Object[])

... type

(28)

Outlook and Future Work

ƒ Integration of context into query language

ƒ Indexing of context-aware data

ƒ Context-aware metadata Context aware metadata

ƒ OMS represents everything as objects

ƒ collections, associations and methods already context awarecollections, associations and methods already context aware

ƒ investigation of types, type hierarchies, collection hierarchies

ƒ Context-aware programming Context aware programming

ƒ virtual method dispatching based on signature and context

ƒ prototype implementation in Prologp yp p g

(29)

Literature

ƒ R. Belotti, C. Decurtins, M. Grossniklaus, M. C. Norrie, and A. Palinginis. Interplay of Content and Context, In Journal on Web Engineering, Vol. 4, No. 1, 2005 g g, , ,

ƒ M. C. Norrie, B. Signer, M. Grossniklaus, R. Belotti, C.

Decurtins and N Weibel Context Aware Platform for Decurtins, and N. Weibel. Context-Aware Platform for Mobile Data Management, In Wireless Networks, Vol.

13 N 6 2007 13, No. 6, 2007

ƒ M. Grossniklaus: An Object-Oriented Version Model

for Context-Aware Data Management, PhD Thesis,

ETH No. 17137, 2007

(30)

N t W k Next Week

Course Review

Summary and Exam Information

Ongoing Research Projects

Student Projects

Referências

Documentos relacionados

Figure 6/ Figura 6 - Adherence to phytotherapy: frequency of self-consumption of herbal products by self-medication or under the guidance of other health professionals by

Estes projetos, realizados em ambos os contextos (Pré-escolar e 1º Ciclo) estiveram associados a três estratégias de diferenciação: individualização, trabalho de

Os traçadores mecânicos tiveram o posto de trabalho classificado como bom, o skidder foi considerado médio, os carregadores florestais MJ 10070 e Motocana e o mini skidder

Para além das referidas metas e objectivos dos eventos estipulados por Getz (1991), também Dimmock e Tiyce (2001) sublinham que os eventos no campo do turismo

na decisão de colocar a página da empresa na Internet (questão 2.7 do questionário); influência/impacto mais provável da Internet nas agências de viagens e operadores

No estudo do efeito da temperatura e umidade relativa do ar no desempenho de suínos da raça Landrace, Duroc e Large White, com os dados de 1974 e 1975, observou-se, pela análise

Para além dos problemas evidentes nesta dimensão, se, sob a perspetiva de Camara, Guerra &amp; Rodrigues (2007) a mudança pode ser definida como a mudança da estrutura e da

As for a post hoc analysis (See annex 10), in the fashion leadership scale it has been found that sales hunters are significantly different from the rest of clusters. As for the