SlideShare a Scribd company logo
 
Enterprise Ruby on Rails:  Rolling with JRuby on Oracle WebLogic Suite Chris Bucchere CEO of BDG Pieter Humphrey Principal Product Manager, Oracle
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.
Intro Slides Chris Bucchere  CEO, BDG Oracle ACE Director Pieter Humphrey Principal Product Director, Oracle
Ruby 101
Ruby Overview Key Features Purely object-oriented Dynamically-typed Compact, yet easy to read syntax Blocks that are closures Open classes and objects Domain Specific Language capabilities Strong Weak static dynamic
Basics
Iteration, Blocks & Closures
String Handling & Regular Expressions
 
Guiding Principles Duck Typing If it walks like a duck and quacks like a duck, then it probably is a duck Convention over Configuration Down with XML! Rapid Prototyping Allows for agile development with short iterations Sustainable Productivity
Example Applications Twitter 43Things 37 Signals Basecamp Campfire Backpack Highrise Social Collective, Inc. The Social Collective CrowdCampaign Thousands of others. . . .
Migrations
ActiveRecord & Validations
Scaffolding
Built-in MVC
UI Helpers
Show me the money!
JRuby and  Database Access
What is JRuby? JRuby is a port of Ruby onto Java, written in C & ruby Offers Native Multithreading Full Access to Java Libraries Configuration DSL External Systems Static Layer - Static typed legacy Java Libraries Dynamic layer - Application Code
Why JRuby?  To use Java libraries from code written in Ruby syntax Swing, etc To use Ruby libraries from code written in Java syntax Via ActiveRecord with Bean Scripting Framework (BSF) Via “Scripting for the Java Platform” (JSR 223) in Java 6 Performance vs. C-based interpreter is a hot debate Depends who you ask, but it seems performance is surprisingly good Great for the following use cases Agile Methodology shops, small teams REST / Web App for routing data to back end resources Enterprise Deployments
Why JRuby cont. Integration with Java libraries: JRuby classes can extend Java classes implement a single Java interface add methods to existing Java classes Native threads Unicode support Portability Can drop in into SQL easily ( find_by_sql ) Many DB accees options – this is where Ruby shines
JRuby Developer Tool support IDEs Eclipse RDT plug-in supports Ruby development RadRails IDE IntelliJ IDEA NetBeans  Editors syntax highlighting (emacs, jEdit and Vim) Spring an IOC + Java EE framework  supports beans implemented in Java, JRuby, Groovy
Rack Ruby’s CGI / Servlet equivalent  In web.xml, a rack servlet filter will dispatch params / requests to the RACK component Rack provides a single API to abstracts multiple webservers ( mongrel, fast-cgi, webrick, fusion passenger ) Standardizes the request that a Ruby app expects (get params), wrapping HTTP requests/responses Based on WSGI for Python
Ruby DBI <Insert Picture Here> Ruby Script DBI API ADO ODBC Databases DB2, Informix, mySQL, Oracle
ActiveRecord ActiveRecord is … a Ruby library for accessing relational databases Simple, yet amazingly powerful / portable DB access Tricky to tune under load, not for use with legacy schemas It can be used from Java through JRuby install the ActiveRecord gem  under Java 5 and earlier use Bean Scripting Framework (BSF) classpath must contain bsf.jar, jruby.jar, jvyaml.jar, commons-logging-1.1.jar under Java 6 and later use JSR 223 Scripting API Convention, not configuration Great for greenfield web apps
Getting Started with JRuby Getting JRuby http://dist.codehaus.org/jruby/1.3.1/   jRuby1.3.1/bin should be in PATH JDK 1.5 or more should be in PATH, JAVA_HOME set Apache Ant (http://jakarta.apache.org/ant/) 1.7 or greater Getting Rails (the web tier for Ruby) Once JRuby environment is set: 'gem install rails -v 2.2.2' Getting Warbler (Java EE deployment unit converter) 'gem install warbler -v 0.9.12‘ Make sure you aren’t behind a proxy server
Demo Application: Maintain FOD Supplier Catalog FOD SCHEMA WebLogic Server EclipseLink Run WARBLER Ruby App JRuby interpreter Ruby App
JRuby, WebLogic, TopLink  Database Access
JPA—in a Nutshell Concrete classes (POJOs) No required interfaces or inheritance new() for instance creation Mapping using annotations and/or XML “ Managed” by an EntityManager Can leave the Container  (“detached”)
Where does JPA fit? Relational Database Java SE/EE/OSGi JPA Persistence Provider Design Time Runtime Mapping Metadata Java Classes Database Schema
JRuby + JPA = Enterprise friendly Rails JPA is better for working with pre-existing database schemas JRuby/JPA/WebLogic = easy Ops compliance Development tools: Standalone, JDev, Eclipse WebLogic provides connection pooling WebLogic provides Oracle RAC integration WebLogic provides Oracle JPA / Coherence integration WebLogic provides XA with Messaging & DB WebLogic provides easy ways to expose as JAX-WS, JAX-RPC, Spring Beans WebLogic provides SUN RI: EclipseLink, Kodo <Insert Picture Here>
WebLogic Server JDBC Architecture
 
