Top Banner
The Orchestra of Multiple Model Repositories Sergejs Kozlovičs [email protected] Research Laboratory of Modeling and Software Technologies Institute of Mathematics and Computer Science, University of Latvia
48

The Orchestra of Multiple Model Repositories

Feb 25, 2016

Download

Documents

palila

The Orchestra of Multiple Model Repositories. Sergejs Kozlovičs [email protected]. Research Laboratory of Modeling and Software Technologies Institute of Mathematics and Computer Science, University of Latvia. The ``Orchestra'' Metaphor. Orchestra: multiple musical instruments - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Orchestra of Multiple Model Repositories

The Orchestra ofMultiple Model Repositories

Sergejs Kozlovič[email protected]

Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 2: The Orchestra of Multiple Model Repositories

The ``Orchestra'' Metaphor

Orchestra:• multiple musical instruments• playing simultaneously

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 3: The Orchestra of Multiple Model Repositories

The ``Orchestra'' Metaphor

Orchestra:• multiple musical instruments• playing simultaneously • multiple model repositories• accessed simultaneously

(inter-repository links are possible)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 4: The Orchestra of Multiple Model Repositories

The ``Orchestra'' Metaphor

Orchestra:• multiple musical instruments• playing simultaneously • multiple model repositories• accessed simultaneously

(inter-repository links are possible)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 5: The Orchestra of Multiple Model Repositories

Meta-s* a publication * a newspaper * The San Francisco Chronicle * the May 18 edition of the The San Francisco Chronicle * my copy of the May 18 edition of the The San Francisco Chronicle

* my copy of the May 18 edition of the The San Francisco Chronicle as it was when I first picked it up (as contrasted with my copy as it was a few days later: in my fireplace, burning)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

The "Gödel, Escher, Bach" bookby Douglas Hofstadter

Page 6: The Orchestra of Multiple Model Repositories

MOF Meta-Levels (Linguistic)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 7: The Orchestra of Multiple Model Repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Artifacts are organized into three layers:• the meta-metamodel;• metamodels conforming to the meta-

metamodel;• models conforming to some particular

metamodel.

The Three-Level Conjecture(I. Kurtev and J. Bézivin)

Page 8: The Orchestra of Multiple Model Repositories

The Three-Level Conjecture(I. Kurtev and J. Bézivin, 2005)

Artifacts are organized into three layers:• the meta-metamodel;• metamodels conforming to the meta-

metamodel;• models conforming to some particular

metamodel.

The meta-metamodel is able to describe itself.

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 9: The Orchestra of Multiple Model Repositories

MOF Meta-Levels (Linguistic)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

UML metamodel

UML model

MOF

conforms to

conforms to

conforms to

Page 10: The Orchestra of Multiple Model Repositories

Technical Spaces(I. Kurtev, J. Bézivin, and M. Aksit; 2002, 2005)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

UML metamodel

UML model

MOF

conforms to

conforms to

conforms to

MOF TS

OWL classes

OWL individuals

OWL DL

conforms to

conforms to

conforms to

RDF/OWL TS

ER-model (DB schema)

DB rows

DB system tables

conforms to

conforms to

conforms to

Relational DB TS

Page 11: The Orchestra of Multiple Model Repositories

Technical Spaces (cont.)(I. Kurtev, J. Bézivin, and M. Aksit; 2002, 2005)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

XML schema(.xsd)

XML document

XML metaschema

(XSD.xsd)

conforms to

conforms to

conforms to

XML TS

Java grammar

Java program

BNF

conforms to

conforms to

conforms to

Grammarware TS

Page 12: The Orchestra of Multiple Model Repositories

Why different technical spaces?

• One TS can be more suitable than another• Reusing skills and knowledge of a familiar TS• A capability not available in a desired TS can

be borrowed from another TS

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 13: The Orchestra of Multiple Model Repositories

TS interoperability

• Offline solution: using projectors and extractors (B´ezivin et al.)

• “Online” (On-the-fly) solution: this paper!o No deep copying of the data is required!

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 14: The Orchestra of Multiple Model Repositories

Problem 1: Numerous different repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

See Table 1 in the paper!

Page 15: The Orchestra of Multiple Model Repositories

Repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

See Table 1 in the paper!

MOF TS:• EMF• CDO• MDR (NetBeans)• Enchanced Model

Repository• MetaMart Metadata

Repository• JR• ...

Page 16: The Orchestra of Multiple Model Repositories

Repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

The solution is a univeral Repository Access API, RAAPI• tda.lumii.lv/raapi.html

Page 17: The Orchestra of Multiple Model Repositories

Problem 2: Ontological meta-levels

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 18: The Orchestra of Multiple Model Repositories

Ontological meta-levels

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 19: The Orchestra of Multiple Model Repositories

Meta-Levels (Ontological)A meta-metamodel that supports infinitely many ontological

meta-levels (used by the JR repository):

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 20: The Orchestra of Multiple Model Repositories

Meta-Levels (Ontological)A meta-metamodel that supports infinitely many

ontological meta-levels (used by the JR repository):

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 21: The Orchestra of Multiple Model Repositories

Meta-Levels (Ontological)

OWL Full also supports infinitely many ontological meta-levels.

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 22: The Orchestra of Multiple Model Repositories

Shostaks' conjecture

It is difficult for a human to think at more than two meta-levels at a time.

Still, it is pretty easy for a human to focus on any two adjacent meta-levels.

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 23: The Orchestra of Multiple Model Repositories

Shostaks' conjecture

It is difficult for a human to think at more than two meta-levels at a time.

