exschema - icsm'13

17
ExSchema Discovering and Maintaining Schemas from Polyglot Persistence Applications Juan Castrejón, Genoveva Vargas-Solar, Christine Collet, Rafael Lozano Université de Grenoble, LIG-LAFMIA, CNRS, Grenoble INP, Tecnológico de Monterrey

Upload: jccastrejon

Post on 10-May-2015

258 views

Category:

Technology


0 download

DESCRIPTION

ICSM - Demo Presentation

TRANSCRIPT

Page 1: ExSchema - ICSM'13

ExSchemaDiscovering and Maintaining

Schemas from Polyglot Persistence Applications

Juan Castrejón, Genoveva Vargas-Solar, Christine Collet, Rafael LozanoUniversité de Grenoble, LIG-LAFMIA, CNRS, Grenoble INP, Tecnológico de Monterrey

Page 2: ExSchema - ICSM'13

2

ObjectiveDiscover external schemas from the

source code of polyglot persistence applications

Page 3: ExSchema - ICSM'13

3

ObjectiveDiscover external schemas from the

source code of polyglot persistence applications

High-level view of the data entitiesmanaged by a program

(Developer’s point of view)

Page 4: ExSchema - ICSM'13

4

ObjectiveDiscover external schemas from the

source code of polyglot persistence applications

Document DB

Column-Family DB

GraphDB

Source code

RelationalDB

Key-Value DB

Page 5: ExSchema - ICSM'13

5

Why?Polyglot persistence applications

are becoming widespread

Schema-less datastores

Non-standard APIs

Implicit schemas describedin the source code

But for their development and maintenance,software engineers have to deal with…

M. Fowler and P. Sadalage, NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence. Pearson Education, 2012.

Page 6: ExSchema - ICSM'13

6

https://github.com/neo4j-examples/imdb

Exampleimport org.neo4j.graphdb.Node;import org.neo4j.graphdb.Relationship;

class ActorImpl implements Actor { private static final String NAME_PROPERTY = "name”;

private final Node underlyingNode;

public void setName( final String name ) { underlyingNode.setProperty( NAME_PROPERTY, name ); }

public Role createRole( final Actor actor, final Movie movie, final String roleName ) final Node actorNode = ((ActorImpl) actor).getUnderlyingNode(); final Node movieNode = ((MovieImpl) movie).getUnderlyingNode(); final Relationship rel = actorNode.createRelationshipTo( movieNode, RelTypes.ACTS_IN );…}

Neo4j(Graph data store)

Declaration

Update

Page 7: ExSchema - ICSM'13

7

How?

Declarations Analyzer

Updates Analyzer

Repositories Analyzer

MetaLayer Representation

ExSchema

Neo4j API MongoDB API HBase API

JPA API Spring Data CouchDB API

Application source code

Annotations Analyzer

Analyze project structure and update operations

Page 8: ExSchema - ICSM'13

8

MetaLayer

Set

Struct

Attribute

Relationship

*

*

*

*

*

**

**

Based on: P. Atzeni, F. Bugiotti, and L. Rossi. Uniform access to non-relational database systems: the SOS platform. In CAiSE’12, volume 7328 of LNCS, pages 160–174. Springer, 2012.

Page 9: ExSchema - ICSM'13

9

MetaLayer

Page 10: ExSchema - ICSM'13

10

ResultsPDF file

Spring Roo scripts(JPA, MongoDB, Neo4j)

Page 11: ExSchema - ICSM'13

11

ResultsGit repository analysis for schema evolution

(Tags and Branches)

Page 12: ExSchema - ICSM'13

12

Demonstration• Detailed demonstration (12min)

• Brief demonstration (3min)

Page 13: ExSchema - ICSM'13

13

Neo4j: - https://github.com/neo4j-examples/cineasts.git - https://github.com/neo4j-examples/imdb.git - https://github.com/neo4j-examples/java-astar-routing.git - https://github.com/neo4j-examples/java-dijkstra.git - https://github.com/neo4j-examples/java-tree-traverse.git - MyNetContacts (http://vargas-solar.imag.fr/academika/cloud-data-management/)MongoDB: - https://github.com/mongolab/mongodb-driver-examples.gitHBase: - https://github.com/larsgeorge/hbase-book.git (ch03) - https://github.com/SpringSource/spring-hadoop-samples.git (original-samples/hbase-crud)CouchDB: - https://github.com/mbreese/couchdb4j.gitRelational: - Indvalid-core (http://www.indvalid.com/)Relational + MongoDB: - https://github.com/SpringSource/cloudfoundry-samples.git (cross-store) - MyNet (http://vargas-solar.imag.fr/academika/cloud-data-management/) - Indvalid-dao (http://www.indvalid.com/) Neo4j + MongoDB + Relational: - twitter-spring - twitter-polyglot(Based on: P. Atzeni, F. Bugiotti, and L. Rossi. Uniform access to non-relational database systems: the SOS platform. In CAiSE’12, volume 7328 of LNCS, pages 160–174. Springer, 2012)

Industrial application

Test applications

Page 14: ExSchema - ICSM'13

14

LimitationsBased on project structure and update operations

Based on programming styles of test applications

(Queries and get operations not considered)

(Heavily relies on local variables)

Limited associations between entities(Besides Neo4j’s relationships and MongoDB cross-store)

Page 15: ExSchema - ICSM'13

15

Future work

Analysis of queries and get operations

Support additional languages besides Java

Increase support for different programming styles

Page 16: ExSchema - ICSM'13

16

Implementation

Eclipse JDTEclipse AST

Spring Data

https://code.google.com/p/exschema/

Page 17: ExSchema - ICSM'13

17

Contact

[email protected]