Hibernate OGM. Michal Linhard Quality Assurance Engineer, Red Hat. Red Hat Developer Conference February 17 th, 2012

Similar documents
Monday, October 31, 11

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

Polyglot Persistence. EclipseLink JPA for NoSQL, Relational, and Beyond. Shaun Smith Gunnar Wagenknecht

The Next Generation. Prabhat Jha Principal Engineer

TopLink Grid: Scaling JPA applications with Coherence

Pro Hibernate and. MongoDB. Anghel Leonard. Apress-

Migrating traditional Java EE applications to mobile

DATA ACCESS TECHNOLOGIES FOR JAVA GENERAL STUDY

Setting Schema Name For Native Queries In. Hibernate >>>CLICK HERE<<<

Our Index. Searching in Infinispan. Infinispan Query engine Clustering a Lucene index Cloud deployed applications Future. Map/Reduce Fulltext indexing

Hibernate Search Googling your persistence domain model. Emmanuel Bernard Doer JBoss, a division of Red Hat

A memcached implementation in Java. Bela Ban JBoss 2340

The dialog boxes Import Database Schema, Import Hibernate Mappings and Import Entity EJBs are used to create annotated Java classes and persistence.

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver

Agenda. AWS Database Services Traditional vs AWS Data services model Amazon RDS Redshift DynamoDB ElastiCache

Introduction to NoSQL Databases

Red Hat JBoss Data Grid 7.1 Migration Guide

HIBERNATE MOCK TEST HIBERNATE MOCK TEST IV

Understanding Impact of J2EE Applications On Relational Databases. Dennis Leung, VP Development Oracle9iAS TopLink Oracle Corporation

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

Infinispan for Ninja Developers

Migrating Oracle Databases To Cassandra

PROFESSIONAL. NoSQL. Shashank Tiwari WILEY. John Wiley & Sons, Inc.

<Add your title> Name Title Red Hat, Inc. Date

CSE 344 Final Review. August 16 th

Introduction to Infinispan

Middle East Technical University. Jeren AKHOUNDI ( ) Ipek Deniz Demirtel ( ) Derya Nur Ulus ( ) CENG553 Database Management Systems

Painless Persistence. Some guidelines for creating persistent Java applications that work

<Insert Picture Here> MySQL Cluster What are we working on

Full-Text Search: Human Heaven and Database Savior in the Cloud

Amazon AWS-Solution-Architect-Associate Exam

The NoSQL movement. CouchDB as an example

JNoSQL (Cf) Dual Licensing Request to the Eclipse Foundation

Object Persistence Design Guidelines

Object-relational mapping EJB and Hibernate

What is it? What does it do?

Chapter 4. The Relational Model

EF6 - Version: 1. Entity Framework 6

Big Data Technology Ecosystem. Mark Burnette Pentaho Director Sales Engineering, Hitachi Vantara

Windows Azure Solutions with Microsoft Visual Studio 2010

D2.1: Architecture Draft

Persistence Performance Tips

You Don t Need a DBA. What Every PHP Developer Should Know about Database Development. Maggie Nelson php works 2007

CSE 444: Database Internals. Lecture 23 Spark

Hibernate Overview. By Khader Shaik

Enterprise Java in 2012 and Beyond From Java EE 6 To Cloud Computing

Building a Data Strategy for a Digital World

Tuesday, June 22, JBoss Users & Developers Conference. Boston:2010

Inside GigaSpaces XAP Technical Overview and Value Proposition

PaaS Cloud mit Java. Eberhard Wolff, Principal Technologist, SpringSource A division of VMware VMware Inc. All rights reserved

Postgres Plus and JBoss

1

Croquet. William R. Speirs, Ph.D. Founder & CEO of Metrink

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2015 Lecture 14 NoSQL

FACULTY OF ENGINEERING B.E. 4/4 (CSE) II Semester (Old) Examination, June Subject : Information Retrieval Systems (Elective III) Estelar

Monday, November 21, 2011

object/relational persistence What is persistence? 5

Module Day Topic. 1 Definition of Cloud Computing and its Basics

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Architectural Code Analysis. Using it in building Microservices NYC Cloud Expo 2017 (June 6-8)

Key Value Store. Yiding Wang, Zhaoxiong Yang

Fast Track to EJB 3.0 and the JPA Using JBoss

Extracts from Intro to Db - Jdbc - JPA SpringData

MongoDB - a No SQL Database What you need to know as an Oracle DBA

/ Cloud Computing. Recitation 6 October 2 nd, 2018

Red Hat JBoss Data Grid 7.0

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Dynamic Database Schemas and Multi-Paradigm Persistence Transformations

NOSQL EGCO321 DATABASE SYSTEMS KANAT POOLSAWASD DEPARTMENT OF COMPUTER ENGINEERING MAHIDOL UNIVERSITY

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Scaling. Marty Weiner Grayskull, Eternia. Yashh Nelapati Gotham City

Jakarta EE Meets NoSQL at the Cloud Age

DISTRIBUTED DATABASE OPTIMIZATIONS WITH NoSQL MEMBERS

Realtime visitor analysis with Couchbase and Elasticsearch

Course Outline. Lesson 2, Azure Portals, describes the two current portals that are available for managing Azure subscriptions and services.

Scalable Web Programming. CS193S - Jan Jannink - 2/25/10

Accelerate MySQL for Demanding OLAP and OLTP Use Cases with Apache Ignite. Peter Zaitsev, Denis Magda Santa Clara, California April 25th, 2017

Sunday, May 1,

MongoDB Introduction and Red Hat Integration Points. Chad Tindel Solution Architect

ETL Testing Concepts:

