Top Banner
Database-resident JVM What, Where, How is it use and his potential
19

Database-resident JVM - What, Where, How is it use and his potential

May 22, 2015

Download

Software

Marcelo Ochoa

Oracle OpenWorld San Pablo 2012
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Database-resident JVM - What, Where, How is it use and his potential

Database-resident JVMWhat, Where, How is it use and his potential

Page 2: Database-resident JVM - What, Where, How is it use and his potential

www.scotas.com

Agenda

– Database resident JVM

– Session Management

– Memory Management

– Security

– Oracle Commitment to Java in the Database

– What we heard at OOW San Francisco about 12c

– Case Study● Near Real Time Full Text Indexing● Analytic Tool for Enterprise Server Logs

Page 3: Database-resident JVM - What, Where, How is it use and his potential

Database resident JVM

● Available since Oracle 8i● Architecture● Robustness● Class sharing● Memory Management● Scalability● Performance

www.scotas.com

Page 4: Database-resident JVM - What, Where, How is it use and his potential

Oracle JVM versus Sun’s JDK

Sun’s JDK VM● Thread Based

● Sharing across Threads

● Limited Scalability

● Classes in file system

● Resolve classes with “Classpath”

● JIT

● Preemptive multi-threading

● Limited Robustness (process failure)

OracleJVM● Database Session Model

● Session Isolation● Unlimited Scalability● Classes in database● Resolve classes with

“Resolver Spec”● JIT (11g and up)● Non-Preemptive multi-

threading● Does not crash as a whole

www.scotas.com

Page 5: Database-resident JVM - What, Where, How is it use and his potential

Database Sessions Imposed on Java

Within the context of a session, the client performs the following:

1)Connects to the database and opens a session.

● Runs Java within the database. This is referred to as a call

● Continues to work within the session, performing as many calls as required

● Ends the session

www.scotas.com

Page 6: Database-resident JVM - What, Where, How is it use and his potential

Oracle JVM Class Sharing

Shared JVM System Classes

Shared User Application Classes

Oracle Database

Virtual JVMInstance

Virtual JVM Instance

Session

System Statics

User Statics

Session

System Statics

User Statics

Session

System Statics

User Statics

www.scotas.com

Page 7: Database-resident JVM - What, Where, How is it use and his potential

Oracle JVM Memory Areas

● Java PoolUsed by the Java class loader to allocates space for bytecodes and other read-only class metadata; also Java states that are migrated from the Session space at the end of call.

● Session SpaceUsed for preserving the state of system objects, user objects, and metadata used by the Java runtime; also used for end of call migration

● New SpaceDefault memory area for allocating almost all Java objects, except large objects

● Old SpaceUsed for holding long-lived or large objects (i.e., larger than 1-K Bytes) for the duration of a call.

● Run SpaceUsed for holding system objects (e.g., classloader objects) allocated for the duration of a call.

● Stack SpaceUsed to allocate system objects used by the interpreter

www.scotas.com

Page 8: Database-resident JVM - What, Where, How is it use and his potential

OracleJVM Security

Strong Security combining database security mechanisms with Java security mechanisms● User authentication● Database-schema security ● Login-user and effective-user security● Class resolution security● Java 2 security

www.scotas.com

Page 9: Database-resident JVM - What, Where, How is it use and his potential

Oracle’s Commitment to OJVM

● Used by a significant percentage of database customers● Used by Oracle Components

– InterMedia– Spatial– Text– XQuery (XMLDB)– WareHouse Builder– CDC (Change Data Capture)– ORE (Oracle R Enterprise – database resident)– ODM (Oracle Data Mining analytics functions)

● 12c Enhancements

www.scotas.com

Page 10: Database-resident JVM - What, Where, How is it use and his potential

● Many among Fortune 500 companies● Some examples from

“Java in the Oracle Database @ Work – Customer Case Studies”

● And for sure Scotas & Cima

Who is Using OJVM

www.scotas.com

Page 11: Database-resident JVM - What, Where, How is it use and his potential

Java in the Database: What For

www.scotas.com

● Trigger-based Notification System using RMI

● Secure Credit-Card Processing using JSSE

● Custom Alert applications that monitor business data

● Sending emails with attachment from within the database

● Produce PDF files from Result Set● Execute external OS commands and