JDBC 4.0 - Connection Management Additional enhancements to Connection interface to permit improved connection state tracking in pool environments. Connection new methods isValid Check whether the current connection has not been closed and is still valid. getClientInfo & setClientInfo Get and set current value of client info property supported by the driver. The values supplied to these methods are used for accounting, diagnostics and debugging purposes only.  Code example
JDBC 4.0 - Statement Management Additional enhancements to Statement interface to get greater flexibility when managing Statement objects in pool environments. Statement new methods isClosed: Check whether this Statement object has been closed.  isPoolable & setPoolable: Get and set poolable state of this statement object . Code example
JDBC 4.0 - Wrapper Pattern Added the ability to unwrap implementation of JDBC classes to make use of non-standard JDBC methods provided by vendor implementations. New interface java.sql.Wrapper isWrapperFor It can be used to determine if the instance implements the specified interface or if the instance is a wrapper for an object that does. unwrap It is used to return an object that implements the specified interface allowing access to vendor-specific methods. Subinterfaces derived from Wrapper Connection Statement PreparedStatement CallableStatement ResultSet DatabaseMetaData …
JDBC 4.0 - New data types Add the data type java.sql.RowId. This allows JDBC programs to access a SQL ROWID. Resultset new methods getRowId updateRowId Add new interface java.sql.SQLXML. Additional APIs have been added to allow applications access to this data. Connection new method createSQLXML PreparedStatement new method setSQLXML CallableStatement new methods getSQLXML setSQLXML ResultSet new methods getSQLXML updateSQLXML
TopLink 11g (includes EclipseLink 1.0.1)    Eclipse Persistence Services Project  (EclipseLink)‏ DBWS SDO EIS MOXy JPA XML Data Legacy Systems Databases Java SE Java EE OSGi Spring ADF
Scaling with JPA and ActiveCache  A clustered Enterprise Java application can experience slower response time due to database latency as it scales its number of instances As the number of concurrent application instance increase the number of read and write requests that must use the database also increase Independent caching in each application node must be minimized where concurrent writing is involved Reduced caching comes at a cost of increasing backend database load App Machines WebLogic Cluster Enterprise App JDBC Enterprise App JDBC Web App JDBC Databases Persistence Persistence Persistence
Scaling with JPA and ActiveCache  TopLink Grid integrates Coherence as shared cache for TopLink 11g JPA between Application Tier and database Single Coherence cache shared by all application nodes supports maximum caching even with concurrent writing Coherence Data Grid caching minimizes database load to allow for predictable scalability Named Cache Named Cache Named Cache Cache Store Cache Store Cache Store Cache Store Cache Store Oracle Coherence In Memory Data Grid Database App Machines WebLogic Cluster Enterprise App JDBC Enterprise App JDBC Web App JDBC JPA JPA JPA Named Cache Named Cache
TopLink Grid Combines: the simplicity of application development using the Java standard Java Persistence API (JPA) with the scalability and distributed processing power of Oracle’s Coherence Data Grid.
TopLink Grid Features Simple configuration using annotations that align with standard JPA, e.g., @Entity @Customizer (CoherenceReadWriteCustomizer. class ) public   class  Title  implements  Serializable { Ability to choose which entities are stored in the grid versus those stored directly in the backing data store Support for executing queries against either the Grid or directly against the data store JPQL queries translated into Coherence filters Queries executed in parallel across all members in grid  Support for all Coherence distribution schemes
TopLink Grid Features (2) Support for sequence generation and locking using either the Grid or the backing data store Optimistic Locking supported against Grid Store entities in their object representation Avoid object building cost when retrieving entity from grid Once in the grid, all member save on building cost, not just initial reader Leverage the power of the Coherence Data Grid, e.g., Parallel query processing Linear scalability Change listeners, etc.
TopLink Grid CacheStore Coherence backed by TopLink Grid for DB Access (c) Copyright 2007. Oracle Corporation
TopLink Development Tool Support JDeveloper 11g Advanced JPA Tooling Native ORM, OXM, and EIS mapping Eclipse IDE EclipseLink JPA support provided by Dali in Eclipse 3.4 (Ganymede) Oracle Enterprise Pack for Eclipse (OEPE) offers additional support for building and deploying to WebLogic Standalone Workbench TopLink 11g Workbench for using oracle.toplink.* (toplink.jar) Native ORM, OXM, and EIS mapping EclipseLink Workbench (not shipped in 11g) for org.eclipse.persistence.* (eclipselink.jar) Native ORM, OXM, and EIS mapping

More Related Content

What's hot (19)

PDF
Java 8 in Anger (QCon London)
Trisha Gee
 
PDF
Bea weblogic job_interview_preparation_guide
Pankaj Singh
 
PPSX
Java IO, Serialization
Hitesh-Java
 
PDF
Oracle History #5
Kyung Sang Jang
 
PPTX
Dao example
myrajendra
 
PPTX
Hibernate
Mallikarjuna G D
 
PPT
What's New in WebLogic 12.1.3 and Beyond
Oracle
 
PPTX
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
Fred Rowe
 
PDF
Hibernate 3
Rajiv Gupta
 
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Arjun Thakur
 
PPTX
4 jdbc step1
myrajendra
 
PPTX
Hibernate in Action
Akshay Ballarpure
 
PPT
Hibernate architecture
Anurag
 
PDF
Java EE Revisits GoF Design Patterns
Murat Yener
 
PPTX
Top 50 java ee 7 best practices [con5669]
Ryan Cuprak
 
PPTX
Java EE 8
Ryan Cuprak
 
PPTX
3 jdbc api
myrajendra
 
PPT
Have You Seen Java EE Lately?
Reza Rahman
 
PPTX
Java Database Connectivity (JDBC)
Pooja Talreja
 
Java 8 in Anger (QCon London)
Trisha Gee
 
Bea weblogic job_interview_preparation_guide
Pankaj Singh
 
Java IO, Serialization
Hitesh-Java
 
Oracle History #5
Kyung Sang Jang
 
Dao example
myrajendra
 
Hibernate
Mallikarjuna G D
 
What's New in WebLogic 12.1.3 and Beyond
Oracle
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
Fred Rowe
 
Hibernate 3
Rajiv Gupta
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Arjun Thakur
 
4 jdbc step1
myrajendra
 
Hibernate in Action
Akshay Ballarpure
 
Hibernate architecture
Anurag
 
Java EE Revisits GoF Design Patterns
Murat Yener
 
Top 50 java ee 7 best practices [con5669]
Ryan Cuprak
 
Java EE 8
Ryan Cuprak
 
3 jdbc api
myrajendra
 
Have You Seen Java EE Lately?
Reza Rahman
 
Java Database Connectivity (JDBC)
Pooja Talreja
 

Viewers also liked (7)

PPTX
Coherence sig-nfr-web-tier-scaling-using-coherence-web
C2B2 Consulting
 
PDF
Coherence Implementation Patterns - Sig Nov 2011
Ben Stopford
 
PDF
Data Grids with Oracle Coherence
Ben Stopford
 
PPT
Building REA In The Cloud
Oracle
 
PPT
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
Oracle
 
PPT
An Engineer's Intro to Oracle Coherence
Oracle
 
PPT
Oracle Coherence: in-memory datagrid
Emiliano Pecis
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
C2B2 Consulting
 
Coherence Implementation Patterns - Sig Nov 2011
Ben Stopford
 
Data Grids with Oracle Coherence
Ben Stopford
 
Building REA In The Cloud
Oracle
 
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
Oracle
 
An Engineer's Intro to Oracle Coherence
Oracle
 
Oracle Coherence: in-memory datagrid
Emiliano Pecis
 
Ad

Similar to Rollin onj Rubyv3 (20)

PPTX
Ups and downs of enterprise Java app in a research setting
Csaba Toth
 
PDF
Proud to be polyglot
Tugdual Grall
 
PPT
Architecture of eSobi club based on J2EE
Allan Huang
 
PDF
Application Architecture Trends
Srini Penchikala
 
ODP
First Day With J Ruby
Praveen Kumar Sinha
 
PDF
Summer training java
Arshit Rai
 
PDF
Whats New In Java Ee 6
Stephan Janssen
 
PPT
SHOW104: Practical Java
Mark Myers
 
PDF
Java EE 6 workshop at Dallas Tech Fest 2011
Arun Gupta
 
ODP
Intro in JavaEE world (TU Olomouc)
blahap
 
KEY
Appengine Nljug
Paul Bakker
 
PPT
Summer training java
Arshit Rai
 
PPT
Virtual classroom
Krishna Chaithanya
 
PPT
J2 ee architecture
saurabhshertukde
 
PPT
Scripting Oracle Develop 2007
Tugdual Grall
 
PDF
Building Asynchronous Applications
Johan Edstrom
 
PPTX
EJB 2
Khushboo Shaukat
 
PDF
Bitter Java, Sweeten with JRuby
Brian Sam-Bodden
 
PDF
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Ian Robinson
 
Ups and downs of enterprise Java app in a research setting
Csaba Toth
 
Proud to be polyglot
Tugdual Grall
 
Architecture of eSobi club based on J2EE
Allan Huang
 
Application Architecture Trends
Srini Penchikala
 
First Day With J Ruby
Praveen Kumar Sinha
 
Summer training java
Arshit Rai
 
Whats New In Java Ee 6
Stephan Janssen
 
SHOW104: Practical Java
Mark Myers
 
Java EE 6 workshop at Dallas Tech Fest 2011
Arun Gupta
 
Intro in JavaEE world (TU Olomouc)
blahap
 
Appengine Nljug
Paul Bakker
 
Summer training java
Arshit Rai
 
Virtual classroom
Krishna Chaithanya
 
J2 ee architecture
saurabhshertukde
 
Scripting Oracle Develop 2007
Tugdual Grall
 
Building Asynchronous Applications
Johan Edstrom
 
Bitter Java, Sweeten with JRuby
Brian Sam-Bodden
 
Is Enterprise Java Still Relevant (JavaOne 2015 session)
Ian Robinson
 
Ad

Recently uploaded (20)

PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 

Rollin onj Rubyv3

  • 1.  
  • 2. Enterprise Ruby on Rails: Rolling with JRuby on Oracle WebLogic Suite Chris Bucchere CEO of BDG Pieter Humphrey Principal Product Manager, Oracle
  • 3. 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.
  • 4. Intro Slides Chris Bucchere CEO, BDG Oracle ACE Director Pieter Humphrey Principal Product Director, Oracle
  • 6. Ruby Overview Key Features Purely object-oriented Dynamically-typed Compact, yet easy to read syntax Blocks that are closures Open classes and objects Domain Specific Language capabilities Strong Weak static dynamic
  • 9. String Handling & Regular Expressions
  • 10.  
  • 11. Guiding Principles Duck Typing If it walks like a duck and quacks like a duck, then it probably is a duck Convention over Configuration Down with XML! Rapid Prototyping Allows for agile development with short iterations Sustainable Productivity
  • 12. Example Applications Twitter 43Things 37 Signals Basecamp Campfire Backpack Highrise Social Collective, Inc. The Social Collective CrowdCampaign Thousands of others. . . .
  • 18. Show me the money!
  • 19. JRuby and Database Access
  • 20. What is JRuby? JRuby is a port of Ruby onto Java, written in C & ruby Offers Native Multithreading Full Access to Java Libraries Configuration DSL External Systems Static Layer - Static typed legacy Java Libraries Dynamic layer - Application Code
  • 21. Why JRuby? To use Java libraries from code written in Ruby syntax Swing, etc To use Ruby libraries from code written in Java syntax Via ActiveRecord with Bean Scripting Framework (BSF) Via “Scripting for the Java Platform” (JSR 223) in Java 6 Performance vs. C-based interpreter is a hot debate Depends who you ask, but it seems performance is surprisingly good Great for the following use cases Agile Methodology shops, small teams REST / Web App for routing data to back end resources Enterprise Deployments
  • 22. Why JRuby cont. Integration with Java libraries: JRuby classes can extend Java classes implement a single Java interface add methods to existing Java classes Native threads Unicode support Portability Can drop in into SQL easily ( find_by_sql ) Many DB accees options – this is where Ruby shines
  • 23. JRuby Developer Tool support IDEs Eclipse RDT plug-in supports Ruby development RadRails IDE IntelliJ IDEA NetBeans Editors syntax highlighting (emacs, jEdit and Vim) Spring an IOC + Java EE framework supports beans implemented in Java, JRuby, Groovy
  • 24. Rack Ruby’s CGI / Servlet equivalent In web.xml, a rack servlet filter will dispatch params / requests to the RACK component Rack provides a single API to abstracts multiple webservers ( mongrel, fast-cgi, webrick, fusion passenger ) Standardizes the request that a Ruby app expects (get params), wrapping HTTP requests/responses Based on WSGI for Python
  • 25. Ruby DBI <Insert Picture Here> Ruby Script DBI API ADO ODBC Databases DB2, Informix, mySQL, Oracle
  • 26. ActiveRecord ActiveRecord is … a Ruby library for accessing relational databases Simple, yet amazingly powerful / portable DB access Tricky to tune under load, not for use with legacy schemas It can be used from Java through JRuby install the ActiveRecord gem under Java 5 and earlier use Bean Scripting Framework (BSF) classpath must contain bsf.jar, jruby.jar, jvyaml.jar, commons-logging-1.1.jar under Java 6 and later use JSR 223 Scripting API Convention, not configuration Great for greenfield web apps
  • 27. Getting Started with JRuby Getting JRuby http://dist.codehaus.org/jruby/1.3.1/ jRuby1.3.1/bin should be in PATH JDK 1.5 or more should be in PATH, JAVA_HOME set Apache Ant (http://jakarta.apache.org/ant/) 1.7 or greater Getting Rails (the web tier for Ruby) Once JRuby environment is set: 'gem install rails -v 2.2.2' Getting Warbler (Java EE deployment unit converter) 'gem install warbler -v 0.9.12‘ Make sure you aren’t behind a proxy server
  • 28. Demo Application: Maintain FOD Supplier Catalog FOD SCHEMA WebLogic Server EclipseLink Run WARBLER Ruby App JRuby interpreter Ruby App
  • 29. JRuby, WebLogic, TopLink Database Access
  • 30. JPA—in a Nutshell Concrete classes (POJOs) No required interfaces or inheritance new() for instance creation Mapping using annotations and/or XML “ Managed” by an EntityManager Can leave the Container (“detached”)
  • 31. Where does JPA fit? Relational Database Java SE/EE/OSGi JPA Persistence Provider Design Time Runtime Mapping Metadata Java Classes Database Schema
  • 32. JRuby + JPA = Enterprise friendly Rails JPA is better for working with pre-existing database schemas JRuby/JPA/WebLogic = easy Ops compliance Development tools: Standalone, JDev, Eclipse WebLogic provides connection pooling WebLogic provides Oracle RAC integration WebLogic provides Oracle JPA / Coherence integration WebLogic provides XA with Messaging & DB WebLogic provides easy ways to expose as JAX-WS, JAX-RPC, Spring Beans WebLogic provides SUN RI: EclipseLink, Kodo <Insert Picture Here>
  • 33. WebLogic Server JDBC Architecture
  • 34.  
  • 35. JDBC 4.0 - Connection Management Additional enhancements to Connection interface to permit improved connection state tracking in pool environments. Connection new methods isValid Check whether the current connection has not been closed and is still valid. getClientInfo & setClientInfo Get and set current value of client info property supported by the driver. The values supplied to these methods are used for accounting, diagnostics and debugging purposes only. Code example
  • 36. JDBC 4.0 - Statement Management Additional enhancements to Statement interface to get greater flexibility when managing Statement objects in pool environments. Statement new methods isClosed: Check whether this Statement object has been closed. isPoolable & setPoolable: Get and set poolable state of this statement object . Code example
  • 37. JDBC 4.0 - Wrapper Pattern Added the ability to unwrap implementation of JDBC classes to make use of non-standard JDBC methods provided by vendor implementations. New interface java.sql.Wrapper isWrapperFor It can be used to determine if the instance implements the specified interface or if the instance is a wrapper for an object that does. unwrap It is used to return an object that implements the specified interface allowing access to vendor-specific methods. Subinterfaces derived from Wrapper Connection Statement PreparedStatement CallableStatement ResultSet DatabaseMetaData …
  • 38. JDBC 4.0 - New data types Add the data type java.sql.RowId. This allows JDBC programs to access a SQL ROWID. Resultset new methods getRowId updateRowId Add new interface java.sql.SQLXML. Additional APIs have been added to allow applications access to this data. Connection new method createSQLXML PreparedStatement new method setSQLXML CallableStatement new methods getSQLXML setSQLXML ResultSet new methods getSQLXML updateSQLXML
  • 39. TopLink 11g (includes EclipseLink 1.0.1) Eclipse Persistence Services Project (EclipseLink)‏ DBWS SDO EIS MOXy JPA XML Data Legacy Systems Databases Java SE Java EE OSGi Spring ADF
  • 40. Scaling with JPA and ActiveCache A clustered Enterprise Java application can experience slower response time due to database latency as it scales its number of instances As the number of concurrent application instance increase the number of read and write requests that must use the database also increase Independent caching in each application node must be minimized where concurrent writing is involved Reduced caching comes at a cost of increasing backend database load App Machines WebLogic Cluster Enterprise App JDBC Enterprise App JDBC Web App JDBC Databases Persistence Persistence Persistence
  • 41. Scaling with JPA and ActiveCache TopLink Grid integrates Coherence as shared cache for TopLink 11g JPA between Application Tier and database Single Coherence cache shared by all application nodes supports maximum caching even with concurrent writing Coherence Data Grid caching minimizes database load to allow for predictable scalability Named Cache Named Cache Named Cache Cache Store Cache Store Cache Store Cache Store Cache Store Oracle Coherence In Memory Data Grid Database App Machines WebLogic Cluster Enterprise App JDBC Enterprise App JDBC Web App JDBC JPA JPA JPA Named Cache Named Cache
  • 42. TopLink Grid Combines: the simplicity of application development using the Java standard Java Persistence API (JPA) with the scalability and distributed processing power of Oracle’s Coherence Data Grid.
  • 43. TopLink Grid Features Simple configuration using annotations that align with standard JPA, e.g., @Entity @Customizer (CoherenceReadWriteCustomizer. class ) public class Title implements Serializable { Ability to choose which entities are stored in the grid versus those stored directly in the backing data store Support for executing queries against either the Grid or directly against the data store JPQL queries translated into Coherence filters Queries executed in parallel across all members in grid Support for all Coherence distribution schemes
  • 44. TopLink Grid Features (2) Support for sequence generation and locking using either the Grid or the backing data store Optimistic Locking supported against Grid Store entities in their object representation Avoid object building cost when retrieving entity from grid Once in the grid, all member save on building cost, not just initial reader Leverage the power of the Coherence Data Grid, e.g., Parallel query processing Linear scalability Change listeners, etc.
  • 45. TopLink Grid CacheStore Coherence backed by TopLink Grid for DB Access (c) Copyright 2007. Oracle Corporation
  • 46. TopLink Development Tool Support JDeveloper 11g Advanced JPA Tooling Native ORM, OXM, and EIS mapping Eclipse IDE EclipseLink JPA support provided by Dali in Eclipse 3.4 (Ganymede) Oracle Enterprise Pack for Eclipse (OEPE) offers additional support for building and deploying to WebLogic Standalone Workbench TopLink 11g Workbench for using oracle.toplink.* (toplink.jar) Native ORM, OXM, and EIS mapping EclipseLink Workbench (not shipped in 11g) for org.eclipse.persistence.* (eclipselink.jar) Native ORM, OXM, and EIS mapping

Editor's Notes

  • #21: The Java version is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application.
  • #23: Integration with Java libraries JRuby classes can extend Java classes implement a single Java interface add methods to existing Java classes (visible from JRuby, but not Java) Native threads JRuby uses native threads, Ruby uses green threads can result in different behaviors between JRuby and Ruby Portability JRuby runs on any machine with a JVM Unicode support JRuby uses the unicode support in Java Ruby has some support for unicode, but it’s not built-in
  • #25: When you start JRuby  starting Java – based ruby interpreter on a JVM. C based or J based Ruby doesn’t care which one (due to how Jruby is implemeted) Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. • An abstract interface on top of HTTP allows for • code reuse • easier testing • new ways of combining code/applications
  • #26: The general architecture for Ruby DBI uses two layers: The database interface (DBI) layer. This layer is database independent and provides a set of common access methods that are used the same way regardless of the type of database server with which you&apos;re communicating. The database driver (DBD) layer. This layer is database dependent; different drivers provide access to different database engines. There is one driver for MySQL, another for PostgreSQL, another for InterBase, another for Oracle, and so forth. Each driver interprets requests from the DBI layer and maps them onto requests appropriate for a given type of database server. ADO (ActiveX Data Objects) DB2 Frontbase mSQL MySQL ODBC Oracle OCI8 (Oracle) PostgreSQL Proxy/Server SQLite SQLRelay The database drivers are each hand crafted to access a specific database. They have different method names from each other, meaning that if you switch back end databases, you&apos;ll need to rewrite substantial portions of your program. The only reason to use the database specific drivers is to take advantage of database specific features, and possibly to make the program run a little faster and use a little less memory. With the database specific drivers, you manipulate the database by passing SQL statements as strings via the interface methods. Ruby-DBI is a wrapper around all the database drivers, giving you a united method set to do the majority of your database activities. The only remaining database dependencies are caused by the fact that the different databases support slightly different SQL syntaxes. With DBI, you manipulate the database by passing SQL statements as strings via the interface methods. Whereas the database drivers and DBI provide a simple vehicle to use an SQL statement, the ActiveRecord technique provides database access without the need for SQL statements. The ActiveRecord techniques match objects to database rows. The advantages are almost zero database dependencies within the subset of capabilities provided by ActiveRecord, and a set of defaults (such as automatic naming of tables based on class names) that make coding a database app much quicker and easier. If you know SQL, you can pretty much write an app using database drivers or DBI today. With ActiveRecord, you&apos;ll need to learn a new set of skills, complete with a set of methods specific to Ruby&apos;s ActiveRecord class. You wouldn&apos;t do this to create a one-off app, but if you are or plan to be a frequent Ruby programmer and you plan to frequently hit databases from your Ruby programs, learning ActiveRecord will benefit you greatly.  Ruby on Rails uses ActiveRecord for the vast majority of its database access, so if you use or plan to use Ruby on Rails, ActiveRecord is a must.
  • #27: Database.yml – only config file.. Just fill in the value and go! Here you&apos;ve only scratched the surface of Active Record. It&apos;s a powerful framework—much more powerful than other frameworks that implement the Active Record design pattern. It leverages the strengths of the Ruby framework—a simple syntax, metaprogramming, and the ability to open and manipulate classes at run time—to form a marvelously effective and productive environment for green-field development. But Active Record is not for every application. It does not handle legacy schemas nearly as well. For those, you need a mapping framework, not one that merely wraps tables with simple classes. Active Record also is prone to performance problems for those who don&apos;t have the discipline or skill to tune it properly. Active Record, and the Ruby on Rails framework, represent what founder David Heinemeier-Hannsen calls opinionated software. Rails, and Active Record by extension, represents hundreds of compromises, with most of them favoring a beautiful, productive programmer experience.
  • #33: Solve WAR file,
  • #40: Oracle TopLink 11g includes EclipseLink 1.0.1 JPA: Object-Relational JPA 1.0 with advanced persistence Simplified configuration of advanced features using annotations and/or XML All leading RDMS with platform specific features, best ORM for the Oracle Database MOXy: Object-XML Binding JAXB and advanced native SDO: Service Data Objects EIS using JCA Resource Adapters Containers WebLogic, OracleAS, WebSphere, GlassFish/SunAS, JBoss
  • #41: This is an example of a scalability problem that can be encountered in JEE applications, and that Coherence can help address.
  • #42: Oracle TopLink 11g (11.1.1.0.0) introduced in 2008 includes the new TopLink Grid feature that addresses the potential scalability problem discussed on the prior slide. TopLinkGrid which offers tight integration with Oracle Coherence that marries the standardization and simplicity of application development using the Java Persistence API (JPA) with the scalability and distributed processing power of Oracle’s Coherence Data Grid. This feature is integrated and included with WebLogic Suite. Developers can use TopLink Grid to easily leverage the Coherence grid as their primary storage for Entities as well as using direct connectivity with the backing data store for some Entity types of for specific operations. This flexibility allows application to easily adjust their usage of Coherence to meet changing requirements and usage patterns. The real focus of TopLink Grid is the delivery of functionality where a developer can easily configure TopLink JPA to use Coherence as the primary data store, execute queries against the grid, and choose to have Coherence manage the persisting of new and modified Entities. This integrated solution involves a layer between JPA and the data store where the grid can be leveraged in order to off-load direct database calls from every application instance and therefore offer these clustered application deployments the capability of scaling beyond and database bound operations. http://www.oracle.com/technology/products/ias/toplink/technical/toplink_grid_intro.html