SlideShare a Scribd company logo
0Web 2.0 Development with DB2 Dr. Vladimir Bacvanski, Vice President, InferData,  vladimir@inferdata.comRafael Coss, Solutions Architect, IBM, rcoss@ibm.comSession Number 2166
OutlineChallenges of Enterprise Web 2.0 SystemsSome Side-Effects of O/R MappingData-Driven Applications and pureQueryRich Internet Applications: Ajax and Dojo with RADpureQuery + JEE Applications with RADpureQuery + Situational Applications with WebSphere sMashIBM Optim Development StudioIntegrating pureQuery and WebSphere sMash with RAD
2Show of Hands!How many are developers, managers,involved with databases, others?Are you using Java, Ruby, Python, Groovy, PHP,?How many are using EJB, plain JDBC, Hibernate?What’s most important?ProductivityReuseAvailabilityPerformanceShared DatabaseFlexibility
COMMUNITYParticipationRICHUser InterfacesSoftware as aSERVICEWeb 2.0 DATA
What matters most to Enterprise Web 2.0 Systems?MVC architecture?Java vs. Python vs. [insert your favorite language]?Ajax vs. Flash?MASSIVEAMOUNTSOF DATA
Java Data Access – Two Views of the WorldWriting Java code is so easy with this eclipse environment.I wish it was that easy to get the SQL right.JSPQoS goalsSpringAnother runaway query!  Where are these coming from?  JDBC?  Hmmm…RunstatsXMLhttpPartition strategyStoredProceduresmashupSQLResponse Time!REORGJSONJDBCThis ORM doesn’t allow me to leverage all my database’s SQL.Inconsistent response time? How long will it take me to find the offending application sending bad SQL this time? JDBCI can’t believe I got called out last week.  I wish I could see how these queries will run in production.SQLJJPAThese ad-hoc queries are dangerous.  We need a library of tested SQL interfaces. ApplicationDeveloperDatabase Developer& AdministratorSpringWhy does this query take so long?iBatis, . . .Sometimes I need POJOs, sometime JSON, sometimes XML, what should I use?Static SQL? Sounds like another delay to getting my program deployedAnother GRANT request?  This security administration is out of control.Can I examine the SQL “before” the application is deployed?
Meet in theMiddleData Mapping ApproachesApplication-CentricTop-DownStart with Object Domain ModelORM MappingWell supported in dynamic languages and frameworksHybridMeet in the middleCan be challenging w/o comprisingData-CentricBottom-UPStart with Relational Data ModelNot well supported in dynamic languages and frameworksTopDownPersistence LayerBottomUp6
EJB and Hibernate Side EffectsDBA and SQL developer Amnesia
Where is the SQL coming from?
What is it?
Where is it?
How do we tune it?
How de we manage it?
Performance Concerns:
Some App Server vendors claim (unsurprisingly) that Managed objects performs fine.
There are many user claims of bad Managed object performance is bad on the web.
As always, the truth is in the middle.
And will depend on your app server, application, database, etc ..“Our top story: Large Customer moves from COBOL to Java to become more agile.  In other news, DBA develop amnesia.”77
A high-performance, data access platform to simplify developing, managing, securing, and optimizing data access.Introducing pureQuerypureQuery Components:Simple and intuitive APIEnables SQL access to databases or in-memory Java objectsFacilitates best practices Optim Development Studio (integrates with RAD)Integrated development environment with Java and SQL support Improve problem isolation and impact analysisOptim pureQuery RuntimeFlexible static SQL deployment for DB2
Design Phase pureQuery close-upModel IntegrationGenerate Object Model and code from Data ModelV2.2Jump Start Application DesignGenerate SQL and Code from Database Objects
Setup basic DAO PatternExisting JDBC to StaticReroute Dynamic Queries to StaticCode Development ProductivityCode Generation, Content Assist
Database aware, Java SQL EditorSQL ReplacementReplace Query w/o changing sourceSQL Performance MetricsFind and sort query elapsed time from JavaJava to SQL IntegrationCategorize by Java, SQL, Database , Packages, track back to line of codeProblem DeterminationMonitor WebSphere Connection Pool, JDBC Driver, Network
Track back to SQL and line of code in the applicationStatic SQLLock in Access plans, Improve Security, Consistent PerformanceSQL Injection PreventionLock down SQL for DynamicCode Example: JDBCjava.sql.PreparedStatementps = con.prepareStatement(        "SELECT NAME, ADDRESS,PHONE_NUM FROM EMP  WHERE NAME=?");ps.setString(1, name);java.sql.ResultSetrs= ps.executeQuery();names.next();Employee myEmp = new Employee();myEmp.setName(rs.getString(1));myEmp.setHomeAddress(rs.getString(2));myEmp.setHomePhone(rs.getString(3));names.close();class Employee {    String name;String homeAddress;String homePhone;  …}
Code Example: pureQuery11Employee myEmp= db.queryFirst(     "SELECT NAME, ADDRESS, PHONE_NUM FROM EMP      WHERE NAME=?", Employee.class, name);Even simpler, if we have a method getEmployee with a Java annotation or XML file with SQL for the query:Employee myEmp= getEmployee(name);
DesignDevelopOptimizeGovernModelsPoliciesMetadataDeployOperateIBM Optim pureQueryReduce costsIncrease system throughput Improve developer productivityMove workload to zIIP and zAAPImprove quality of service for new and existing Java applications Improve performance Lock in access plansSpeed up problem resolutionReduce development time for new Java applicationsBridge Java and dataBalance productivity and controlEnhance developer and DBA collaborationEnhance securityLimit user access Minimize SQL injection riskImprove audit readinessDeveloperDevelopCodeDebugTestTune, PackageTester
Why should DBAs care ?DBAs have little to no visibility of application SQL before deployment, no opportunity for review and optimization Problem isolation takes days with contemporary environments such as Java, PHP, .NET, etc due to inability to trace SQL to Java application and source codeConstantly increasing Java application workload taxes existing systems – need to fit more work into existing systemsSQL injection represents an increasing risk to data security
Why should Developers care ?Get data access right the first time !Get it done faster - Improved productivitySingle environment that spans Java application and database developmentImproved problem isolation and resolution
How well does it work? – Java applicationsIn-house testing shows significant performance improvementsIRWW – an OLTP workload, Type 4 driverCache hit ratio between 70 and 85%23 % improvement in throughput using pureQuery over dynamic JDBC15% - 25% reduction on CPU per transaction over dynamic JDBC 15
How well does it work? - .Net applicationsThroughput during static execution increased by 159% over dynamic SQL execution assuming a 79% statement cache hit ratio IRWW – OLTP application
Application accesses DB2 for z/OS*Any performance data contained in this document were determined in various controlled laboratory environments and are for reference purposes only. Customers should not adapt these performance numbers to their own environments as system performance standards. The results that may be obtained in other operating environments may vary significantly. Users of this document should verify the applicable data for their specific environment.16
17Control performanceDecide at deployment time how the SQL is executedUnderstand and lock down the access plan for SQLReplace suboptimal SQL without changing the applicationControl securityPrevent SQL injectionPrevent execution of unauthorized SQLBetter manage database security See inside applications that are driving your databaseUnderstand where SQL comes fromUnderstand when frameworks and ORM’s are getting in the waySimplify problem determination and troubleshootingCorrelate problem SQL with applications, ORM’s and frameworksOptim pureQuery Runtime
18How do I start with pureQueryExisting applicationsOptimize existing JDBC (and .NET!) applicationsNo code changes neededHave to go through the client optimization process to get to static SQLNew applicationsUse the pureQuery APIDevelopment codes using one API regardless of whether it is deployed dynamically or staticallyDBA deploys staticallyNo need to go through client optimization processOtherJPA, iBatis, Hibernate
19pureQuery Gives You OptionsV2.1 FeatureData Web Services, Project Zero, sMash.Net applicationsHibernate, iBATIS, EclipseLink,...JPA for WebSphere, Apache OpenJPA  Optim pureQueryPlain JDBCJPA  APIWeb APIOpen Source Persistence API.Net ApplicationspureQuery APIJDBC APIJPA Persistence EngineOpen Source Persistence EngineJDBC	pureQueryADO .Net	JCC driverDB2 and Informix nowMore coming
20pureQuery Facilitates Best PracticesSupports both inline SQL and Java annotations (method) Intuitive interfaces for common data retrieval and manipulation scenarios hides JDBC complexityQuery FirstHomogeneous BatchReduce network trips to the database Query Over Java CollectionsHeterogeneous BatchUse custom result handlers to map results to POJO’s, XML, JSON, …Write high performance Java data access applications, Part 3: Data Studio pureQuery API best practices-- VitorRodrigueshttp://www.ibm.com/developerworks/db2/library/techarticle/dm-808rodrigues/?S_TACT=105AGX01&S_CMP=LP
21Optimize Existing JDBC ApplicationsImprove performance for DB2 – without changing a line of codeCapture 		     Configure		Bind		ExecutepureQuery client optimization enables static execution for JDBC applications (custom-developed, framework-based, or packaged)Existing JDBC ApplicationCaptured SQL- relatedmetadataJDBC Driver w/ pureQueryDynamic SQL execution Static SQL execution DB2 Data Servers"The ability to use static SQL with pureQuery is huge. Recently, I worked with a client who could reduce CPU usage by 7 percent thanks to this one feature."                                    — David Beulke, Pragmatic Solutions Inc.
Business AnalystRequirementsAnalystData ArchitectData Access DeveloperDatabase AdministratorSoftware ArchitectDeveloperIntegration with RationalCreates businessprocess modelWebSphereBusiness ModelerTransform between business items and data modelCreate & manage software delivery requirementsLink requirements to data assetsRationalRequisiteProCreate architectural model enablingthe tasks from BPM to be automatedRationalSoftware Modeler 7.5Transform between software and data modelsCreate or reverse engineer logical and physical modelsTransform Models to CodeRationalSoftware Architect 7.5InfosphereData Architect 7.5Implement new& integrate existing servicesImplement newprocedures and servicesRationalApplication Developer7. 5Optim Development StudioExtract test data from production systemsRational ClearQuestOptim Test Data Manager
Add basic OR mapping and annotated-method stylepureQuerypureQuery Balances Productivity and ControlManaged objects Object-relational mappingFull SQL controlCode all your SQLJDBC / SQLJUse SQL templates, inline onlySpring templatesiBATISComplex OR mapping and persistence management, but loss of controlsHibernateAdds container management optionOpenJPA (EJB3)
RAD / Development Studio Data Centric Development ScenarioWrite in JavaUsing RAD+WAS FP for Web 2.0Write in Java with pureQueryUsing Optim Dev. Studio in RADAccess generated Java  data objects  from code developed in RADWAS Feature Pack for Web 2.0
RAD and Web 2.0 Rich Internet Applications RAD supports development of Ajax applicationsEssentially: HTML + JavaScript + Asynchronous communicationUses Dojo Ajax librariesIBM Dojo extensionsVisual tools for Dojo UI developmentLibraries and tools:Invoking Java code from Dojo with RPC AdapterJSON4JAjax messaging25