Creating Ultra-fast Realtime Apps and Microservices with Java. Markus Kett, CEO Jetstream Technologies

BENCHMARK: PRELIMINARY RESULTS! JUNE 25, 2014!

HIBERNATE MOCK TEST HIBERNATE MOCK TEST I

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Introduction to Relational Databases

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.

ECLIPSE PERSISTENCE PLATFORM (ECLIPSELINK) FAQ

Designing a scalable twitter

Symfony Doctrine Build Schema From Existing Database

Enterprise Features & Requirements Analysis For EJB3 JPA & POJO Persistence. CocoBase Pure POJO

1 Markus Eisele, Insurance - Strategic IT-Architecture

Week 2 Unit 3: Creating a JDBC Application. January, 2015

Invitation to a New Kind of Database. Sheer El Showk Cofounder, Lore Ai We re Hiring!

Oracle Database Jdbc Developer's Guide And Reference 10g Release 2

SQL Server SQL Server 2008 and 2008 R2. SQL Server SQL Server 2014 Currently supporting all versions July 9, 2019 July 9, 2024

Goal of the presentation is to give an introduction of NoSQL databases, why they are there.

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS

Index. setmaxresults() method, 169 sorting, 170 SQL DISTINCT query, 171 uniqueresult() method, 169

Top 7 Data API Headaches (and How to Handle Them) Jeff Reser Data Connectivity & Integration Progress Software

Transcription:

Hibernate OGM Michal Linhard Quality Assurance Engineer, Red Hat Red Hat Developer Conference February 17 th, 2012 1

About me Quality Assurance Engineer at JBoss / Red Hat Formerly played with JBoss AS / EAP Now having fun with Infinispan / Enterprise Datagrid Performance / system resilience tests in clustered environment 2

OGM! 3

OGM = Object/Grid Mapper 4

We need to store objects 5

JEE has a well known solution: JPA @Entity @Table(uniqueConstraints = @UniqueConstraint(columnNames = "email")) public class Member implements Serializable { } @Id @GeneratedValue private Long id; @NotNull @Size(min = 1, max = 25) @Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces") private String name; @NotNull @NotEmpty @Email private String email;... javax.persistence.* annotations 6

ORM = Object-Relational Mapping 7

Relational Databases Brought peace and order for 30 years Data structure abstraction Safety net Transactions Referential integrity (simple) types Proven usefulness Tuning, backup, resilience 8

Relational databases (Some) limitations: plan for scale is hard data model changes are painful New needs limitless data for later analysis risk of being successful Cloud 9

NoSQL Alternative (Not Only SQL) Goals very different large dataset high availability low latency / higher throughput specific data access pattern 10

Not Only SQL Document based stores Column based Graph oriented databases Key / value stores 11

NoSQL continued... Flexibility at a cost Programming model one per product :( no schema => app driven schema query (Map Reduce, specific DSL,...) transaction durability / consistency 12

Introducing Clustered in-memory Key/Value store Each node is equal, scale by adding or killing nodes No bottlenecks, by design Cloud network friendly Uses JGroups as communication layer 13

Introducing Support for transactions Cache loaders (Cassandra, JDBC, Amazon S3,...) Lucene integration Some Hibernate integrations Second level cache Hibernate Search indexing backend 14

Introducing It's a java.util.concurrent.concurrentmap! map.put( user-34, userinstance ); map.get( user-34 ); map.remove( user-34 ); map.putifabsent( user-38, another ); 15

Back to the beginning... 16

Wanna move to NoSQL Storage? But don't want to learn new API / Programming Model? 17

Introducing JPA for NoSQL Encourage new data usage patterns Familiar environments Ease of use Easy to jump in / out Push NoSQL exploration in enterprises PaaS for existing API initiative 18

Introducing Currently works with Infinispan Object CRUD (+associations) Reuses Hibernate Search, Hibernate Core JP-QL queries Not a silver bullet 19

General Architecture 20

Introducing Concepts 21

Schema or no schema? Schema-less move to new schema very easy app deal with old and new structure or migrate all data need strict development guidelines Schema reduce likelihood of rogue developer corruption share with other apps didn t think about that bugs reduced 22

Entities as serialized blobs? Serialize objects into the (key) value store the whole graph? maintain consistency with duplicated objects guaranteed identity a == b concurrency / latency structure change and (de)serialization, class definition changes 23

OGM s approach to schema Keep what s best from relational model as much as possible tables / columns / PKs Decorrelate object structure from data structure Data stored as (self-described) tuples Core types limited portability 24

OGM s approach to schema Store metadata for queries Lucene index CRUD operations are key lookups 25

Storage - Entities Entities are stored as tuples (Map<String,Object>) Key is composed of table name, PK column names, PK values Value is Map<String,Object> String: column name Object: simple type (serializable) e.g. {id=1, name= Charlie, date-of-birth=23-03-1983} 26

Storage - Associations Cannot store exactly like relational DBs (key lookup) still tuple based Each association in two keys (both sides) table name, FK column names, FK values (for a given side) Value is the list of tuples Focus on speedy reads association writes involve two key lookups 27

How does it work? 28

Queries Hibernate Search indexes entities Store Lucene indexes in Infinispan JP-QL to Lucene query transformation Works for simple queries Lucene is not a relational SQL engine 29

Queries 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( user.city ).matching( Paris ).createquery()).createquery(); 30

Conclusion JPA for NoSQL Reusing mature projects Keep the good of the relational model Do queries too Alpha quality Quite promising and exciting No Silver bullet 31

More info Project page http://www.hibernate.org/subprojects/ogm.html Code https://github.com/hibernate/hibernate-ogm/ Questions? 32