SlideShare a Scribd company logo
The following is intended to outline our general product direction. It is
    intended for information purposes only, and may not be incorporated
    into any contract. It is not a commitment to deliver any material, code,
    or functionality, and should not be relied upon in making purchasing
    decisions. The development, release, and timing of any features or
    functionality described for Oracle’s products remains at the sole
    discretion of Oracle.




1   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
2   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
The Evolution of Java Persistence
Shaun Smith
shaun.smith@oracle.com
 3 @shaunMsmith
     Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Software Evolution
    • Computing architecture is constantly evolving:
      Mainframe, client/server, web/thin client, mobile/apps, ...
    • Current technologies with increasing adoption include:
          – Cloud computing
          – HTML 5
          – NoSQL databases
    • Java EE 7 is evolving to address many of these new
      requirements


4   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Evolutionary Pressures on Persistence
    • Shared Services & Consolidation
          – Multitenancy
    • Mobile Clients
          – JPA-RS
    • Scaling/Elastic Capacity
          – Data Partitioning
          – NoSQL/Big Data/Fast Data
          – Grid Caching



5   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
EclipseLink Project
    • Open Source Eclipse Project
          – Founded with contribution of Oracle TopLink to Eclipse
            Foundation
    • Object-Relational: Java Persistence API (JPA)
          – JPA 1.0 part of EJB 3.0 standard (JSR 220)
          – JPA 2.0 standardized in JSR 317
          – EclipseLink is JPA 2.0 & 2.1 Reference Implementation
    • Object-XML: Java Architecture for XML Binding (JAXB)
          – JAXB 2.2 Certified Implementation


6   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
MULTITENANCY



7   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Multitenancy
    Wikipedia http://en.wikipedia.org/wiki/Multitenancy
    • Multitenancy refers to a principle in software architecture
      where a single instance of the software runs on a server,
      serving multiple client organizations (tenants).
    • Multitenancy is contrasted with a multi-instance
      architecture where separate software instances (or
      hardware systems) are set up for different client
      organizations.


8   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Application Development and the Cloud
    • Past
          – Single Tenant or non-Tenant Applications
          – Dedicated application instance and database
    • Today..Tomorrow
          – Support multiple tenants
          – Support extensibility (custom fields per tenant)
          – Support various deployment architectures
                   • Dedicated or shared application instances
                   • Dedicated or shared databases



9   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Multitenant Topologies
                                                                                          Application

                                                                              Dedicated                 Shared
                                                                              T1    T2    T3            T1   T2   T3


                        Dedicated
Database




                                                                               1    2      3            1    2    3

                                                                               T1    T2    T3           T1   T2   T3


                              Shared
                                                                                     1                       1
                                                                                     2                       2
                                                                                     3                       3


           Note: Single application deployed to support various MT architectures

10     Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Multitenant Topologies
                                                                                          Application

                                                                              Dedicated                 Shared
                                                                              T1    T2    T3            T1   T2   T3


                        Dedicated
Database




                                                                               1    2      3            1    2    3

                                                                               T1    T2    T3           T1   T2   T3


                              Shared
                                                                                     1                       1
                                                                                     2                       2
                                                                                     3                       3


           Note: Single application deployed to support various MT architectures

