The development of database residente Java applications has an impact with the new multitenant architecture, more specifically the CBD / PDBs concepts.This session will cover details like the use of common operating system resources such as sockets, file system, logging and others, and RDBMS common resources like JIT, jobs scheduler and so on.Also some best practices to solve tipicall pitfalls and guidelines for development and deployment.
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
The impact of MultiTenant Architecture in the develop of Java within the RDBMS
1. Experiences with Evangelizing Java Within
the Database
The impact of MultiTenant Architecture in the develop of Java within the
RDBMS
The impact of MultiTenant Architecture in the develop
of Java within the RDBMS
2. About
●
About me
– CTO at Scotas.com
– Founder of the ArOUG
– ACE Member since 2006
– Open Source Developer (DBPrism/ DBPrism CMS, LDI, ...)
– Oracle developer since 1999
●
About Scotas
– A company specialized in free text search, synchronization
and Oracle
– OLS, Native Solr integration
– External Solr/ ElasticSearch integration
www.scotas.com
6. Sun’s JDK versus Database resident JVM
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)
Database resident JVM
● 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
7. Oracle’s Commitment to OJVM
●
Used by a growing number of database customers acording
to Oracle
●
Used by Oracle Components
– InterMedia
– Spatial
– Text
– XQuery (XMLDB)
– WareHouse Builder
– CDC (Change Data Capture)
– ODM (Oracle Data Mining analytics functions)
●
12c Enhancements
www.scotas.com
8. ●
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
9. 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
13. Process - CPU resources
www.scotas.com
● Estimate CPU usage by OJVM
– Process connected using shared servers
– Process connected using dedicted servers
– Jobs process
– AQ process implemented in Java
● DBMS Resource Manager
– CPU Caging
● Dedicated plan for each PDBs
– Shares
– % CPU
– % Parallel Servers
● Dedicated plan for Jobs process
14. Process - Memory resources
www.scotas.com
● Estimate memory usage by OJVM
– SGA/UGA used by dedicated or shared server
process
– Jobs process count as dedicated process
– Look for global parameters:
● memory_target
● memory_max_target
● shared_pool_size (8Kb x load class)
● java_pool_size (during executing)
● java_soft_sessionspace_limit (soft limit, warning msg)
● java_max_sessionspace_limit (hard limit, default 4Gb)
● Fine tunning using JMX monitoring
19. Examples - Scotas OLS
www.scotas.com
●
An Embedded version of Solr Framework running inside Oracle JVM
●
42 new Java Classes and several new PLSQL Object Types
●
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 SIDX_A ON TEST_SOURCE_BIG(TEXT)
INDEXTYPE IS LUCENE.SOLRINDEX
parameters('DefaultColumn:text_tn;BatchCount:5000;CommitOnSync:false;LockMasterTable:f
alse;IncludeMasterColumn:false;Updater:localhost@9099;Searcher:localhost@9099;SyncMod
e:OnLine;LogLevel:WARNING;ExtraCols:text "text_tn",line "line_tin", type
"type_sn",substr(text,1,256)
"title";HighlightColumn:title;MltColumn:title;LobStorageParameters:STORAGE
(BUFFER_POOL KEEP) CACHE READS FILESYSTEM_LIKE_LOGGING');
CREATE INDEX SIDX_A ON TEST_SOURCE_BIG(TEXT)
INDEXTYPE IS LUCENE.SOLRINDEX
parameters('DefaultColumn:text_tn;BatchCount:5000;CommitOnSync:false;LockMasterTable:f
alse;IncludeMasterColumn:false;Updater:localhost@9099;Searcher:localhost@9099;SyncMod
e:OnLine;LogLevel:WARNING;ExtraCols:text "text_tn",line "line_tin", type
"type_sn",substr(text,1,256)
"title";HighlightColumn:title;MltColumn:title;LobStorageParameters:STORAGE
(BUFFER_POOL KEEP) CACHE READS FILESYSTEM_LIKE_LOGGING');
22. Conclusions
●
Multitenant is about isolating data
●
OS resources are shared
– Is very important take this into account
●
Applications need to be re-tested
again
●
Data which refers to OS resources
need to be updated when plug/unplug
PDBs
www.scotas.com