Using NoSQL with ~JPA, EclipseLink and Java EE
Upcoming SlideShare
Loading in...5
×
 

Using NoSQL with ~JPA, EclipseLink and Java EE

on

  • 26,585 views

This session explores how NoSQL solutions like MongoDB, Cassandra, Neo4j, HBase and CouchDB can be used in a Java EE application with or without a JPA centric facade. Although the primary focus is on ...

This session explores how NoSQL solutions like MongoDB, Cassandra, Neo4j, HBase and CouchDB can be used in a Java EE application with or without a JPA centric facade. Although the primary focus is on EclipseLink NoSQL, we will also cover Hibernate OGM, EasyCassandra, Morphia, etc as well as seeing how NoSQL can be used natively via basic CDI injection.

Statistics

Views

Total Views
26,585
Views on SlideShare
15,896
Embed Views
10,689

Actions

Likes
22
Downloads
202
Comments
0

70 Embeds 10,689

https://blogs.oracle.com 6848
http://java.dzone.com 2180
http://orablogs-jp.blogspot.jp 466
http://jeeconf.com 302
http://www.codedata.com.tw 180
http://javareltech.blogspot.hu 136
http://cloud.feedly.com 100
https://twitter.com 74
http://feedly.com 71
http://eclipse.dzone.com 48
http://lopestech.blogspot.pt 44
http://www.feedspot.com 21
http://blogs.oracle.com 20
http://digg.com 18
http://javareltech.blogspot.com 17
https://feedly.com 10
https://www.inoreader.com 10
http://www.newsblur.com 9
http://bloggers1033.rssing.com 8
http://www-ig-opensocial.googleusercontent.com 8
http://www.dzone.com 7
http://127.0.0.1 7
http://feedreader.com 6
http://news.google.com 5
http://www.inoreader.com 5
http://prsync.com 5
https://inoreader.com 5
http://www.hanrss.com 5
http://extradiocesan12.mlmlliao.com 5
http://open.dapper.net 4
http://newsblur.com 4
http://www.tuicool.com 3
http://rritw.com 3
http://rss.neurozone.fr 3
http://www.mybestcv.co.il 3
http://orablogs-jp.blogspot.com 3
http://plus.url.google.com 3
http://flavors.me 2
http://javareltech.blogspot.com.br 2
http://feeds.feedburner.com 2
http://cerebri3.rssing.com 2
http://inoreader.com 2
https://trovepromo-tf.trove-stg.com 2
http://cuckoo9.okoza.com 2
http://lopestech.blogspot.co.uk 2
http://orablogs-jp.blogspot.co.uk 2
http://reader.aol.com 2
http://javareltech.blogspot.de 1
http://javareltech.blogspot.jp 1
http://orablogs-jp.blogspot.ru 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Using NoSQL with ~JPA, EclipseLink and Java EE Using NoSQL with ~JPA, EclipseLink and Java EE Presentation Transcript

  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public1 Using NoSQL with ~JPA, EclipseLink and Java EE Reza Rahman Java EE/GlassFish Evangelist Reza.Rahman@Oracle.com @reza_rahman
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public2Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public Agenda  NoSQL Landscape  Using NoSQL with ~JPA  Using NoSQL with CDI
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public3 NoSQL Landscape  Defined by non-conformance to established RDMS paradigm – No SQL/queries, schemaless, weak referential integrity, no JOINs  Scalability and cost major motivators (ACID vs. BASE) – No transactions, eventual consistency, distributed nodes – In the end, may complement and not replace relational databases…  Extremely divergent, specialized products  Some taxonomies – Key/value, document, graph, columnar, etc  MongoDB, Cassandra, Google BigTable, CouchDB, HBase, Redis, Neo4j, Oracle NoSQL Wild, Wild West
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public4 NoSQL Landscape Adoption and Trends
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public5 The Case for JPA  There often is a domain model  Some parts of JPA fit NoSQL quite well*  Learning each diverging NoSQL product cumbersome, often unnecessary  Switching between NoSQL solutions difficult, particularly at various stages of application development  “Polyglot Persistence” difficult  NoSQL APIs generally low level, verbose
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public6 Applying JPA to NoSQL  JPA domain model concepts apply well to NoSQL – Entities, Embeddables, ElementCollection, OneToOne, OneToMany, ManyToOne, Version  Pure relational concepts may not apply well – CollectionTable, Column, SecondaryTable, SequenceGenerator, TableGenerator  JPA queries can fit relatively well – Basic finders (by identity, all) – JPQL—portable query language defined by the spec – Native query—lets you leverage database specific features
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public7 EclipseLink NoSQL  Support JPA style access to NoSQL databases – Leverage non-relational database support for JCA  Metadata to identify NoSQL entities (e.g., @NoSQL)  Support JPQL subset for each – Leverage what’s available  Initial support for MongoDB and Oracle NoSQL – More to come (Cassandra, HBase, CouchDB?)  Support mixing relational and non-relational data in single composite persistence unit (“polyglot persistence”)
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public8 JPA/EclipseLink NoSQL Demo https://github.com/m-reza-rahman/jpa-nosql-demo
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public9 Other JPA/NoSQL Solutions  Hibernate OGM – Utilizes Hibernate codebase for NoSQL – MongoDB, Neo4J, CouchDB, Infinispan, Ehcache – Tries to provide as much of JPA as possible, including queries via Hibernate Search/Lucene, relational mapping annotations  DataNucleus – Persistence layer behind Google App Engine (not JPA compliant) – MongoDB, HBase, Neo4j  Kundera – Cassandra, MongoDB, HBase, Redis, Neo4j, Oracle NoSQL, CouchDB  Easy-Cassandra – Cassandra only
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public10 Similar NoSQL Solutions  PlayOrm – NoSQL centric JPA flavored annotations – Focused on Play framework – Cassandra, MongoDB, HBase  Mophia – Annotations mirror JPA – MongoDB specific
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public11 CDI Overview  Next-generation dependency injection for Java EE  Synthesizes best ideas from Seam 2, Guice and Spring  Many innovative features on its own right  Focus on loose-coupling, Java-centric type-safety, annotations, expressiveness and ease-of-use  Large ecosystem rapidly evolving around CDI
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public12 A Quick Look at CDI  Basic dependency injection – @Inject, @Qualifier, @Named, @Stereotype, @Alternative, @Produces, @Disposes  Context management – @Dependent, @RequestScoped, @SessionScoped, @ConversationScoped, @ApplicationScoped  Lightweight Events – Event, @Observes  Interceptors/Decorators – @Interceptor, @Decorator  Portable Extensions SPI
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public13 The Case for CDI  “Hibernate OGM is not expected to be the Rosetta stone used to interact with all NoSQL solutions in all use cases”  No real domain model  Advanced, highly specialized features  Unsupported NoSQL solutions  Existing NoSQL API knowledge  Most NoSQL APIs POJO based, easy to integrate natively via CDI
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public14 CDI NoSQL Demo https://github.com/m-reza-rahman/cdi-nosql-demo
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public15 Java EE 8 Community Survey https://java.net/downloads/javaee-spec/JavaEE8_Community_Survey_Results.pdf https://blogs.oracle.com/ldemichiel/entry/results_from_the_java_ee
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public16 NoSQL Survey Results
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public17 Summary  NoSQL getting attention, but still immature and volatile  Parts of JPA can apply well to NoSQL – many such initiatives including from Oracle  Most NoSQL APIs are good enough to integrate directly via CDI  Too soon to standardize NoSQL in Java EE?
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public18 Learn More  Considerations for Using NoSQL on Your Next Project – http://www.slideshare.net/VeryFatBoy/bcs-2013  EclipseLink NoSQL Examples – http://wiki.eclipse.org/EclipseLink/Examples/JPA/NoSQL  Hibernate OGM – http://hibernate.org/ogm/  DataNucleus – http://www.datanucleus.org  Kundera – https://github.com/impetus-opensource/Kundera/  Easy-Cassandra – https://github.com/otaviojava/Easy-Cassandra  Weld Docs – http://docs.jboss.org/weld/reference/latest/en-US/html/
  • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Public19