11     Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
In the beginning…
     • Application dedicated for single tenant
     • All rows available to all queries

          @Entity
          public class Player {

           PLAYER
                             ID                                 VERSION         F_NAME   L_NAME   LEAGUE
                              1                                             1    John     Doe      HTHL
                              2                                             3    Jane     Doe      OSL




12   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Multitenant: SINGLE_TABLE
     • Simple configuration: Annotation or XML
     • Flexible tenant identifier support
     • EclipseLink augments generated SQL

           @Entity
           @Multitenant(SINGLE_TABLE)
           @TenantDiscriminatorColumn(name=“league-id”, columnName=“LEAGUE”)
           public class Player {
           PLAYER
                            ID                                  VERSION         F_NAME   L_NAME   LEAGUE
                              1                                             1    John     Doe      HTHL
                              2                                             3    Jane     Doe      OSL

13   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Multitenant: TENANT_PER_TABLE
     • Simple configuration: Annotation or XML
     • EclipseLink queries table based on tentant identifier
           @Entity
           @Multitenant(TABLE_PER_TENANT)
           public class Player {
                                                                            HTHL.PLAYER

                                                                                   ID     VERSION   F_NAME   L_NAME

                                                                                    1        1       John     Doe


                                                                            OSL.PLAYER

                                                                                   ID     VERSION   F_NAME   L_NAME

                                                                                    2        3       Jane     Doe




14   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
DEMO-MULTITENANCY



15   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
DOMAIN MODEL EXTENSIONS



16   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Domain Model Extensions
     • Storage and querying of extended properties
           –      Application developer enables extensions in entity
           –      Schema created with extension columns/table(s)
           –      Application Admin stores extension definitions
           –      Application instances made aware of extension definitions
           –      Application users make use of extensions


                                  Employee
                                         id                                 extensions            *   name
                                    firstName                                                         value
                                    lastName                                Map<String, Object>

17   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Flex Extensions
@VirtualAccessMethods
public class Player{
…
@Transient
private Map<String, Object> attributes;

public <T> T get(String attributeName) {
        return (T) this.attributes.get(attributeName);
}
public Object set(String attributeName, Object value) {
         return this.attributes.put(attributeName, value);
}

PLAYER
ID                             F_NAME                               L_NAME       FLEX_1   FLEX_2
1                              John                                 Doe          ‘R’      ’22’
2                              Jane                                 Smith        ‘NONE’

     18   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Virtual Access Mappings
<entity class="example.mysports.model.Player">
      <attributes>
                <basic name="penaltyMinutes" access="VIRTUAL"
                                            attribute-type="java.lang.Integer">
                            <column name="flex_1"/>
                </basic>
                <basic name="position" access="VIRTUAL"
                                attribute-type="java.lang.String">
                            <column name="flex_2"/>
                </basic>
      </attributes>
</entity>


 19   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
DEMO DOMAIN MODEL EXTENSIONS



20   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JPA-RS



21   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Project Avatar
     Complete Solution for Dynamic Rich Clients



HTML 5 browser

                                                                             JSON over
HTML & Java                                                                 WebSocket/
hybrid application                                                          Server Send
                                                                               Events


 Java application                                                                         Java EE Cloud

22   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JPA-RS: Building Block of Project Avatar
     • Exposes JPA mapped entities over REST via JAX-RS
     • Provides REST operations for persistence unit
                                                          REST              JPA
                                                          GET, HEAD         Find, Named Query, Meta-model
                                                          PUT, POST         Persist, Merge
                                                          DELETE            Remove

     • Content-Type and Accept-based content negotiation
           – XML or JSON
     • Client
           – HTML5 with JavaScript (primary focus)
           – JavaFX
23   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JPA/JAX-RS: Current Programming Model
                                                                                        GET http://…/order/4

                                                                                JAX-RS

                                                         Customer                Product            Order



                                                                            Shop Persistence Unit


                                                                                  JPA



24   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS with JPA Example – GET Invoice


     public class InvoiceService {...




         public Invoice read(int id) {
                              return null;
         }
     ...
25   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS with JPA Example – GET Invoice

     @Stateless
     public class InvoiceService {...




         public Invoice read(int id) {
                              return entityManager.find(Invoice.class, id);
         }
     ...
26   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS with JPA Example – GET Invoice
     @Path("/invoice")
     @Stateless
     public class InvoiceService {...




         public Invoice read(int id) {
                              return entityManager.find(Invoice.class, id);
         }
                                                       http://[machine]:[port]/[web-context]/invoice/...
     ...
27   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS with JPA Example – GET Invoice
     @Path("/invoice")
     @Stateless
     public class InvoiceService {...


         @GET
         @Path("{id}")
         public Invoice read(@PathParam("id") int id) {
                              return entityManager.find(Invoice.class, id);
         }
                                                       GET http://[machine]:[port]/[web-context]/invoice/4
     ...
28   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS with JPA Example – GET Invoice
     @Path("/invoice")
     @Stateless
     public class InvoiceService {...
         @GET
         @Path("{id}")
         @Produces({"application/xml", "application/json"})
         public Invoice read(@PathParam("id") int id) {
                              return entityManager.find(Invoice.class, id);
         }
                                                       Accept: application/json
     ...                                               GET http://[machine]:[port]/[web-context]/invoice/4
29   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JPA-RS: Thin Server Architecture
                                                                                   GET http://…/<pu-name>/<entity>/4

                                                                            JPA-RS

                                                    Shop PU                               … PU




                                                                             JPA



30   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JPA-RS: Building Block of Project Avatar
     • Persistence Unit Operations
           – /<root-uri>/<pu-name>/entity
           – /<root-uri>/<pu-name>/query
           – /<root-uri>/<pu-name>/metadata
     • Supports invocation of @NamedQueries via HTTP
     • Server-caching – EclipseLink clustered cache
     • Dynamic Persistence also supported
           – Entities defined via metadata – no Java classes required
           – Enables persistence for HTML5/JavaScript apps

31   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Client with Server Development

                                                                                                         Client
                                                                            HTML5
                                                                      JavaScript
                                                                            Native
                                dev
Client
Developer




                                                                                       Server                     Data
                                   dev
Server                                                                       Java EE            JPA-RS
Developer
                                 config

32   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
MySports – Java EE
     Clients
                                                                                                                     Data
                                                                                   Server
                                                                                   MySports


                                                        HTTP/S               JSF     EJB      JPA             JDBC




                                                                                                  ORACLE
                                                                                               CONFIDENTIA
33    Copyright © 2011, Oracle and/or its affiliates. All rights reserved.                     L - INTERNAL
                                                                                                    ONLY
MySports – JPA-RS Enabled
     Clients
                                                                                                                      Data
                                                                                    Server
                                                                                    MySports

                                                                             JSF
                                                        HTTP/S                        EJB      JPA             JDBC
                                                                             JPA-
                                                                              RS




                                                                                                   ORACLE
                                                                                                CONFIDENTIA
34    Copyright © 2011, Oracle and/or its affiliates. All rights reserved.                      L - INTERNAL
                                                                                                     ONLY
JAX-RS DEMO



35   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
NOSQL PERSISTENCE



41   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
NoSQL Databases
     • NoSQL (i.e., non-relational) database are increasingly
       popular
     • No standards
     • Differing APIs and feature sets
     • Some offer query language/API—some not




42   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
EclipseLink NoSQL
     • Support JPA access to NoSQL databases
           – Leverage non-relational database support for JCA (and JDBC
             when available)
     • Define annotations and XML to identify NoSQL stored
       entities (e.g., @NoSQL)
     • Support JPQL subset for each
           – Key principal: leverage what’s available
     • Initial support for MongoDB and Oracle NoSQL.
     • Support mixing relational and non-relational data in
       single composite persistence unit (“polyglot persistence”)
43   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example MongoDB Mapped Entity




44   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
MongoDB Query Examples
     JPQL Queries:
         Select o from Order o where o.totalCost > 1000
         Select o from Order o where o.description like 'Pinball%‘
         Select o from Order o join o.orderLines l where l.cost > :cost
     Native Queries:
         query = em.createNativeQuery("db.ORDER.findOne({"_id":"" + oid + ""})",
           Order.class);
         Order order = (Order)query.getSingleResult();




45   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Polyglot Persistence
     • Relationships can span databases—and technologies!




                                                                        Order   Discount




46   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
NOSQL DEMO



47   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Summary
     • Java is evolving—and EclipseLink is evolving too!
           –      Tenant Isolation/Multitenancy
           –      JSON Binding
           –      JPA-RS
           –      NoSQL
           –      Polyglot Persistence
     • EclipseLink is the center of innovation in Java
       persistence



48   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Q&A




                              Provide Feedback, Get Involved!
                              User forums and lists at http://eclipse.org/eclipselink

49   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
50   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

More Related Content

Viewers also liked

Understanding Java Garbage Collection and What You Can Do About It: Gil Tene
Understanding Java Garbage Collection and What You Can Do About It: Gil TeneUnderstanding Java Garbage Collection and What You Can Do About It: Gil Tene
Understanding Java Garbage Collection and What You Can Do About It: Gil Tene
jaxconf
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
jaxconf
 
What you need to know about Lambdas - Jamie Allen
What you need to know about Lambdas - Jamie AllenWhat you need to know about Lambdas - Jamie Allen
What you need to know about Lambdas - Jamie Allen
jaxconf
 
Future of the Web - Yehuda Katz
Future of the Web - Yehuda KatzFuture of the Web - Yehuda Katz
Future of the Web - Yehuda Katz
jaxconf
 
The Spring 4 Update - Josh Long
The Spring 4 Update - Josh LongThe Spring 4 Update - Josh Long
The Spring 4 Update - Josh Long
jaxconf
 
Getting started with Websocket and Server-sent Events using Java - Arun Gupta
Getting started with Websocket and Server-sent Events using Java - Arun Gupta Getting started with Websocket and Server-sent Events using Java - Arun Gupta
Getting started with Websocket and Server-sent Events using Java - Arun Gupta
jaxconf
 
The New Reality: the Role of PaaS in Technology Innovation - Franklin Herbas
The New Reality: the Role of PaaS in Technology Innovation - Franklin HerbasThe New Reality: the Role of PaaS in Technology Innovation - Franklin Herbas
The New Reality: the Role of PaaS in Technology Innovation - Franklin Herbas
jaxconf
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
jaxconf
 
Building an Impenetrable ZooKeeper - Kathleen Ting
Building an Impenetrable ZooKeeper - Kathleen TingBuilding an Impenetrable ZooKeeper - Kathleen Ting
Building an Impenetrable ZooKeeper - Kathleen Ting
jaxconf
 
Java PaaS Comparisons - Khanderao Kand
Java PaaS Comparisons - Khanderao KandJava PaaS Comparisons - Khanderao Kand
Java PaaS Comparisons - Khanderao Kand
jaxconf
 
Apache Hadoop and its role in Big Data architecture - Himanshu Bari
Apache Hadoop and its role in Big Data architecture - Himanshu BariApache Hadoop and its role in Big Data architecture - Himanshu Bari
Apache Hadoop and its role in Big Data architecture - Himanshu Bari
jaxconf
 

Viewers also liked (11)

Understanding Java Garbage Collection and What You Can Do About It: Gil Tene
Understanding Java Garbage Collection and What You Can Do About It: Gil TeneUnderstanding Java Garbage Collection and What You Can Do About It: Gil Tene
Understanding Java Garbage Collection and What You Can Do About It: Gil Tene
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 
What you need to know about Lambdas - Jamie Allen
What you need to know about Lambdas - Jamie AllenWhat you need to know about Lambdas - Jamie Allen
What you need to know about Lambdas - Jamie Allen
 
Future of the Web - Yehuda Katz
Future of the Web - Yehuda KatzFuture of the Web - Yehuda Katz
Future of the Web - Yehuda Katz
 
The Spring 4 Update - Josh Long
The Spring 4 Update - Josh LongThe Spring 4 Update - Josh Long
The Spring 4 Update - Josh Long
 
Getting started with Websocket and Server-sent Events using Java - Arun Gupta
Getting started with Websocket and Server-sent Events using Java - Arun Gupta Getting started with Websocket and Server-sent Events using Java - Arun Gupta
Getting started with Websocket and Server-sent Events using Java - Arun Gupta
 
The New Reality: the Role of PaaS in Technology Innovation - Franklin Herbas
The New Reality: the Role of PaaS in Technology Innovation - Franklin HerbasThe New Reality: the Role of PaaS in Technology Innovation - Franklin Herbas
The New Reality: the Role of PaaS in Technology Innovation - Franklin Herbas
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
 
Building an Impenetrable ZooKeeper - Kathleen Ting
Building an Impenetrable ZooKeeper - Kathleen TingBuilding an Impenetrable ZooKeeper - Kathleen Ting
Building an Impenetrable ZooKeeper - Kathleen Ting
 
Java PaaS Comparisons - Khanderao Kand
Java PaaS Comparisons - Khanderao KandJava PaaS Comparisons - Khanderao Kand
Java PaaS Comparisons - Khanderao Kand
 
Apache Hadoop and its role in Big Data architecture - Himanshu Bari
Apache Hadoop and its role in Big Data architecture - Himanshu BariApache Hadoop and its role in Big Data architecture - Himanshu Bari
Apache Hadoop and its role in Big Data architecture - Himanshu Bari
 

Similar to The Evolution of Java Persistence in EclipseLink: Shaun Smith

CloverETL Training Sample
CloverETL Training SampleCloverETL Training Sample
CloverETL Training Sample
CloverDX (formerly known as CloverETL)
 
Becoming a Node.js Ninja on Cloud Foundry - Open Tour London
Becoming a Node.js Ninja on Cloud Foundry - Open Tour LondonBecoming a Node.js Ninja on Cloud Foundry - Open Tour London
Becoming a Node.js Ninja on Cloud Foundry - Open Tour London
Andy Piper
 
Architecture & Pitfalls of Logical Replication
Architecture & Pitfalls of Logical ReplicationArchitecture & Pitfalls of Logical Replication
Architecture & Pitfalls of Logical Replication
Atsushi Torikoshi
 
LinuxCon Japan 2011 OSS IaaS BoF
LinuxCon Japan 2011 OSS IaaS BoFLinuxCon Japan 2011 OSS IaaS BoF
LinuxCon Japan 2011 OSS IaaS BoF
Masanori Itoh
 
Real World Business Intelligence and Data Warehousing
Real World Business Intelligence and Data WarehousingReal World Business Intelligence and Data Warehousing
Real World Business Intelligence and Data Warehousing
ukc4
 
GlusterFS モジュール超概論
GlusterFS モジュール超概論GlusterFS モジュール超概論
GlusterFS モジュール超概論
Keisuke Takahashi
 
Smalltalk in Enterprise Applications
Smalltalk in Enterprise ApplicationsSmalltalk in Enterprise Applications
Smalltalk in Enterprise Applications
ESUG
 
Staying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debugStaying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debug
marckhouzam
 
Taking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude SupportTaking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude Support
XMetaL
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Samuel Dratwa
 
Becoming Node.js ninja on Cloud Foundry
Becoming Node.js ninja on Cloud FoundryBecoming Node.js ninja on Cloud Foundry
Becoming Node.js ninja on Cloud Foundry
Raja Rao DV
 
"erlang, webmail and hibari" at Rakuten tech talk
"erlang, webmail and hibari" at Rakuten tech talk"erlang, webmail and hibari" at Rakuten tech talk
"erlang, webmail and hibari" at Rakuten tech talk
CLOUDIAN KK
 
Munching & crunching - Lucene index post-processing
Munching & crunching - Lucene index post-processingMunching & crunching - Lucene index post-processing
Munching & crunching - Lucene index post-processing
abial
 
1. gen1 evolution and architecture of t24-r10.01
1. gen1 evolution and architecture of t24-r10.011. gen1 evolution and architecture of t24-r10.01
1. gen1 evolution and architecture of t24-r10.01
Emmanuel Boadu
 
Erlang os
Erlang osErlang os
Erlang os
Pinche12345
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Bình Trọng Án
 
Intro2 nodejs 2pm
Intro2 nodejs 2pmIntro2 nodejs 2pm
Intro2 nodejs 2pm
Raja Rao DV
 
VoltDB : A Technical Overview
VoltDB : A Technical OverviewVoltDB : A Technical Overview
VoltDB : A Technical Overview
Tim Callaghan
 
Long and winding road - 2014
Long and winding road  - 2014Long and winding road  - 2014
Long and winding road - 2014
Connor McDonald
 
Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL Cluster
Abel Flórez
 

Similar to The Evolution of Java Persistence in EclipseLink: Shaun Smith (20)

CloverETL Training Sample
CloverETL Training SampleCloverETL Training Sample
CloverETL Training Sample
 
Becoming a Node.js Ninja on Cloud Foundry - Open Tour London
Becoming a Node.js Ninja on Cloud Foundry - Open Tour LondonBecoming a Node.js Ninja on Cloud Foundry - Open Tour London
Becoming a Node.js Ninja on Cloud Foundry - Open Tour London
 
Architecture & Pitfalls of Logical Replication
Architecture & Pitfalls of Logical ReplicationArchitecture & Pitfalls of Logical Replication
Architecture & Pitfalls of Logical Replication
 
LinuxCon Japan 2011 OSS IaaS BoF
LinuxCon Japan 2011 OSS IaaS BoFLinuxCon Japan 2011 OSS IaaS BoF
LinuxCon Japan 2011 OSS IaaS BoF
 
Real World Business Intelligence and Data Warehousing
Real World Business Intelligence and Data WarehousingReal World Business Intelligence and Data Warehousing
Real World Business Intelligence and Data Warehousing
 
GlusterFS モジュール超概論
GlusterFS モジュール超概論GlusterFS モジュール超概論
GlusterFS モジュール超概論
 
Smalltalk in Enterprise Applications
Smalltalk in Enterprise ApplicationsSmalltalk in Enterprise Applications
Smalltalk in Enterprise Applications
 
Staying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debugStaying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debug
 
Taking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude SupportTaking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude Support
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Becoming Node.js ninja on Cloud Foundry
Becoming Node.js ninja on Cloud FoundryBecoming Node.js ninja on Cloud Foundry
Becoming Node.js ninja on Cloud Foundry
 
"erlang, webmail and hibari" at Rakuten tech talk
"erlang, webmail and hibari" at Rakuten tech talk"erlang, webmail and hibari" at Rakuten tech talk
"erlang, webmail and hibari" at Rakuten tech talk
 
Munching & crunching - Lucene index post-processing
Munching & crunching - Lucene index post-processingMunching & crunching - Lucene index post-processing
Munching & crunching - Lucene index post-processing
 
1. gen1 evolution and architecture of t24-r10.01
1. gen1 evolution and architecture of t24-r10.011. gen1 evolution and architecture of t24-r10.01
1. gen1 evolution and architecture of t24-r10.01
 
Erlang os
Erlang osErlang os
Erlang os
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Intro2 nodejs 2pm
Intro2 nodejs 2pmIntro2 nodejs 2pm
Intro2 nodejs 2pm
 
VoltDB : A Technical Overview
VoltDB : A Technical OverviewVoltDB : A Technical Overview
VoltDB : A Technical Overview
 
Long and winding road - 2014
Long and winding road  - 2014Long and winding road  - 2014
Long and winding road - 2014
 
Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL Cluster
 

Recently uploaded

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

The Evolution of Java Persistence in EclipseLink: Shaun Smith

  • 1. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 2. 2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 3. The Evolution of Java Persistence Shaun Smith shaun.smith@oracle.com 3 @shaunMsmith Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 4. Software Evolution • Computing architecture is constantly evolving: Mainframe, client/server, web/thin client, mobile/apps, ... • Current technologies with increasing adoption include: – Cloud computing – HTML 5 – NoSQL databases • Java EE 7 is evolving to address many of these new requirements 4 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 5. Evolutionary Pressures on Persistence • Shared Services & Consolidation – Multitenancy • Mobile Clients – JPA-RS • Scaling/Elastic Capacity – Data Partitioning – NoSQL/Big Data/Fast Data – Grid Caching 5 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 6. EclipseLink Project • Open Source Eclipse Project – Founded with contribution of Oracle TopLink to Eclipse Foundation • Object-Relational: Java Persistence API (JPA) – JPA 1.0 part of EJB 3.0 standard (JSR 220) – JPA 2.0 standardized in JSR 317 – EclipseLink is JPA 2.0 & 2.1 Reference Implementation • Object-XML: Java Architecture for XML Binding (JAXB) – JAXB 2.2 Certified Implementation 6 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 7. MULTITENANCY 7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 8. Multitenancy Wikipedia http://en.wikipedia.org/wiki/Multitenancy • Multitenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple client organizations (tenants). • Multitenancy is contrasted with a multi-instance architecture where separate software instances (or hardware systems) are set up for different client organizations. 8 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 9. Application Development and the Cloud • Past – Single Tenant or non-Tenant Applications – Dedicated application instance and database • Today..Tomorrow – Support multiple tenants – Support extensibility (custom fields per tenant) – Support various deployment architectures • Dedicated or shared application instances • Dedicated or shared databases 9 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 10. Multitenant Topologies Application Dedicated Shared T1 T2 T3 T1 T2 T3 Dedicated Database 1 2 3 1 2 3 T1 T2 T3 T1 T2 T3 Shared 1 1 2 2 3 3 Note: Single application deployed to support various MT architectures 10 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 11. Multitenant Topologies Application Dedicated Shared T1 T2 T3 T1 T2 T3 Dedicated Database 1 2 3 1 2 3 T1 T2 T3 T1 T2 T3 Shared 1 1 2 2 3 3 Note: Single application deployed to support various MT architectures 11 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 12. In the beginning… • Application dedicated for single tenant • All rows available to all queries @Entity public class Player { PLAYER ID VERSION F_NAME L_NAME LEAGUE 1 1 John Doe HTHL 2 3 Jane Doe OSL 12 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 13. Multitenant: SINGLE_TABLE • Simple configuration: Annotation or XML • Flexible tenant identifier support • EclipseLink augments generated SQL @Entity @Multitenant(SINGLE_TABLE) @TenantDiscriminatorColumn(name=“league-id”, columnName=“LEAGUE”) public class Player { PLAYER ID VERSION F_NAME L_NAME LEAGUE 1 1 John Doe HTHL 2 3 Jane Doe OSL 13 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 14. Multitenant: TENANT_PER_TABLE • Simple configuration: Annotation or XML • EclipseLink queries table based on tentant identifier @Entity @Multitenant(TABLE_PER_TENANT) public class Player { HTHL.PLAYER ID VERSION F_NAME L_NAME 1 1 John Doe OSL.PLAYER ID VERSION F_NAME L_NAME 2 3 Jane Doe 14 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 15. DEMO-MULTITENANCY 15 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 16. DOMAIN MODEL EXTENSIONS 16 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 17. Domain Model Extensions • Storage and querying of extended properties – Application developer enables extensions in entity – Schema created with extension columns/table(s) – Application Admin stores extension definitions – Application instances made aware of extension definitions – Application users make use of extensions Employee id extensions * name firstName value lastName Map<String, Object> 17 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 18. Flex Extensions @VirtualAccessMethods public class Player{ … @Transient private Map<String, Object> attributes; public <T> T get(String attributeName) { return (T) this.attributes.get(attributeName); } public Object set(String attributeName, Object value) { return this.attributes.put(attributeName, value); } PLAYER ID F_NAME L_NAME FLEX_1 FLEX_2 1 John Doe ‘R’ ’22’ 2 Jane Smith ‘NONE’ 18 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 19. Virtual Access Mappings <entity class="example.mysports.model.Player"> <attributes> <basic name="penaltyMinutes" access="VIRTUAL" attribute-type="java.lang.Integer"> <column name="flex_1"/> </basic> <basic name="position" access="VIRTUAL" attribute-type="java.lang.String"> <column name="flex_2"/> </basic> </attributes> </entity> 19 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 20. DEMO DOMAIN MODEL EXTENSIONS 20 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 21. JPA-RS 21 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 22. Project Avatar Complete Solution for Dynamic Rich Clients HTML 5 browser JSON over HTML & Java WebSocket/ hybrid application Server Send Events Java application Java EE Cloud 22 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 23. JPA-RS: Building Block of Project Avatar • Exposes JPA mapped entities over REST via JAX-RS • Provides REST operations for persistence unit REST JPA GET, HEAD Find, Named Query, Meta-model PUT, POST Persist, Merge DELETE Remove • Content-Type and Accept-based content negotiation – XML or JSON • Client – HTML5 with JavaScript (primary focus) – JavaFX 23 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 24. JPA/JAX-RS: Current Programming Model GET http://…/order/4 JAX-RS Customer Product Order Shop Persistence Unit JPA 24 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 25. JAX-RS with JPA Example – GET Invoice public class InvoiceService {... public Invoice read(int id) { return null; } ... 25 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 26. JAX-RS with JPA Example – GET Invoice @Stateless public class InvoiceService {... public Invoice read(int id) { return entityManager.find(Invoice.class, id); } ... 26 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 27. JAX-RS with JPA Example – GET Invoice @Path("/invoice") @Stateless public class InvoiceService {... public Invoice read(int id) { return entityManager.find(Invoice.class, id); } http://[machine]:[port]/[web-context]/invoice/... ... 27 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 28. JAX-RS with JPA Example – GET Invoice @Path("/invoice") @Stateless public class InvoiceService {... @GET @Path("{id}") public Invoice read(@PathParam("id") int id) { return entityManager.find(Invoice.class, id); } GET http://[machine]:[port]/[web-context]/invoice/4 ... 28 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 29. JAX-RS with JPA Example – GET Invoice @Path("/invoice") @Stateless public class InvoiceService {... @GET @Path("{id}") @Produces({"application/xml", "application/json"}) public Invoice read(@PathParam("id") int id) { return entityManager.find(Invoice.class, id); } Accept: application/json ... GET http://[machine]:[port]/[web-context]/invoice/4 29 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 30. JPA-RS: Thin Server Architecture GET http://…/<pu-name>/<entity>/4 JPA-RS Shop PU … PU JPA 30 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 31. JPA-RS: Building Block of Project Avatar • Persistence Unit Operations – /<root-uri>/<pu-name>/entity – /<root-uri>/<pu-name>/query – /<root-uri>/<pu-name>/metadata • Supports invocation of @NamedQueries via HTTP • Server-caching – EclipseLink clustered cache • Dynamic Persistence also supported – Entities defined via metadata – no Java classes required – Enables persistence for HTML5/JavaScript apps 31 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 32. Client with Server Development Client HTML5 JavaScript Native dev Client Developer Server Data dev Server Java EE JPA-RS Developer config 32 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 33. MySports – Java EE Clients Data Server MySports HTTP/S JSF EJB JPA JDBC ORACLE CONFIDENTIA 33 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. L - INTERNAL ONLY
  • 34. MySports – JPA-RS Enabled Clients Data Server MySports JSF HTTP/S EJB JPA JDBC JPA- RS ORACLE CONFIDENTIA 34 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. L - INTERNAL ONLY
  • 35. JAX-RS DEMO 35 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 36. NOSQL PERSISTENCE 41 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 37. NoSQL Databases • NoSQL (i.e., non-relational) database are increasingly popular • No standards • Differing APIs and feature sets • Some offer query language/API—some not 42 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 38. EclipseLink NoSQL • Support JPA access to NoSQL databases – Leverage non-relational database support for JCA (and JDBC when available) • Define annotations and XML to identify NoSQL stored entities (e.g., @NoSQL) • Support JPQL subset for each – Key principal: leverage what’s available • Initial support for MongoDB and Oracle NoSQL. • Support mixing relational and non-relational data in single composite persistence unit (“polyglot persistence”) 43 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 39. Example MongoDB Mapped Entity 44 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 40. MongoDB Query Examples JPQL Queries: Select o from Order o where o.totalCost > 1000 Select o from Order o where o.description like 'Pinball%‘ Select o from Order o join o.orderLines l where l.cost > :cost Native Queries: query = em.createNativeQuery("db.ORDER.findOne({"_id":"" + oid + ""})", Order.class); Order order = (Order)query.getSingleResult(); 45 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 41. Polyglot Persistence • Relationships can span databases—and technologies! Order Discount 46 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 42. NOSQL DEMO 47 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 43. Summary • Java is evolving—and EclipseLink is evolving too! – Tenant Isolation/Multitenancy – JSON Binding – JPA-RS – NoSQL – Polyglot Persistence • EclipseLink is the center of innovation in Java persistence 48 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 44. Q&A Provide Feedback, Get Involved! User forums and lists at http://eclipse.org/eclipselink 49 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 45. 50 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.