More Related Content

PPTX
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
PDF
High performance database applications with pure query and ibm data studio.ba...
DOC
Suresh Resume
DOC
Java database programming with jdbc
DOC
Jesy George_CV_LATEST
PPT
Unit 5-jdbc2
PPTX
Spring
PDF
Ajp notes-chapter-05
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
High performance database applications with pure query and ibm data studio.ba...
Suresh Resume
Java database programming with jdbc
Jesy George_CV_LATEST
Unit 5-jdbc2
Spring
Ajp notes-chapter-05

What's hot (20)

PDF
BPMN, BPEL, ESB or maybe Java? What should I use to implement my project?
DOCX
J2EE and layered architecture
DOCX
Sunil kumar resume
PPTX
A-Team Mobile Persistence Accelerator Overview
PPT
Anatomy Of A Driver Presentation 09 15 2008
PPT
Rollin onj Rubyv3
DOC
Soundarya Reddy Resume
PDF
Programming-best practices( beginner) ADF_fusionapps
PDF
As 400
DOCX
Ashley Kevorkian.Selenium
DOCX
Ramesh Babu Resume Latest
PPTX
Jboss Application Server training-course-navi-mumbai-jboss-course-provider-na...
DOCX
Mahesh_webMethodsProfile
PDF
Nilesh_Surange J2EE 9.5+ Years
DOC
Resume_VADIVALAGAN_A
DOC
PPT
Stat 5.4 Pre Sales Demo Master
PDF
ADF Mobile: Implementing Data Caching and Synching
DOCX
Yuvaraj Shanmugam - Application Architect
DOCX
Sindhumathi Vellaidurai
BPMN, BPEL, ESB or maybe Java? What should I use to implement my project?
J2EE and layered architecture
Sunil kumar resume
A-Team Mobile Persistence Accelerator Overview
Anatomy Of A Driver Presentation 09 15 2008
Rollin onj Rubyv3
Soundarya Reddy Resume
Programming-best practices( beginner) ADF_fusionapps
As 400
Ashley Kevorkian.Selenium
Ramesh Babu Resume Latest
Jboss Application Server training-course-navi-mumbai-jboss-course-provider-na...
Mahesh_webMethodsProfile
Nilesh_Surange J2EE 9.5+ Years
Resume_VADIVALAGAN_A
Stat 5.4 Pre Sales Demo Master
ADF Mobile: Implementing Data Caching and Synching
Yuvaraj Shanmugam - Application Architect
Sindhumathi Vellaidurai
Ad

