SlideShare una empresa de Scribd logo
1 de 43
Descargar para leer sin conexión
jeudi 23 février 2012
Hibernate OGM
                         JPA for Infinispan and NoSQL

                              Emmanuel Bernard
                            Data Platform Architect
                                              but actually doing things

                                    JBoss By Red Hat


                             Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Before you leave
                        • JPA for NoSQL
                          • first key / value (Infinispan)
                        • Denormalization engine
                        • Reuse mature projects
                        • Influenced by the relational model
                        • Does queries too (gradual ramp up)
                        • Early phases


                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Emmanuel Bernard
                        • Hibernate
                        • JCP
                        • Ceylon
                        • Podcasts
                          • asylum.jboss.org
                          • lescastcodeurs.com
                        • The rest is at http://emmanuelbernard.com
                        • @emmanuelbernard

                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
(No)SQL tour


                          Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Relational databases




                              Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Relational databases
                        • Data structure abstraction
                        • Transaction, referential integrity
                        • Common query language
                        • (Simple) type
                        • Proven usefulness
                          • tuning, backup, resilience




                                           Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Relational databases
                        • (Some) limitations:
                          • planning for scale is hard
                          • data model changes are painful
                        • New needs
                          • limitless data for later analysis
                          • instant fame syndrome
                          • less query demanding data


                                           Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
NoSQL is not new




                            Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
NoSQL is not new




                            Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
NoSQL is not new




                            Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
NoSQL alternatives
                        • Web “giants” needs
                        • Very different Goals
                          • data size / availability
                          • low latency / higher throughput
                        • Optimize some data access patterns




                                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