external procedures● Implement Md5 CRC● Publish Repository Content to Portal● Portable Logistic Applications

● Implement Parsers for various File Formats (txt, zip, xml, binary)

● Implement Image Transformation and Format Conversion (GIF, PNG, JPEG, etc)

● Implement database-resident Content Management System

● HTTP Call-Out● JDBC Call-Out● RMI Call-Out to SAP● Web Services Call-Out● Messaging across Tiers● RESTful Database Web Services● Near Real Time Full Text Search

Page 12: Database-resident JVM - What, Where, How is it use and his potential

According to OOW SF presentation

● JDK interchangeable at any time (Perl script)● Support for latest JDK

– 1.6 default– 1.7

● JNDI support● Logging support● In-database Hadoop (Map-Reduce)● Security enhancements● Fast switch from SQL-OJVM calls

www.scotas.com

Page 13: Database-resident JVM - What, Where, How is it use and his potential

Case Study

www.scotas.com

Database resident JVM Client Example

Scotas Near Real Time Full Text Searching

Page 14: Database-resident JVM - What, Where, How is it use and his potential

Scotas OLS

www.scotas.com

● An Embedded version of Solr Framework running inside Oracle OracleJVM● 42 new Java Classes and several new PLSQL Object Types● Two new domain index for Oracle Databases using Data Cartridge API (ODCI)● A new Store implementation for Lucene (OJVMDirectory) which replaces a traditional filesystem by Secure BLOB

● Four new SQL operators scontains(), sscore(), smlt(), shighlight() and poweful text analysis functionalities

● An orthogonal/up-to-date Solr solution for any programming language, especially Java, Ruby, Python, PHP and .Net, currently latest production version – 4.0.0.

● Available to any Oracle product such as BI, Apex, ODM

create index esl_events_sidx on esl_events(message) indextype is Lucene.SolrIndexparameters('SyncMode:Deferred;MltColumn:text;HighlightColumn:title;DefaultColumn:text;CommitOnSync:true;ExtraTabs:ESL.esl_causes c;WhereCondition:L$MT.event_id=c.event_id(+);ExtraCols:.....') local parallel 2;

select /*+ DOMAIN_INDEX_SORT */ sscore(1),shighlight(1),message from esl_events where scontains(message,'severity_s:(ERROR INFO) AND springframework',1)>0 and gen_day between 26 and 27;

Page 15: Database-resident JVM - What, Where, How is it use and his potential

What the NRT means?

www.scotas.com

Page 16: Database-resident JVM - What, Where, How is it use and his potential

OLS Architecture

www.scotas.com

Page 17: Database-resident JVM - What, Where, How is it use and his potential

Oracle Integrated Information Architecture Capabilities - Scotas OLS Integration

www.scotas.com

Man

agem

ent,

Sec

urity

, G

over

nanc

e

AcquireData

Un

stru

ctu

red

S

emi-

str

uc

ture

d

S

tru

ctu

red

Machine Generated

Social Media

Text, Image, Video, Audio

Transactions

Master & Reference

Organize Analyze Decide

Reporting & Dashboards

Alerting

EPM - BI Applications

Advanced Analytics

Visual Discovery

Big DataCluster

Specialized Hardware

High SpeedNetwork

RDBMSCluster

In MemoryAnalytics

ETL/ELT

ChangeDC

Real-Time

Message- Based

HadoopMapReduce

In-DatabaseAnalytics

Source: Oracle Information Architecture: An Architect’s Guide to Big DataAn Oracle White Paper in Enterprise Architecture, March 2012Figure 3: Oracle Integrated Information Architecture Capabilities

DBMS(OLTP)

NoSQL

ODS

HDFS

Warehouse

StreamingCEP Engine

Files

Scotas Search

Page 18: Database-resident JVM - What, Where, How is it use and his potential

• Product comparison

SCOTAS OLS

Oracle Text

Solr Lucene

Real Time

Scalability

Performance

Security

Integration

Flexible and Powerful features

Bringing the best of both worlds

www.scotas.com

Page 19: Database-resident JVM - What, Where, How is it use and his potential

Thank You!

www.scotas.com | [email protected] | +1 (650) 704-7915 | 440 North Wolfe Road, Sunnyvale, CA 94085