1 / 26

Building Oracle NoSQL Database Applications with EclipseLink

Building Oracle NoSQL Database Applications with EclipseLink. Robert Greene: Oracle NoSQL Database John Bracken, Shaun Smith: EclipseLink.

fox
Download Presentation

Building Oracle NoSQL Database Applications with EclipseLink

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Oracle NoSQL Database Applications with EclipseLink Robert Greene: Oracle NoSQL Database John Bracken, Shaun Smith: EclipseLink

  2. 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.

  3. Program Agenda • Oracle NoSQL Database • Architecture, value proposition, key features • EclipseLink for NoSQL • JPA-style API for NoSQL Databases • RESTful services for JPA • Deep Dive—EclipseLink NoSQL for ONDB

  4. NoSQL Where did it come from and What is it? Big Data Better Program Management, Just in Time Manufacturing, Social Mktng Basic Data (accounts, contacts, inventory, employees) Technology NoSQL Competition Modern Data (social data, public data, streaming data machine data) Smart & Agile Business Traditional Business New Data Use requiring New Data Management New Data, React Faster

  5. Logical Architecture – Applications View Application NoSQL Driver • Elastic partitions (split, add, contract) • Reads from any node in system Partition Partition Partition • Writes to elected node D D D R R R R R R Store

  6. Physical Architecture Application NoSQL Driver Data Center Data Center Data Center • Isolated replicas for always-on availability Zone 3 Zone 1 Zone 2 R D R D R R D Disks R • Intelligent latency selective reads from any node • Elected Master for TXN ops R D R Servers Racks Net Switches

  7. Oracle NoSQL Database • Scalable, Highly Available, Key-Value Database Application Application Application Application NoSQL DB Driver NoSQL DB Driver • Flexible Key-Value Data Model • ACID transactions • Horizontally Scalable • Highly Available • Elastic Configuration • Simple administration • Intelligent Driver • Commercial grade software and support • Features Storage Nodes Datacenter A Storage Nodes Datacenter B • Java SE 6 (JDK 1.6.0 u25)+; Solaris or Linux

  8. Oracle NoSQL Database Fully integrated for the Enterprise Application MapReduce, OLH, ODC, ODI NoSQL DB Driver External Tables Real Time Access GRAPH

  9. Developing Applications Data Modeling • Major-Minor ( hash – local ) • Keep small ( memory ), align with queries Strings picture .jpg Byte Array  userid Major key: subscriptions address Minor key: Value: expiration date email id phone #

  10. Developing Applications Value Types Data Modeling UUID = Range Value Type Qualifier Subject – ID Range = Array of Int LF 123-PS3234 PS Timestamp psi, irate – The Value a List What Sensor ID Left Front Pressure Sensor A range of sensor measures All measures of a sensor Queries A specific sensor sensors by section

  11. JSON Data Format Avro Based Serialization/DeSerialization of the Value • Why Avro? • Compact, highly efficient serialization • Synergy with Hadoop • Schema • DDL allows schema creation through Avro JSON definition • Supports serialization from/to JSON strings • Schema evolution • Easy to use mechanism for schema evolution • Schema versions can be opaque to readers

  12. Developing Applications Abstracting the Data Modeling Challenge • Feature Advantages Delivered • Seamless development paradigm between Relational and NoSQL • Annotation based persistence configuration • Transparent management of inter value references ( 1 to 1 ) • Transparent management of intra value references ( Embedded ) • Caching of data access via EclipseLink 2nd level cache

  13. Java Persistence—The Problem Space <customer id=“…”> <name>…</name> <contact-info> … </contact-info> </customer> CUST JAXB ID NAME C_RATING Relational Customer XML id: int name: String creditRating: int JPA ? Java … NoSQL JPA: Java Persistence APIJAXB: Java Architecture for XML BindingDBWS: EclipseLink Database WebServices

  14. JPA - Background • A standardization of industry practices for Java POJO Object Relational Persistence • Suitable for use in different modes • Standalone in Java SE environment • Hosted within a Java EE Container • Merging of expertise from persistence vendors and communities including: TopLink, Hibernate, JDO, EJB vendors and individuals

  15. Java Persistence API (JPA) - in a Nutshell Defines: • How Java objects are stored in relational db • A programmer API for reading, writing, and querying persistent Java objects (“Entities”) • A full featured query language in JP QL • a container contract that supports plugging any JPA runtime in to any compliant container Java SE/EE Application Java Classes JPA Provider JDBC Driver PersistenceDescriptors Database Schema

  16. EclipseLink Project www.eclipse.org/eclipselink • Founded by open sourcing Oracle TopLink at Eclipse Foundation • Object-Relational: Java Persistence API (JPA) • JPA 1.0, 2.0, and 2.1 compliant • EclipseLink is JPA 2.0 & 2.1 Reference Implementation • Sophisticated L2 and Clustered Caching Infrastructure • Object-XML: Java Architecture for XML Binding (JAXB) • JAXB 2.2 Certified Implementation • Additional features include: JSON Binding, DBWS, & JPA-RS

  17. JPA-RS GET http://.../persistence/Accounting/Invoice/... JAX-RS http://.../persistence/Accounting/Invoice/...mapped to JPA-RS service JAX-RS JPA JPA-RS JPA-RS maps URI http://.../persistence/Accounting/Invoice/... to Accounting PU and Invoice entity Accounting PU Human Resources PU Contracting PU ...

  18. JPA-RS Features • Access database data through REST with JSON or XML • Provides REST operations for entities in persistence unit (GET, PUT, POST, DELETE) • Automatic generation of XML and JSON bindings • Supports invocation of named queries via HTTP • Server Caching—EclipseLink clustered cache

  19. NoSQL Databases Challenges • No common definition (document, graph, columnar) • Differing feature sets • Some offer query language/API—some not • No standards • Every database offers a unique API • Cost in terms of learning • Zero portability across databases

  20. EclipseLink NoSQL • Support JPA-style 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

  21. Applicability of JPA to NoSQL • Core JPA concepts apply to NoSQL: • Persistent Entities, Embeddables, ElementCollection, OneToOne, OneToMany, ManyToOne, Version, etc. • Some concepts apply sometimes: • JPQL, NamedNativeQuery • Pure relational concepts don’t apply: • CollectionTable, Column, SecondaryTable, SequenceGenerator, TableGenerator, etc.

  22. EclipseLink NoSQL for ONDB Challenges • Mapping Major Keys • Avro Serialization and Mapping • Native Minor Key Mapping • Querying

  23. EclipseLink NoSQL for ONDB Deep Dive

  24. Q & A

More Related