Still, it is pretty easy for a human to focus on any two adjacent meta-levels.

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Agris Šostaksat SOFSEM 2012

Page 24: The Orchestra of Multiple Model Repositories

We divide the repository into two parts:

• M3 contating the meta-metamodel; fixed for a particular repository/technical

space;• all other data (either M2+M1 or multiple

ontological meta-levels)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Dealing with Šostaks' conjecture

Page 25: The Orchestra of Multiple Model Repositories

Dealing with Šostaks' conjecture

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

• RAAPI is designed to work with any two adjacent meta-levels• Switching between levels and mixing them is possible by, e.g.,

passing a reference to a class when a reference to an object is expected.

Page 26: The Orchestra of Multiple Model Repositories

The Idea

• The kernel represents all repositories as one big virtual repository.

• The kernel substitutes native references (integers) of each repository by globally unique proxy references.

• Inter-repository links are stored in the pivot repository.

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 27: The Orchestra of Multiple Model Repositories

Kernel Metamodel (the essence)

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

ProxyReferencedomesticReference:int64proxyReference:int64

Kernel

Repositoryurl:string

InterDirectedLink InterAttributeValuevalue:string

InterDirectedAssociationtargetRole:stringtargetCardinality:stringisComposition:Boolean

PackagesimpleName:stringnameInRepo:string

0..1 mounted Repository

1 mountPoint

1

pivot Repository

outgoingLinktarget Object

ingoingLink

source Object

0..1inverse

asso- cia- tion object

value

attributeinterSuperClass

interSubClass

outgoing Association

sourceClass1

ingoing Association

1 targetClass

0..1inverse

0..1parent

*child1rootPackage

1associated Repository

1 *

Page 28: The Orchestra of Multiple Model Repositories

RAAPI call example: createLink()

createLink(obj1_ref, obj2_ref, association_ref);

• If all proxy references point to the same repository, the call is forwarded to this repository.

• Otherwise, an inter-repository link is created and stored in the pivot repository.

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 29: The Orchestra of Multiple Model Repositories

Organizing repositories

• Unix file system directory tree:/boot/bin/mnt /mnt/c /mnt/d/media /media/cdrom/etc

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

mount points

Page 30: The Orchestra of Multiple Model Repositories

Organizing repositories

• Package tree (~ UML package tree):Package1Package2Package2::SubPackagePackage3Package4

• Use “MountPoint::ClassName” to access a class in a mounted repository

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

mount points

Page 31: The Orchestra of Multiple Model Repositories

Organizing repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

Sergejs Kozlovics
Page 32: The Orchestra of Multiple Model Repositories

Organizing repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

New repositorySubP

Sergejs Kozlovics
Page 33: The Orchestra of Multiple Model Repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Problem 3:Manipulating the packages

How to merge packages?

I.e., when working with class Package1::A, objects and properties of Package2::A are also taken into a consideration.

Sergejs Kozlovics
Page 34: The Orchestra of Multiple Model Repositories

Virtual repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

Virtual repositorySubP

Relies on data from somewhere else (or, invents data)

Sergejs Kozlovics
Page 35: The Orchestra of Multiple Model Repositories

Virtual repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

Virtual repositorySubP

Relies on data from somewhere else

Sergejs Kozlovics
Page 36: The Orchestra of Multiple Model Repositories

Virtual repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

Virtual repositorySubP

Relies on data from somewhere else

On-the-flymodeltransformation

Sergejs Kozlovics
Page 37: The Orchestra of Multiple Model Repositories

Use cases for virtual repositories

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Page 38: The Orchestra of Multiple Model Repositories

Views on metamodels

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

Virtual repositorySubP

View

Basemetamodel

Sergejs Kozlovics
Page 39: The Orchestra of Multiple Model Repositories

Volatile repository

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

Pivot

Rootpackage

P1 P2

Virtual repository(stores its content

In RAM)

SubP

Volatilerepository

Sergejs Kozlovics
Page 40: The Orchestra of Multiple Model Repositories

Virtual merge

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

P

Q

Sergejs Kozlovics
Page 41: The Orchestra of Multiple Model Repositories

Virtual merge

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

P

Virtual repositoryimplementing

“merge”

Q

P

Sergejs Kozlovics
Page 42: The Orchestra of Multiple Model Repositories

Derived (calculated) associations and properties

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

A B

Sergejs Kozlovics
Page 43: The Orchestra of Multiple Model Repositories

Derived (calculated) associations and properties

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

A B A B

Virtual repositorycomputes

the association

Sergejs Kozlovics
Page 44: The Orchestra of Multiple Model Repositories

Derived (calculated) associations and properties

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

A B A B

Virtual repositorycomputes

the association

Finally, we just need to virtually merge these two packages!

merge

Sergejs Kozlovics
Page 45: The Orchestra of Multiple Model Repositories

Virtual copy

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

P

Sergejs Kozlovics
Page 46: The Orchestra of Multiple Model Repositories

Virtual copy

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

P Virtualrepository

2

P’

P(old data)

Virtualrepository

1

Sergejs Kozlovics
Page 47: The Orchestra of Multiple Model Repositories

Virtual copy

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

P Virtualrepository

2

P’

P(old data)

Virtualrepository

1

Δ2Δ1

Sergejs Kozlovics
Page 48: The Orchestra of Multiple Model Repositories

Thank you!Děkuji!

002Research Laboratory of Modeling and Software TechnologiesInstitute of Mathematics and Computer Science, University of Latvia

The Orchestra ofMultiple Model Repositories

[email protected]