NoSQL families
                        • Graph oriented databases
                        • Key / value stores
                        • Document based stores                                                                     key                value

                        • BigTable-style                                                                            123           Address@23
                                                                                                                    126              “Booya”



                                     A foo       B   bar        C baz
                                                                                                                                 { "user" : {
                        1   Things
                                                                                                                                  "id": "124",
                        2   Things   C bam       E coh          People          A Emmanuel                                  "name": "Emmanuel",
                                                                                                                                "addresses" : [
                        3   Languages   A    C       B   Java     C Ceylon                                           { "city": "Paris", "country": "France" },
                                                                                                                     { "city": "Atlanta", "country": "USA" }
                                                                                                                                          ]
                                                            Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.                     }
jeudi 23 février 2012
Flexibility at a cost




                             Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Flexibility at a cost
                        • Programming model
                          • no common API :(
                          • query (Map Reduce, specific DSL, ...)
                          • no schema => app driven schema
                        • Physical data structure transpires
                        • Transaction / durability / consistency




                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
JPA for NoSQL



                           Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Demo


                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Goals
                        • Encourage new data usage patterns
                          • volume, types etc
                        • Familiar environment
                          • Full JPA support
                          • easy to jump in (and out!)
                        • Stop talking, act

                        • “PaaS on Java EE” initiative

                                          Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
What it does
                        • Today
                          • JPA front end for Infinispan and more
                          • CRUD support for @Entities
                          • Full-text queries
                        • Tomorrow
                          • JP-QL queries (simple ones)
                          • Other NoSQL
                        • The day after
                          • Complex JP-QL queries
                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Not a silver bullet!




                        • But JPA matches quite nicely

                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Domain model
                                               POJO


                                     persists     indexes / searches

                        JPA: programmatic API
                                                                    Hibernate
                         Hibernate Core
                                                                     Search




                                                               searches / indexes
                                                                    stored in




                                                                              distributed
                                                                    Innispan
                                                                            key/value store
                                                                     Innispan
                                                                        Innispan
                                                                         Innispan
                                                                          Innispan


                                                    Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Domain model
                                               POJO


                                     persists     indexes / searches

                        JPA: programmatic API
                                                                                                       enables
                                                                    Hibernate
                         Hibernate Core                                                             complex joins    Teiid
                                                                     Search                        and aggregation




                                                               searches / indexes
                                                                    stored in




                                                                              distributed
                                                                    Innispan
                                                                            key/value store
                                                                     Innispan
                                                                        Innispan
                                                                         Innispan
                                                                          Innispan


                                                    Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Domain model
                                               POJO


                                     persists     indexes / searches
                                                                                                   Search engine
                        JPA: programmatic API
                                                                                                       enables
                                                                    Hibernate
                         Hibernate Core                                                             complex joins    Teiid
                                                                     Search                        and aggregation




                                                               searches / indexes
                                                                    stored in




                                                                              distributed
                                                                    Innispan
                                                                            key/value store
                                                                     Innispan
                                                                        Innispan
                                                                         Innispan
                                                                          Innispan


                                                    Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Domain model
                                                 POJO


                                      persists        indexes / searches
                                                                                                       Search engine
                        JPA: programmatic API
                                                                                                           enables
                                                                        Hibernate
                         Hibernate Core                                                                 complex joins    Teiid
                                                                         Search                        and aggregation


                              delegates                 delegates
                            object logic to             search to


                          Hibernate OGM  JP-QL                     searches / indexes
                               Core     converter                       stored in




                                                 persists into



                                                                                  distributed
                                                                        Innispan
                                                                                key/value store
                                                                         Innispan
                                                                           Innispan
                                                                            Innispan
                                                                             Innispan


                                                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Domain model
                                                 POJO


                                      persists        indexes / searches
                                                                                                       Search engine
                        JPA: programmatic API
                                                                                                           enables
                                                                        Hibernate
                         Hibernate Core                                                                 complex joins           Teiid
                                                                         Search                        and aggregation


                              delegates                 delegates
                            object logic to             search to


                          Hibernate OGM  JP-QL                     searches / indexes
                               Core     converter                       stored in



                                                                                                                Object/Grid Mapper
                                                 persists into



                                                                                  distributed
                                                                        Innispan
                                                                                key/value store
                                                                         Innispan
                                                                           Innispan
                                                                            Innispan
                                                                             Innispan


                                                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Domain model
                                                 POJO

                                                                                                                          NoSQL
                                      persists        indexes / searches
                                                                                                       Search engine
                        JPA: programmatic API
                                                                                                           enables
                                                                        Hibernate
                         Hibernate Core                                                                 complex joins           Teiid
                                                                         Search                        and aggregation


                              delegates                 delegates
                            object logic to             search to


                          Hibernate OGM  JP-QL                     searches / indexes
                               Core     converter                       stored in



                                                                                                                Object/Grid Mapper
                                                 persists into



                                                                                  distributed
                                                                        Innispan
                                                                                key/value store
                                                                         Innispan
                                                                           Innispan
                                                                            Innispan
                                                                             Innispan


                                                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Concepts


                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Schema or no schema?
                        • Schema-less
                          • developer friendly
                          • data structure migration?
                          • need strict development guidelines
                        • Schema
                          • strong documentation
                          • share with other apps / tooling


                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Entities as serialized blobs?
                        • Store the whole graph?
                        • Consistency with duplicated objects
                        • Concurrency / latency

                        • Structure change and (de)serialization




                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
OGM’s approach
                        • Keep what’s best from relational model
                          • as much as possible
                        • Decorrelate object and data structure
                          • object model evolution
                        • Data stored as (self-described) tuples
                        • Limited set of core types
                        • CRUD operations are key lookups


                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Infinispan
                        • In-memory key / value store + cache store
                        • Data grid
                          • memory >> network >> local disk access
                        • Transactional
                          • JTA / XAResource
                        • Distributed
                          • virtual memory =
                            (sum of servers)/redundancy

                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Hibernate OGM’s
                         data structure

                            Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Storage - Entities
                        • Each entity in a unique key
                          • table name
                          • id column names and values
                        • Value is Map<String,Object>
                          • String: column name
                          • Object: simple type (serializable)




                                          Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Storage - Associations
                        • Cannot store exactly like relational DBs
                        • Simulate navigation to associations
                          • one key per navigation
                        • Value is the list of tuples
                        • Focus on speedy reads
                          • writes involve several key lookups




                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
User
                                                                                                    Address
                                        userId                n                            n     addressId
                                        name
                                                                                                 city
                                        addresses



                             tbl_user                    tbl_user_address                                   tbl_address
                                           1                                                    *      1
                            userId_pk              * userId_fk                                             addressId_pk
                            name                     addressId_fk                                          city




                                     key                                                               value

                             tbl_user,userId_pk,1                                {userId_pk=1,name=””Emmanuel””}

                             tbl_user,userId_pk,2                                {userId_pk=2,name=””Caroline””}

                          tbl_address,addressId_pk,3                             {addressId_pk=3,city=””Paris””}

                          tbl_address,addressId_pk,5                           {addressId_pk=5,city=””Atlanta””}

                                                                              { {userId_fk=1, addressId_fk=3},
                         tbl_user_address,userId_fk,1
                                                                                {userId_fk=1, addressId_fk=5} }

                         tbl_user_address,userId_fk,2                        { {userId_fk=2, addressId_fk=3} }

                        tbl_user_address,addressId_fk,5                      { {userId_fk=1, addressId_fk=5} }

                                                                              { {userId_fk=1, addressId_fk=3},
                        tbl_user_address,addressId_fk,3
                                                                                {userId_fk=2, addressId_fk=3} }

                                               Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
User
                                                                                                    Address
                                        userId                n                            n     addressId
                                        name
                                                                                                 city
                                        addresses



                             tbl_user                    tbl_user_address                                   tbl_address
                                           1                                                    *      1
                            userId_pk              * userId_fk                                             addressId_pk
                            name                     addressId_fk                                          city




                                     key                                                               value

                             tbl_user,userId_pk,1                                {userId_pk=1,name=””Emmanuel””}

                             tbl_user,userId_pk,2                                {userId_pk=2,name=””Caroline””}

                          tbl_address,addressId_pk,3                             {addressId_pk=3,city=””Paris””}

                          tbl_address,addressId_pk,5                           {addressId_pk=5,city=””Atlanta””}

                                                                              { {userId_fk=1, addressId_fk=3},
                         tbl_user_address,userId_fk,1
                                                                                {userId_fk=1, addressId_fk=5} }

                         tbl_user_address,userId_fk,2                        { {userId_fk=2, addressId_fk=3} }

                        tbl_user_address,addressId_fk,5                      { {userId_fk=1, addressId_fk=5} }

                                                                              { {userId_fk=1, addressId_fk=3},
                        tbl_user_address,addressId_fk,3
                                                                                {userId_fk=2, addressId_fk=3} }

                                               Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
User
                                                                                                    Address
                                        userId                n                            n     addressId
                                        name
                                                                                                 city
                                        addresses



                             tbl_user                    tbl_user_address                                   tbl_address
                                           1                                                    *      1
                            userId_pk              * userId_fk                                             addressId_pk
                            name                     addressId_fk                                          city




                                     key                                                               value

                             tbl_user,userId_pk,1                                {userId_pk=1,name=””Emmanuel””}

                             tbl_user,userId_pk,2                                {userId_pk=2,name=””Caroline””}

                          tbl_address,addressId_pk,3                             {addressId_pk=3,city=””Paris””}

                          tbl_address,addressId_pk,5                           {addressId_pk=5,city=””Atlanta””}

                                                                              { {userId_fk=1, addressId_fk=3},
                         tbl_user_address,userId_fk,1
                                                                                {userId_fk=1, addressId_fk=5} }

                         tbl_user_address,userId_fk,2                        { {userId_fk=2, addressId_fk=3} }

                        tbl_user_address,addressId_fk,5                      { {userId_fk=1, addressId_fk=5} }

                                                                              { {userId_fk=1, addressId_fk=3},
                        tbl_user_address,addressId_fk,3
                                                                                {userId_fk=2, addressId_fk=3} }

                                               Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Queries
                        • Hibernate Search indexes entities
                        • Store Lucene indexes in Infinispan
                        • JP-QL to Lucene query

                        • Works for simple-ish queries




                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
select a from Animal a where a.size > 20
                        > animalQueryBuilder
                          .range().onField(“size”).above(20).excludeLimit()
                          .createQuery();

                        select u from Order o join o.user u
                        where o.price > 100 and u.city = “Paris”
                        > orderQB.bool()
                          .must(
                            orderQB.range().onField(“price”)
                              .above(100).excludeLimit().createQuery() )
                          .must(
                            orderQB.keyword().onField(“user.city”)
                              .matching(“Paris”).createQuery() )
                          .createQuery();




                                          Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Future
                        • More NoSQL families
                        • More JP-QL support
                        • JP-QL to “primitives”
                        • API for operations in bulk
                        • More denormalization options
                        • Hybrid deployment options




                                         Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
Hibernate OGM
                        • JPA for NoSQL (Infinispan initially)
                        • Reuse mature projects
                        • Relational structure
                        • Does queries too

                        • Status
                          • work in progress
                          • refining the core data structure

                                          Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
More info
                        • Documentation
                         • http://ogm.hibernate.org
                           • including reference doc
                         • Any good JPA book ;)
                        • Code
                         • come and contribute! It’s fun stuff
                         • https://github.com/hibernate/hibernate-ogm
                        • Q&A

                                          Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012
References
                        • Pictures under creative commons
                        • http://www.flickr.com/photos/tomsaint/3415333390/
                        • http://www.flickr.com/photos/anniewong/26473161/
                        • http://www.flickr.com/photos/jdhancock/5002736203/
                        • http://www.flickr.com/photos/liutao/280498401
                        • http://www.flickr.com/photos/ehw/243631365/




                                        Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc.


jeudi 23 février 2012

Más contenido relacionado

Similar a Hibernate OGM - JPA for Infinispan and NoSQL

Size does not matter (if your data is in a silo)
Size does not matter (if your data is in a silo)Size does not matter (if your data is in a silo)
Size does not matter (if your data is in a silo)Ora Lassila
 
Objectivity/DB: A Multipurpose NoSQL Database
Objectivity/DB: A Multipurpose NoSQL DatabaseObjectivity/DB: A Multipurpose NoSQL Database
Objectivity/DB: A Multipurpose NoSQL DatabaseInfiniteGraph
 
Big Data - architectural concerns for the new age
Big Data - architectural concerns for the new ageBig Data - architectural concerns for the new age
Big Data - architectural concerns for the new ageDebasish Ghosh
 
MySQL Cluster no PayPal
MySQL Cluster no PayPalMySQL Cluster no PayPal
MySQL Cluster no PayPalMySQL Brasil
 
DCL LavaCon Presentation 2011
DCL LavaCon Presentation 2011DCL LavaCon Presentation 2011
DCL LavaCon Presentation 2011DCLab
 
Converting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePubConverting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePubDCLab
 
Converting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePubConverting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePubDCLab
 
NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?Martin Scholl
 
Optimizing and Accelerating your SharePoint Farm
Optimizing and Accelerating your SharePoint FarmOptimizing and Accelerating your SharePoint Farm
Optimizing and Accelerating your SharePoint FarmChris McNulty
 
A Global In-memory Data System for MySQL
A Global In-memory Data System for MySQLA Global In-memory Data System for MySQL
A Global In-memory Data System for MySQLDaniel Austin
 
Mobile Development Meets Semantic Technology
Mobile Development Meets Semantic TechnologyMobile Development Meets Semantic Technology
Mobile Development Meets Semantic TechnologyBlue Slate Solutions
 
Getting Started with MongoDB at Oracle Open World 2012
Getting Started with MongoDB at Oracle Open World 2012Getting Started with MongoDB at Oracle Open World 2012
Getting Started with MongoDB at Oracle Open World 2012MongoDB
 
Yes sql08 inmemorydb
Yes sql08 inmemorydbYes sql08 inmemorydb
Yes sql08 inmemorydbDaniel Austin
 
Agile analytics applications on hadoop
Agile analytics applications on hadoopAgile analytics applications on hadoop
Agile analytics applications on hadoopHortonworks
 
Hortonworks: Agile Analytics Applications
Hortonworks: Agile Analytics ApplicationsHortonworks: Agile Analytics Applications
Hortonworks: Agile Analytics Applicationsrussell_jurney
 
The Synergy Between the Object Database, Graph Database, Cloud Computing and ...
The Synergy Between the Object Database, Graph Database, Cloud Computing and ...The Synergy Between the Object Database, Graph Database, Cloud Computing and ...
The Synergy Between the Object Database, Graph Database, Cloud Computing and ...InfiniteGraph
 
Microsoft's Big Play for Big Data
Microsoft's Big Play for Big DataMicrosoft's Big Play for Big Data
Microsoft's Big Play for Big DataAndrew Brust
 
EDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE Project
EDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE ProjectEDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE Project
EDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE ProjectEuropean Data Forum
 
Mansoura University CSED & Nozom web development sprint
Mansoura University CSED & Nozom web development sprintMansoura University CSED & Nozom web development sprint
Mansoura University CSED & Nozom web development sprintAl Sayed Gamal
 
Data distribution in the cloud with Node.js
Data distribution in the cloud with Node.jsData distribution in the cloud with Node.js
Data distribution in the cloud with Node.jsdarach
 

Similar a Hibernate OGM - JPA for Infinispan and NoSQL (20)

Size does not matter (if your data is in a silo)
Size does not matter (if your data is in a silo)Size does not matter (if your data is in a silo)
Size does not matter (if your data is in a silo)
 
Objectivity/DB: A Multipurpose NoSQL Database
Objectivity/DB: A Multipurpose NoSQL DatabaseObjectivity/DB: A Multipurpose NoSQL Database
Objectivity/DB: A Multipurpose NoSQL Database
 
Big Data - architectural concerns for the new age
Big Data - architectural concerns for the new ageBig Data - architectural concerns for the new age
Big Data - architectural concerns for the new age
 
MySQL Cluster no PayPal
MySQL Cluster no PayPalMySQL Cluster no PayPal
MySQL Cluster no PayPal
 
DCL LavaCon Presentation 2011
DCL LavaCon Presentation 2011DCL LavaCon Presentation 2011
DCL LavaCon Presentation 2011
 
Converting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePubConverting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePub
 
Converting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePubConverting Unstructured Docs to XML/DITA/ePub
Converting Unstructured Docs to XML/DITA/ePub
 
NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?NoSQL – Back to the Future or Yet Another DB Feature?
NoSQL – Back to the Future or Yet Another DB Feature?
 
Optimizing and Accelerating your SharePoint Farm
Optimizing and Accelerating your SharePoint FarmOptimizing and Accelerating your SharePoint Farm
Optimizing and Accelerating your SharePoint Farm
 
A Global In-memory Data System for MySQL
A Global In-memory Data System for MySQLA Global In-memory Data System for MySQL
A Global In-memory Data System for MySQL
 
Mobile Development Meets Semantic Technology
Mobile Development Meets Semantic TechnologyMobile Development Meets Semantic Technology
Mobile Development Meets Semantic Technology
 
Getting Started with MongoDB at Oracle Open World 2012
Getting Started with MongoDB at Oracle Open World 2012Getting Started with MongoDB at Oracle Open World 2012
Getting Started with MongoDB at Oracle Open World 2012
 
Yes sql08 inmemorydb
Yes sql08 inmemorydbYes sql08 inmemorydb
Yes sql08 inmemorydb
 
Agile analytics applications on hadoop
Agile analytics applications on hadoopAgile analytics applications on hadoop
Agile analytics applications on hadoop
 
Hortonworks: Agile Analytics Applications
Hortonworks: Agile Analytics ApplicationsHortonworks: Agile Analytics Applications
Hortonworks: Agile Analytics Applications
 
The Synergy Between the Object Database, Graph Database, Cloud Computing and ...
The Synergy Between the Object Database, Graph Database, Cloud Computing and ...The Synergy Between the Object Database, Graph Database, Cloud Computing and ...
The Synergy Between the Object Database, Graph Database, Cloud Computing and ...
 
Microsoft's Big Play for Big Data
Microsoft's Big Play for Big DataMicrosoft's Big Play for Big Data
Microsoft's Big Play for Big Data
 
EDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE Project
EDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE ProjectEDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE Project
EDF2013: Selected Talk, Simon Riggs: Practical PostgreSQL and AXLE Project
 
Mansoura University CSED & Nozom web development sprint
Mansoura University CSED & Nozom web development sprintMansoura University CSED & Nozom web development sprint
Mansoura University CSED & Nozom web development sprint
 
Data distribution in the cloud with Node.js
Data distribution in the cloud with Node.jsData distribution in the cloud with Node.js
Data distribution in the cloud with Node.js
 

Más de JBUG London

London JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application ServerLondon JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application ServerJBUG London
 
WebSocketson WildFly
WebSocketson WildFly WebSocketson WildFly
WebSocketson WildFly JBUG London
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9JBUG London
 
Introduction to PicketLink
Introduction to PicketLinkIntroduction to PicketLink
Introduction to PicketLinkJBUG London
 
Extending WildFly
Extending WildFlyExtending WildFly
Extending WildFlyJBUG London
 
What's New in Infinispan 6.0
What's New in Infinispan 6.0What's New in Infinispan 6.0
What's New in Infinispan 6.0JBUG London
 
Compensating Transactions: When ACID is too much
Compensating Transactions: When ACID is too muchCompensating Transactions: When ACID is too much
Compensating Transactions: When ACID is too muchJBUG London
 
London JBUG - Connecting Applications Everywhere with JBoss A-MQ
London JBUG - Connecting Applications Everywhere with JBoss A-MQLondon JBUG - Connecting Applications Everywhere with JBoss A-MQ
London JBUG - Connecting Applications Everywhere with JBoss A-MQJBUG London
 
Easy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDEEasy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDEJBUG London
 
jBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM SystemsjBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM SystemsJBUG London
 
Arquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyArquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyJBUG London
 
Infinispan from POC to Production
Infinispan from POC to ProductionInfinispan from POC to Production
Infinispan from POC to ProductionJBUG London
 
JBoss jBPM, the future is now for all your Business Processes by Eric Schabell
JBoss jBPM, the future is now for all your Business Processes by Eric SchabellJBoss jBPM, the future is now for all your Business Processes by Eric Schabell
JBoss jBPM, the future is now for all your Business Processes by Eric SchabellJBUG London
 
JBoss AS7 by Matt Brasier
JBoss AS7 by Matt BrasierJBoss AS7 by Matt Brasier
JBoss AS7 by Matt BrasierJBUG London
 

Más de JBUG London (14)

London JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application ServerLondon JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
 
WebSocketson WildFly
WebSocketson WildFly WebSocketson WildFly
WebSocketson WildFly
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Introduction to PicketLink
Introduction to PicketLinkIntroduction to PicketLink
Introduction to PicketLink
 
Extending WildFly
Extending WildFlyExtending WildFly
Extending WildFly
 
What's New in Infinispan 6.0
What's New in Infinispan 6.0What's New in Infinispan 6.0
What's New in Infinispan 6.0
 
Compensating Transactions: When ACID is too much
Compensating Transactions: When ACID is too muchCompensating Transactions: When ACID is too much
Compensating Transactions: When ACID is too much
 
London JBUG - Connecting Applications Everywhere with JBoss A-MQ
London JBUG - Connecting Applications Everywhere with JBoss A-MQLondon JBUG - Connecting Applications Everywhere with JBoss A-MQ
London JBUG - Connecting Applications Everywhere with JBoss A-MQ
 
Easy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDEEasy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDE
 
jBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM SystemsjBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM Systems
 
Arquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyArquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made Easy
 
Infinispan from POC to Production
Infinispan from POC to ProductionInfinispan from POC to Production
Infinispan from POC to Production
 
JBoss jBPM, the future is now for all your Business Processes by Eric Schabell
JBoss jBPM, the future is now for all your Business Processes by Eric SchabellJBoss jBPM, the future is now for all your Business Processes by Eric Schabell
JBoss jBPM, the future is now for all your Business Processes by Eric Schabell
 
JBoss AS7 by Matt Brasier
JBoss AS7 by Matt BrasierJBoss AS7 by Matt Brasier
JBoss AS7 by Matt Brasier
 

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Hibernate OGM - JPA for Infinispan and NoSQL

  • 2. Hibernate OGM JPA for Infinispan and NoSQL Emmanuel Bernard Data Platform Architect but actually doing things JBoss By Red Hat Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 3. Before you leave • JPA for NoSQL • first key / value (Infinispan) • Denormalization engine • Reuse mature projects • Influenced by the relational model • Does queries too (gradual ramp up) • Early phases Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 4. Emmanuel Bernard • Hibernate • JCP • Ceylon • Podcasts • asylum.jboss.org • lescastcodeurs.com • The rest is at http://emmanuelbernard.com • @emmanuelbernard Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 5. (No)SQL tour Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 6. Relational databases Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 7. Relational databases • Data structure abstraction • Transaction, referential integrity • Common query language • (Simple) type • Proven usefulness • tuning, backup, resilience Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 8. Relational databases • (Some) limitations: • planning for scale is hard • data model changes are painful • New needs • limitless data for later analysis • instant fame syndrome • less query demanding data Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 9. NoSQL is not new Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 10. NoSQL is not new Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 11. NoSQL is not new Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 12. NoSQL alternatives • Web “giants” needs • Very different Goals • data size / availability • low latency / higher throughput • Optimize some data access patterns Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 13. NoSQL families • Graph oriented databases • Key / value stores • Document based stores key value • BigTable-style 123 Address@23 126 “Booya” A foo B bar C baz { "user" : { 1 Things "id": "124", 2 Things C bam E coh People A Emmanuel "name": "Emmanuel", "addresses" : [ 3 Languages A C B Java C Ceylon { "city": "Paris", "country": "France" }, { "city": "Atlanta", "country": "USA" } ] Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. } jeudi 23 février 2012
  • 14. Flexibility at a cost Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 15. Flexibility at a cost • Programming model • no common API :( • query (Map Reduce, specific DSL, ...) • no schema => app driven schema • Physical data structure transpires • Transaction / durability / consistency Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 16. JPA for NoSQL Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 17. Demo Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 18. Goals • Encourage new data usage patterns • volume, types etc • Familiar environment • Full JPA support • easy to jump in (and out!) • Stop talking, act • “PaaS on Java EE” initiative Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 19. What it does • Today • JPA front end for Infinispan and more • CRUD support for @Entities • Full-text queries • Tomorrow • JP-QL queries (simple ones) • Other NoSQL • The day after • Complex JP-QL queries Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 20. Not a silver bullet! • But JPA matches quite nicely Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 21. Domain model POJO persists indexes / searches JPA: programmatic API Hibernate Hibernate Core Search searches / indexes stored in distributed Innispan key/value store Innispan Innispan Innispan Innispan Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 22. Domain model POJO persists indexes / searches JPA: programmatic API enables Hibernate Hibernate Core complex joins Teiid Search and aggregation searches / indexes stored in distributed Innispan key/value store Innispan Innispan Innispan Innispan Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 23. Domain model POJO persists indexes / searches Search engine JPA: programmatic API enables Hibernate Hibernate Core complex joins Teiid Search and aggregation searches / indexes stored in distributed Innispan key/value store Innispan Innispan Innispan Innispan Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 24. Domain model POJO persists indexes / searches Search engine JPA: programmatic API enables Hibernate Hibernate Core complex joins Teiid Search and aggregation delegates delegates object logic to search to Hibernate OGM JP-QL searches / indexes Core converter stored in persists into distributed Innispan key/value store Innispan Innispan Innispan Innispan Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 25. Domain model POJO persists indexes / searches Search engine JPA: programmatic API enables Hibernate Hibernate Core complex joins Teiid Search and aggregation delegates delegates object logic to search to Hibernate OGM JP-QL searches / indexes Core converter stored in Object/Grid Mapper persists into distributed Innispan key/value store Innispan Innispan Innispan Innispan Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 26. Domain model POJO NoSQL persists indexes / searches Search engine JPA: programmatic API enables Hibernate Hibernate Core complex joins Teiid Search and aggregation delegates delegates object logic to search to Hibernate OGM JP-QL searches / indexes Core converter stored in Object/Grid Mapper persists into distributed Innispan key/value store Innispan Innispan Innispan Innispan Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 27. Concepts Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 28. Schema or no schema? • Schema-less • developer friendly • data structure migration? • need strict development guidelines • Schema • strong documentation • share with other apps / tooling Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 29. Entities as serialized blobs? • Store the whole graph? • Consistency with duplicated objects • Concurrency / latency • Structure change and (de)serialization Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 30. OGM’s approach • Keep what’s best from relational model • as much as possible • Decorrelate object and data structure • object model evolution • Data stored as (self-described) tuples • Limited set of core types • CRUD operations are key lookups Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 31. Infinispan • In-memory key / value store + cache store • Data grid • memory >> network >> local disk access • Transactional • JTA / XAResource • Distributed • virtual memory = (sum of servers)/redundancy Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 32. Hibernate OGM’s data structure Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 33. Storage - Entities • Each entity in a unique key • table name • id column names and values • Value is Map<String,Object> • String: column name • Object: simple type (serializable) Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 34. Storage - Associations • Cannot store exactly like relational DBs • Simulate navigation to associations • one key per navigation • Value is the list of tuples • Focus on speedy reads • writes involve several key lookups Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 35. User Address userId n n addressId name city addresses tbl_user tbl_user_address tbl_address 1 * 1 userId_pk * userId_fk addressId_pk name addressId_fk city key value tbl_user,userId_pk,1 {userId_pk=1,name=””Emmanuel””} tbl_user,userId_pk,2 {userId_pk=2,name=””Caroline””} tbl_address,addressId_pk,3 {addressId_pk=3,city=””Paris””} tbl_address,addressId_pk,5 {addressId_pk=5,city=””Atlanta””} { {userId_fk=1, addressId_fk=3}, tbl_user_address,userId_fk,1 {userId_fk=1, addressId_fk=5} } tbl_user_address,userId_fk,2 { {userId_fk=2, addressId_fk=3} } tbl_user_address,addressId_fk,5 { {userId_fk=1, addressId_fk=5} } { {userId_fk=1, addressId_fk=3}, tbl_user_address,addressId_fk,3 {userId_fk=2, addressId_fk=3} } Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 36. User Address userId n n addressId name city addresses tbl_user tbl_user_address tbl_address 1 * 1 userId_pk * userId_fk addressId_pk name addressId_fk city key value tbl_user,userId_pk,1 {userId_pk=1,name=””Emmanuel””} tbl_user,userId_pk,2 {userId_pk=2,name=””Caroline””} tbl_address,addressId_pk,3 {addressId_pk=3,city=””Paris””} tbl_address,addressId_pk,5 {addressId_pk=5,city=””Atlanta””} { {userId_fk=1, addressId_fk=3}, tbl_user_address,userId_fk,1 {userId_fk=1, addressId_fk=5} } tbl_user_address,userId_fk,2 { {userId_fk=2, addressId_fk=3} } tbl_user_address,addressId_fk,5 { {userId_fk=1, addressId_fk=5} } { {userId_fk=1, addressId_fk=3}, tbl_user_address,addressId_fk,3 {userId_fk=2, addressId_fk=3} } Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 37. User Address userId n n addressId name city addresses tbl_user tbl_user_address tbl_address 1 * 1 userId_pk * userId_fk addressId_pk name addressId_fk city key value tbl_user,userId_pk,1 {userId_pk=1,name=””Emmanuel””} tbl_user,userId_pk,2 {userId_pk=2,name=””Caroline””} tbl_address,addressId_pk,3 {addressId_pk=3,city=””Paris””} tbl_address,addressId_pk,5 {addressId_pk=5,city=””Atlanta””} { {userId_fk=1, addressId_fk=3}, tbl_user_address,userId_fk,1 {userId_fk=1, addressId_fk=5} } tbl_user_address,userId_fk,2 { {userId_fk=2, addressId_fk=3} } tbl_user_address,addressId_fk,5 { {userId_fk=1, addressId_fk=5} } { {userId_fk=1, addressId_fk=3}, tbl_user_address,addressId_fk,3 {userId_fk=2, addressId_fk=3} } Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 38. Queries • Hibernate Search indexes entities • Store Lucene indexes in Infinispan • JP-QL to Lucene query • Works for simple-ish queries Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 39. select a from Animal a where a.size > 20 > animalQueryBuilder .range().onField(“size”).above(20).excludeLimit() .createQuery(); select u from Order o join o.user u where o.price > 100 and u.city = “Paris” > orderQB.bool() .must( orderQB.range().onField(“price”) .above(100).excludeLimit().createQuery() ) .must( orderQB.keyword().onField(“user.city”) .matching(“Paris”).createQuery() ) .createQuery(); Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 40. Future • More NoSQL families • More JP-QL support • JP-QL to “primitives” • API for operations in bulk • More denormalization options • Hybrid deployment options Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 41. Hibernate OGM • JPA for NoSQL (Infinispan initially) • Reuse mature projects • Relational structure • Does queries too • Status • work in progress • refining the core data structure Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 42. More info • Documentation • http://ogm.hibernate.org • including reference doc • Any good JPA book ;) • Code • come and contribute! It’s fun stuff • https://github.com/hibernate/hibernate-ogm • Q&A Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012
  • 43. References • Pictures under creative commons • http://www.flickr.com/photos/tomsaint/3415333390/ • http://www.flickr.com/photos/anniewong/26473161/ • http://www.flickr.com/photos/jdhancock/5002736203/ • http://www.flickr.com/photos/liutao/280498401 • http://www.flickr.com/photos/ehw/243631365/ Copyright 2010-2012 Emmanuel Bernard and Red Hat Inc. jeudi 23 février 2012