Similar to Web 2.0 Development with IBM DB2 (20)

PPT
High Performance Jdbc
PPTX
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
PDF
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
PPTX
Thinking Beyond ORM in JPA
PDF
Oracle Database Programming Using Java And Web Services 1st Edition Kuassi Me...
PDF
Presentation for java data base connectivity
PDF
Db2 developer ecosystem
PPT
Java Developers, make the database work for you (NLJUG JFall 2010)
PPT
W-JAX Performance Workshop - Database Performance
PDF
Sangam 19 - PLSQL still the coolest
PPT
DB2 UDB for z/OS Version 7 - An Overview
PDF
[Uruguay] DB2 Web Query for i - Hernando Bedoya
PPTX
Codecamp iasi-26 nov 2011-what's new in jpa 2.0
PPTX
Jdbc presentation
PDF
Database and application performance vivek sharma
PDF
Hibernate I
PDF
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
PPSX
JDBC Part - 2
PPT
Jdbc oracle
PDF
Hibernate training at HarshithaTechnologySolutions @ Nizampet
High Performance Jdbc
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
Thinking Beyond ORM in JPA
Oracle Database Programming Using Java And Web Services 1st Edition Kuassi Me...
Presentation for java data base connectivity
Db2 developer ecosystem
Java Developers, make the database work for you (NLJUG JFall 2010)
W-JAX Performance Workshop - Database Performance
Sangam 19 - PLSQL still the coolest
DB2 UDB for z/OS Version 7 - An Overview
[Uruguay] DB2 Web Query for i - Hernando Bedoya
Codecamp iasi-26 nov 2011-what's new in jpa 2.0
Jdbc presentation
Database and application performance vivek sharma
Hibernate I
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
JDBC Part - 2
Jdbc oracle
Hibernate training at HarshithaTechnologySolutions @ Nizampet
Ad

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPT
Teaching material agriculture food technology
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
A Presentation on Artificial Intelligence
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
cuic standard and advanced reporting.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Teaching material agriculture food technology
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25-Week II
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Spectroscopy.pptx food analysis technology
A Presentation on Artificial Intelligence
SOPHOS-XG Firewall Administrator PPT.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
cuic standard and advanced reporting.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”

Web 2.0 Development with IBM DB2

  • 1. 0Web 2.0 Development with DB2 Dr. Vladimir Bacvanski, Vice President, InferData, [email protected] Coss, Solutions Architect, IBM, [email protected] Number 2166
  • 2. OutlineChallenges of Enterprise Web 2.0 SystemsSome Side-Effects of O/R MappingData-Driven Applications and pureQueryRich Internet Applications: Ajax and Dojo with RADpureQuery + JEE Applications with RADpureQuery + Situational Applications with WebSphere sMashIBM Optim Development StudioIntegrating pureQuery and WebSphere sMash with RAD
  • 3. 2Show of Hands!How many are developers, managers,involved with databases, others?Are you using Java, Ruby, Python, Groovy, PHP,?How many are using EJB, plain JDBC, Hibernate?What’s most important?ProductivityReuseAvailabilityPerformanceShared DatabaseFlexibility
  • 5. What matters most to Enterprise Web 2.0 Systems?MVC architecture?Java vs. Python vs. [insert your favorite language]?Ajax vs. Flash?MASSIVEAMOUNTSOF DATA
  • 6. Java Data Access – Two Views of the WorldWriting Java code is so easy with this eclipse environment.I wish it was that easy to get the SQL right.JSPQoS goalsSpringAnother runaway query! Where are these coming from? JDBC? Hmmm…RunstatsXMLhttpPartition strategyStoredProceduresmashupSQLResponse Time!REORGJSONJDBCThis ORM doesn’t allow me to leverage all my database’s SQL.Inconsistent response time? How long will it take me to find the offending application sending bad SQL this time? JDBCI can’t believe I got called out last week. I wish I could see how these queries will run in production.SQLJJPAThese ad-hoc queries are dangerous. We need a library of tested SQL interfaces. ApplicationDeveloperDatabase Developer& AdministratorSpringWhy does this query take so long?iBatis, . . .Sometimes I need POJOs, sometime JSON, sometimes XML, what should I use?Static SQL? Sounds like another delay to getting my program deployedAnother GRANT request? This security administration is out of control.Can I examine the SQL “before” the application is deployed?
  • 7. Meet in theMiddleData Mapping ApproachesApplication-CentricTop-DownStart with Object Domain ModelORM MappingWell supported in dynamic languages and frameworksHybridMeet in the middleCan be challenging w/o comprisingData-CentricBottom-UPStart with Relational Data ModelNot well supported in dynamic languages and frameworksTopDownPersistence LayerBottomUp6
  • 8. EJB and Hibernate Side EffectsDBA and SQL developer Amnesia
  • 9. Where is the SQL coming from?
  • 12. How do we tune it?
  • 13. How de we manage it?
  • 15. Some App Server vendors claim (unsurprisingly) that Managed objects performs fine.
  • 16. There are many user claims of bad Managed object performance is bad on the web.
  • 17. As always, the truth is in the middle.
  • 18. And will depend on your app server, application, database, etc ..“Our top story: Large Customer moves from COBOL to Java to become more agile. In other news, DBA develop amnesia.”77
  • 19. A high-performance, data access platform to simplify developing, managing, securing, and optimizing data access.Introducing pureQuerypureQuery Components:Simple and intuitive APIEnables SQL access to databases or in-memory Java objectsFacilitates best practices Optim Development Studio (integrates with RAD)Integrated development environment with Java and SQL support Improve problem isolation and impact analysisOptim pureQuery RuntimeFlexible static SQL deployment for DB2
  • 20. Design Phase pureQuery close-upModel IntegrationGenerate Object Model and code from Data ModelV2.2Jump Start Application DesignGenerate SQL and Code from Database Objects
  • 21. Setup basic DAO PatternExisting JDBC to StaticReroute Dynamic Queries to StaticCode Development ProductivityCode Generation, Content Assist
  • 22. Database aware, Java SQL EditorSQL ReplacementReplace Query w/o changing sourceSQL Performance MetricsFind and sort query elapsed time from JavaJava to SQL IntegrationCategorize by Java, SQL, Database , Packages, track back to line of codeProblem DeterminationMonitor WebSphere Connection Pool, JDBC Driver, Network
  • 23. Track back to SQL and line of code in the applicationStatic SQLLock in Access plans, Improve Security, Consistent PerformanceSQL Injection PreventionLock down SQL for DynamicCode Example: JDBCjava.sql.PreparedStatementps = con.prepareStatement( "SELECT NAME, ADDRESS,PHONE_NUM FROM EMP WHERE NAME=?");ps.setString(1, name);java.sql.ResultSetrs= ps.executeQuery();names.next();Employee myEmp = new Employee();myEmp.setName(rs.getString(1));myEmp.setHomeAddress(rs.getString(2));myEmp.setHomePhone(rs.getString(3));names.close();class Employee { String name;String homeAddress;String homePhone; …}
  • 24. Code Example: pureQuery11Employee myEmp= db.queryFirst( "SELECT NAME, ADDRESS, PHONE_NUM FROM EMP WHERE NAME=?", Employee.class, name);Even simpler, if we have a method getEmployee with a Java annotation or XML file with SQL for the query:Employee myEmp= getEmployee(name);
  • 25. DesignDevelopOptimizeGovernModelsPoliciesMetadataDeployOperateIBM Optim pureQueryReduce costsIncrease system throughput Improve developer productivityMove workload to zIIP and zAAPImprove quality of service for new and existing Java applications Improve performance Lock in access plansSpeed up problem resolutionReduce development time for new Java applicationsBridge Java and dataBalance productivity and controlEnhance developer and DBA collaborationEnhance securityLimit user access Minimize SQL injection riskImprove audit readinessDeveloperDevelopCodeDebugTestTune, PackageTester
  • 26. Why should DBAs care ?DBAs have little to no visibility of application SQL before deployment, no opportunity for review and optimization Problem isolation takes days with contemporary environments such as Java, PHP, .NET, etc due to inability to trace SQL to Java application and source codeConstantly increasing Java application workload taxes existing systems – need to fit more work into existing systemsSQL injection represents an increasing risk to data security
  • 27. Why should Developers care ?Get data access right the first time !Get it done faster - Improved productivitySingle environment that spans Java application and database developmentImproved problem isolation and resolution
  • 28. How well does it work? – Java applicationsIn-house testing shows significant performance improvementsIRWW – an OLTP workload, Type 4 driverCache hit ratio between 70 and 85%23 % improvement in throughput using pureQuery over dynamic JDBC15% - 25% reduction on CPU per transaction over dynamic JDBC 15
  • 29. How well does it work? - .Net applicationsThroughput during static execution increased by 159% over dynamic SQL execution assuming a 79% statement cache hit ratio IRWW – OLTP application
  • 30. Application accesses DB2 for z/OS*Any performance data contained in this document were determined in various controlled laboratory environments and are for reference purposes only. Customers should not adapt these performance numbers to their own environments as system performance standards. The results that may be obtained in other operating environments may vary significantly. Users of this document should verify the applicable data for their specific environment.16
  • 31. 17Control performanceDecide at deployment time how the SQL is executedUnderstand and lock down the access plan for SQLReplace suboptimal SQL without changing the applicationControl securityPrevent SQL injectionPrevent execution of unauthorized SQLBetter manage database security See inside applications that are driving your databaseUnderstand where SQL comes fromUnderstand when frameworks and ORM’s are getting in the waySimplify problem determination and troubleshootingCorrelate problem SQL with applications, ORM’s and frameworksOptim pureQuery Runtime
  • 32. 18How do I start with pureQueryExisting applicationsOptimize existing JDBC (and .NET!) applicationsNo code changes neededHave to go through the client optimization process to get to static SQLNew applicationsUse the pureQuery APIDevelopment codes using one API regardless of whether it is deployed dynamically or staticallyDBA deploys staticallyNo need to go through client optimization processOtherJPA, iBatis, Hibernate
  • 33. 19pureQuery Gives You OptionsV2.1 FeatureData Web Services, Project Zero, sMash.Net applicationsHibernate, iBATIS, EclipseLink,...JPA for WebSphere, Apache OpenJPA Optim pureQueryPlain JDBCJPA APIWeb APIOpen Source Persistence API.Net ApplicationspureQuery APIJDBC APIJPA Persistence EngineOpen Source Persistence EngineJDBC pureQueryADO .Net JCC driverDB2 and Informix nowMore coming
  • 34. 20pureQuery Facilitates Best PracticesSupports both inline SQL and Java annotations (method) Intuitive interfaces for common data retrieval and manipulation scenarios hides JDBC complexityQuery FirstHomogeneous BatchReduce network trips to the database Query Over Java CollectionsHeterogeneous BatchUse custom result handlers to map results to POJO’s, XML, JSON, …Write high performance Java data access applications, Part 3: Data Studio pureQuery API best practices-- VitorRodrigueshttp://www.ibm.com/developerworks/db2/library/techarticle/dm-808rodrigues/?S_TACT=105AGX01&S_CMP=LP
  • 35. 21Optimize Existing JDBC ApplicationsImprove performance for DB2 – without changing a line of codeCapture Configure Bind ExecutepureQuery client optimization enables static execution for JDBC applications (custom-developed, framework-based, or packaged)Existing JDBC ApplicationCaptured SQL- relatedmetadataJDBC Driver w/ pureQueryDynamic SQL execution Static SQL execution DB2 Data Servers"The ability to use static SQL with pureQuery is huge. Recently, I worked with a client who could reduce CPU usage by 7 percent thanks to this one feature." — David Beulke, Pragmatic Solutions Inc.
  • 36. Business AnalystRequirementsAnalystData ArchitectData Access DeveloperDatabase AdministratorSoftware ArchitectDeveloperIntegration with RationalCreates businessprocess modelWebSphereBusiness ModelerTransform between business items and data modelCreate & manage software delivery requirementsLink requirements to data assetsRationalRequisiteProCreate architectural model enablingthe tasks from BPM to be automatedRationalSoftware Modeler 7.5Transform between software and data modelsCreate or reverse engineer logical and physical modelsTransform Models to CodeRationalSoftware Architect 7.5InfosphereData Architect 7.5Implement new& integrate existing servicesImplement newprocedures and servicesRationalApplication Developer7. 5Optim Development StudioExtract test data from production systemsRational ClearQuestOptim Test Data Manager
  • 37. Add basic OR mapping and annotated-method stylepureQuerypureQuery Balances Productivity and ControlManaged objects Object-relational mappingFull SQL controlCode all your SQLJDBC / SQLJUse SQL templates, inline onlySpring templatesiBATISComplex OR mapping and persistence management, but loss of controlsHibernateAdds container management optionOpenJPA (EJB3)
  • 38. RAD / Development Studio Data Centric Development ScenarioWrite in JavaUsing RAD+WAS FP for Web 2.0Write in Java with pureQueryUsing Optim Dev. Studio in RADAccess generated Java data objects from code developed in RADWAS Feature Pack for Web 2.0
  • 39. RAD and Web 2.0 Rich Internet Applications RAD supports development of Ajax applicationsEssentially: HTML + JavaScript + Asynchronous communicationUses Dojo Ajax librariesIBM Dojo extensionsVisual tools for Dojo UI developmentLibraries and tools:Invoking Java code from Dojo with RPC AdapterJSON4JAjax messaging25
  • 40. Choosing the Right ToolsStrategic, IT built applications.WebSphere sMashResponding to unplanned situations.Innovating around prospective business opportunities where agility is key and the outcome is still unknown.Enabling new insights by combining information from the web and enterprise data sources.RAD + WASHeavily used, complex applications built by IT teams.UsageSimple applications built by professionals
  • 41. What is WebSphere sMash?Groovy and PHPUses pureQuery for data accessCan use Java codeConvention over configuration Common tasks do not require configurationApplication-centric runtime Write the app, run it, and it’s ready for use No need for a separate application serverEach app has its own JVM processFast start!27A complete platform for developing, assemblingand executing agile Web 2.0 apps quickly and simply.
  • 42. RAD, WebSphere sMash and pureQuery in Data Centric DevelopmentDevelopment scenario:A database already existWe want to use the productive Optim Development Studio development featuresWe want to benefit from pureQuery featuresWe may need to integrate with other already existing components and applicationsSolution:Use WebSphere sMash together with RAD + Development StudioShell shareGenerate Java code from Development Studio functionality, use from GroovyUse RAD powerful features for GUI Dojo development and integration with other components and applications
  • 43. Development and Execution: pureQuery and sMashDevelop mostly w. Optim Dev. Studio + sMashDevelop mostly with RADRIA UI with DojoDesignDBJEE/J2EEComponentsExisting ApplicationsExecution
  • 44. Start with the DatabaseUse Development Studio to explore the databaseThen generate the pureQuery code
  • 45. This will create the Java classes in the sMash projectUsing pureQuery Code in WebSphere sMashUsing Development Studio, pureQuery code is generated in Java folderspureQuery code is used from Groovy or PHP
  • 46. Using Java pureQuery Code from GroovyAccess the database using the pureQuery generated helper class
  • 47. Invoke generated method to list the employees
  • 48. Convert the result to JSON and send it to the client
  • 49. Clients consume the result as e.g. RIA: AJAX, Flex, …
  • 50. sMash function handles GET HTTP requests33
  • 53. Next Steps – Learn and Explore!Optim Development Studio and pureQuery
  • 58. http://ibm.com/software/awdtools/developer/application/Where to go Next? Resources and more…WebSphere sMashhttp://www.ibm.com/websphere/smashOptim Development Studio http://www.ibm.com/software/data/optim/development-studio/IBM pureQueryhttp://www.ibm.com/software/data/optim/purequery-platform/faq.htmlpureQuery Custom Training InferData, IBM Business Partner http://www.inferdata.comCourse: Developing Database Applications with Optim Development Studio and pureQueryhttp://www.inferdata.com/training/data/optim_purequery_training.html37
  • 59. Web, BlogsProject Zerohttp://www.projectzero.orgIntegrated Data Management (Optim and Data Studio)http://www.ibm.com/developerworks/spaces/optimBlogs: On Building Software http://www.OnBuildingSoftware.comData Life Cycle ++ http://datalifecycle.blogspot.comTwitter:http://twitter.com/OnSoftwarehttp://twitter.com/racoss38
  • 60. 39Thank You!Your Feedback is Important to UsPlease complete the survey for this session by:Accessing the SmartSite on your smart phone or computer at: iodsmartsite.com Surveys / My Session EvaluationsVisiting any onsite event kioskSurveys / My Session EvaluationsEach completed survey increases your chance to win an Apple iPod Touch with daily drawling sponsored by Alliance Tech39