Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Slide 1 - Technology Books, Tech Conferences, IT Courses ...

358 views

Published on

  • Be the first to comment

  • Be the first to like this

Slide 1 - Technology Books, Tech Conferences, IT Courses ...

  1. 1. Increase the Flexibility of MySQL-based SOA Frameworks with a Data Access Layer Mike Frost Product Manager DataDirect Technologies
  2. 2. DataDirect Technologies Overview <ul><li>#1 independent supplier of data access technologies </li></ul><ul><li>Any application, any platform, any data source </li></ul><ul><li>Standards leader </li></ul><ul><li>Leading the market in addressing changing data access requirements </li></ul><ul><li>A rich history, strong backing: </li></ul><ul><ul><li>20 years in business </li></ul></ul><ul><ul><li>Formerly Intersolv, Merant, NEON </li></ul></ul><ul><ul><li>Independent operating company of Progress Software (Nasdaq: PRGS) </li></ul></ul><ul><li>MySQL partner since 2007 </li></ul>MySQL Oracle DB2 SQL Server Sybase Informix Teradata XML Adabas IMS VSAM CICS IAM IDMS EDI ODBC JDBC ADO.NET XQuery Web Services
  3. 3. Agenda <ul><li>Where are we today? </li></ul><ul><ul><li>SOA </li></ul></ul><ul><ul><li>Data access </li></ul></ul><ul><li>Data access problems in SOA environments </li></ul><ul><li>Solving the problems </li></ul><ul><li>What does the future hold? </li></ul>
  4. 4. Agenda <ul><li>Where are we today? </li></ul><ul><ul><li>SOA </li></ul></ul><ul><ul><li>Data access </li></ul></ul><ul><li>Data access problems in SOA environments </li></ul><ul><li>Solving the problems </li></ul><ul><li>What does the future hold? </li></ul>
  5. 5. The current SOA landscape <ul><li>Many corporate IT organizations are evaluating, planning, or implementing SOA environments </li></ul><ul><ul><li>Common framework for development of new applications </li></ul></ul><ul><ul><li>Leverages standards such as XML, SOAP, etc. </li></ul></ul><ul><li>A collection of business goals drives this decision </li></ul><ul><ul><li>Control IT costs </li></ul></ul><ul><ul><li>Increase overall business nimbleness and flexibility </li></ul></ul><ul><ul><li>Develop and deploy new applications faster </li></ul></ul><ul><ul><li>Reuse business logic common to multiple applications </li></ul></ul><ul><ul><li>Optimize use of hardware / software investments </li></ul></ul><ul><ul><li>Build bridges between heterogeneous environments </li></ul></ul>
  6. 6. The SOA vision 11010100101010101010001010010101010100010011110000001111001010101 11010100101010101010001010010101010100010011110000001111001010101 1101010010101010101000101001010101010001001111000000111010001110101011010100111010101000101010100011010100110101011101001101010010101110100100111001001101 11010100101010101010001010010101010100010011110000001111001010101 11010100101010101010001010010101010100010011110000001111001010101 11010100101010101010001010010101010100010011110000001111001010101 1101010010101010101000101001010101010001001111000000111100101010 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011
  7. 7. The current data access landscape <ul><li>Defined interfaces </li></ul><ul><ul><li>OCI, ct-lib, etc. </li></ul></ul><ul><ul><li>ODBC </li></ul></ul><ul><ul><li>JDBC </li></ul></ul><ul><ul><li>ADO.NET </li></ul></ul><ul><ul><li>OLE DB </li></ul></ul><ul><li>Interfaces have evolved – ground breaking changes are not functional capabilities </li></ul><ul><li>All of these interfaces do roughly do the same thing </li></ul><ul><ul><li>Provide APIs to connect to data sources, issue queries, return data, etc. </li></ul></ul><ul><ul><li>Reuse legacy business knowledge </li></ul></ul>
  8. 8. Data access in traditional application architectures MySQL
  9. 9. Data access in the real world Oracle MySQL MS SQL Server DB2 / z/OS business logic
  10. 10. Agenda <ul><li>Where are we today? </li></ul><ul><ul><li>SOA </li></ul></ul><ul><ul><li>Data access </li></ul></ul><ul><li>Data access problems in SOA environments </li></ul><ul><li>Best practices for data access in SOA environments </li></ul><ul><li>What does the future hold? </li></ul>
  11. 11. Data access in a typical SOA architecture MySQL
  12. 12. What problems does this cause for SOA environments? <ul><li>Performance / scalability requirements underachieved </li></ul><ul><ul><li>“Best in class”/reusable services initially designed for 50 users might be deployed in a SOA environment with 500 users </li></ul></ul><ul><ul><li>Lack of understanding of the mechanics of data access </li></ul></ul><ul><li>Deployment slowdowns </li></ul><ul><ul><li>A small deployment headache quickly becomes a huge snafu as the number of services increases </li></ul></ul><ul><ul><li>Services typically built in a DBMS-centric fashion, limiting reusability </li></ul></ul><ul><li>Higher system TCO </li></ul><ul><ul><li>Reducing heterogeneity is time-consuming and difficult </li></ul></ul><ul><ul><li>Consolidation works only if identical or better performance can be achieved </li></ul></ul>
  13. 13. Why does this happen? <ul><li>Starting with what is easiest / most comfortable </li></ul><ul><ul><li>What works for MySQL may not be right for other data sources (and vice-versa) </li></ul></ul><ul><li>Data access is usually an afterthought or checklist item </li></ul><ul><ul><li>“SOA experts” provide SOA guidelines – not data architects </li></ul></ul><ul><li>“SOA-enablement” = expose applications as web services </li></ul><ul><li>… over the traditional data access model </li></ul><ul><ul><li>Tightly coupled </li></ul></ul><ul><ul><li>Complex State Machine </li></ul></ul><ul><ul><li>Mostly synchronous </li></ul></ul><ul><ul><li>Connection based </li></ul></ul><ul><ul><li>Well defined API </li></ul></ul><ul><ul><li>Relational model driven </li></ul></ul><ul><ul><ul><li>SELECT then Fetch model </li></ul></ul></ul><ul><li>SOA presents a very different approach…. </li></ul><ul><ul><li>Loosely coupled </li></ul></ul><ul><ul><li>Stateless </li></ul></ul><ul><ul><li>Synchronous / Asynchronous </li></ul></ul><ul><ul><li>Message based </li></ul></ul><ul><ul><li>XML data interchange </li></ul></ul><ul><ul><li>“ RPC” model </li></ul></ul>
  14. 14. Agenda <ul><li>Where are we today? </li></ul><ul><ul><li>SOA </li></ul></ul><ul><ul><li>Data access </li></ul></ul><ul><li>Data access problems in SOA environments </li></ul><ul><li>Solving the problems </li></ul><ul><li>What does the future hold? </li></ul>
  15. 15. How can these problems be solved? <ul><li>Best Practices for data access in a SOA environment: </li></ul><ul><li>Decouple business logic and data access logic </li></ul><ul><li>Optimize the use of heterogeneous environments </li></ul><ul><li>Addressing persistent data access performance problems </li></ul><ul><li>Streamline data access with data integration techniques </li></ul>
  16. 16. 1. Decouple data access logic from business logic <ul><li>Can be done today with any standards-based data access </li></ul><ul><ul><li>Use ODBC, JDBC, ADO.NET, or any other API </li></ul></ul><ul><ul><li>Multiple technologies exist to facilitate this architecture today </li></ul></ul><ul><li>Leverage and focus skills of existing developers </li></ul><ul><ul><li>Allows application developers to focus on application development </li></ul></ul><ul><ul><li>Leaves data access in the hands of the data access experts </li></ul></ul><ul><ul><li>Applications built faster and better </li></ul></ul><ul><li>Selection of the right database middleware is essential for success </li></ul><ul><ul><li>Build all applications with a strong foundation in data access </li></ul></ul><ul><ul><li>“A chain is only as strong as its weakest link” </li></ul></ul>
  17. 17. Consider changing this approach… Data Access layer Shipping Application Invoicing Application Contracts Application MySQL
  18. 18. …to this approach: a Data Access Layer Data Access Layer ODBC, JDBC, ADO.NET, etc. MySQL Shipping Application Invoicing Application Contracts Application
  19. 19. Key to building a successful Data Access Layer <ul><li>High quality database middleware </li></ul><ul><li>Reliability </li></ul><ul><li>Consistency across data sources </li></ul><ul><li>High performance & scalability </li></ul><ul><li>True conformance to standards </li></ul><ul><li>Robust feature and functionality support </li></ul>
  20. 20. What about SOA environments? MySQL
  21. 21. From Data Access Layer to Data Access Service <ul><li>It is possible to “SOA-enable” the data access layer </li></ul><ul><ul><li>In a SOA environment, the data access layer becomes a data access service </li></ul></ul><ul><ul><li>Services can now access data presented as a web service </li></ul></ul><ul><li>Avoid accessing data directly inside every service </li></ul><ul><ul><li>Forces business logic experts to become data access experts </li></ul></ul><ul><ul><li>Results in extremely complicated deployment scenarios </li></ul></ul><ul><ul><li>Reduces scalability and performance </li></ul></ul><ul><li>One of the reasons to adopt SOA is to share “best in class” services across a set of applications </li></ul><ul><ul><li>Accessing data in an optimized manner IS a “best in class” service </li></ul></ul><ul><li>A data access service is “best in class”, scalable, easy to deploy, and reusable </li></ul>
  22. 22. 2. Optimize the use of heterogeneous environments <ul><li>Tendency to reduce complexity by standardizing on as few environments/data sources as we can imagine </li></ul><ul><ul><li>Typically on those environments/data sources we know best or offer the lowest TCO </li></ul></ul><ul><li>Consolidation is often seen as a way to cut IT costs </li></ul><ul><ul><li>But many IT flexibility problems start because of unforeseen narrowness in the consolidated architecture </li></ul></ul><ul><ul><li>These problems waste many of the cost savings of consolidation </li></ul></ul><ul><li>Optimizing can help minimize consolidation pain </li></ul><ul><ul><li>Reliability of new, consolidated architecture </li></ul></ul><ul><ul><li>Difficulty achieving identical or better performance </li></ul></ul><ul><ul><li>Inconsistency of implementation due to slight differences in data source capabilities </li></ul></ul><ul><ul><li>Higher, rather than lower, system TCO </li></ul></ul>
  23. 23. Don’t reduce complexity just for the sake of doing so Oracle Data Access Layer OCI Shipping Application Invoicing Application Contracts Application
  24. 24. SOA environments can handle heterogeneity if data access is decoupled Oracle MySQL MS SQL Server DB2 / z/OS business logic
  25. 25. Optimization vs. Consolidation? <ul><li>First question – does the existing system work? </li></ul><ul><li>If so, first strategy is to assume the SOA principle of ‘reuse’ should apply – in particular if the system is complex </li></ul><ul><ul><li>Migrating and consolidating a complex working system onto an alternative system will cost orders of magnitude more than you think it will </li></ul></ul><ul><ul><li>Most “unsolvable” problems will be encountered only after you are in the details or are at deployment time </li></ul></ul><ul><li>If consolidation seems to be the answer, assume that achieving identical performance is the first goal and benchmark* extensively before agreeing to consolidate </li></ul>
  26. 26. 3. Addressing persistent data access performance problems <ul><li>The SOA Data Access Service Lifecycle: </li></ul><ul><li>Design Database Schema (tables, partitions, indexes, etc) </li></ul><ul><li>Design architecture of the application framework </li></ul><ul><li>Design individual applications/services </li></ul><ul><li>Build/Test/Deploy individual applications/services </li></ul><ul><li>Load Test </li></ul><ul><li>Panic: performance is not acceptable – how do I fix it? </li></ul>
  27. 27. Data access code must be written well to avoid performance bottlenecks <ul><li>Standards-based APIs provide numerous ways to do the exact same thing </li></ul><ul><li>Documentation and coding guidelines that address performance are difficult to find </li></ul><ul><ul><li>Even if found, they may be too general to be helpful </li></ul></ul><ul><li>Bad coding techniques account for many of the data access performance problems people encounter </li></ul><ul><li>Education is the key to avoiding some of the most common, yet avoidable blunders </li></ul><ul><ul><li>Simple techniques can improve performance by > 100% </li></ul></ul>
  28. 28. Example: Calling a Stored Procedure <ul><li>Examine every API call … example below performs well over 100% faster </li></ul><ul><li>“ {call getMikesBeerInventory ( </li></ul><ul><li>‘ Hellbender Barleywine’, </li></ul><ul><li>‘ Pisgah Brewing’, </li></ul><ul><li>2008)}” </li></ul><ul><li>or </li></ul><ul><li>“ {call getMikesBeerInventory (?, ?, ?)}” </li></ul>
  29. 29. Understand the lifecycle of solving data access performance problems <ul><li>The “bottleneck” will start in the database </li></ul><ul><ul><li>Design an efficient schema and tune the database </li></ul></ul><ul><li>The “bottleneck” will move to the application or service </li></ul><ul><ul><li>Understand the performance issues surrounding database middleware and then design/tune performance-aware data access code </li></ul></ul><ul><li>The “bottleneck” will shift to your data access middleware </li></ul><ul><ul><li>Choose database middleware that can be tuned with runtime tuning options </li></ul></ul><ul><ul><li>Adjust those options to match your application and environment </li></ul></ul>
  30. 30. How database middleware works conceptually
  31. 31. What’s really going on?
  32. 32. Database middleware can make a difference in terms of throughput
  33. 33. Database middleware can determine how well an application or service will scale
  34. 34. 4. Streamline data access with data integration techniques <ul><li>Most SOA environments begin with simple services doing simple things </li></ul><ul><ul><li>Looking up an order using an order id </li></ul></ul><ul><li>As the environment expands and the comfort level increases, the complexity of services increases </li></ul><ul><ul><li>Retrieve an incoming EDI order, validate client information in internal system and retrieve customer number, place order in another internal system using customer number, generate and send receipt back to client via EDI </li></ul></ul><ul><ul><li>Now “accessing” several data sources in a single service, an EDI feed, a data source that stores the client information, a data source where the order is placed, and then another EDI request to send a response </li></ul></ul>
  35. 35. A typical SOA-based data integration problem The user submits a request for a report about their stock holdings The web server needs to fetch user’s personal data, stock holdings and live stock data to compile a report to send back to the user A public service offers live (delayed) stock prices
  36. 36. Some obvious pieces … MySQL
  37. 37. Solve complex data integration problems with XQuery XQJ + XQuery Implementation MySQL
  38. 38. Advanced services require multiple operations to access data <ul><li>The overhead involved to sequentially process data inside services is extensive </li></ul><ul><ul><li>At some point, data is usually marshaled to/from an XML format </li></ul></ul><ul><ul><li>Data must be transformed from one data model (XML for example) to another (relational for example) </li></ul></ul><ul><ul><li>Code must be written to do these transformations of data </li></ul></ul><ul><ul><li>Multiple invocations of data access services are needed to fulfill the request </li></ul></ul><ul><li>Thinking differently, it is possible to design to integrate the data using XQuery instead of sequentially access the different data stores </li></ul>
  39. 39. Why integrate data with XQuery? <ul><li>Simplifies coding </li></ul><ul><li>Encapsulates business logic and data integration logic into a single step </li></ul><ul><li>Improves performance </li></ul><ul><ul><li>No marshalling/unmarshalling of data </li></ul></ul><ul><ul><li>Optimized access to data </li></ul></ul><ul><ul><li>Optimized joining/integration of data </li></ul></ul>
  40. 40. Agenda <ul><li>Where are we today? </li></ul><ul><ul><li>SOA </li></ul></ul><ul><ul><li>Data access </li></ul></ul><ul><li>Data access problems in SOA environments </li></ul><ul><li>Solving the problems </li></ul><ul><li>What does the future hold? </li></ul>
  41. 41. What does the future hold for data access in SOA environments? <ul><li>Emerging standards will transform data access services into robust data application services (DAS) </li></ul><ul><li>Organizations will begin to regard implementation of a DAS as key to their IT infrastructure </li></ul><ul><li>Database vendors and third party ISVs will begin to compete at offering a complete DAS solution </li></ul><ul><ul><li>Some are already offer solutions that are just a layer on top of existing database middleware components (some low-quality) </li></ul></ul><ul><ul><li>Since DAS represents a new abstraction layer, it makes more sense to optimize the connectivity between the DAS and back-end data sources </li></ul></ul><ul><li>High quality DAS implementations will allow organizations to maximize their SOA investment </li></ul>
  42. 42. What sorts of standards? <ul><li>SDO (Service Data Objects) </li></ul><ul><ul><li>Unified and consistent data access to heterogeneous data sources </li></ul></ul><ul><ul><li>Simplified programming model for application programmers </li></ul></ul><ul><ul><li>Enables SOA-enabled applications and services to work consistently across heterogeneous data sources </li></ul></ul><ul><li>SDO is an emerging standard that can form the foundation for a DAS solution </li></ul><ul><ul><li>Supported by IBM, BEA, Oracle, SAP, Sybase and... </li></ul></ul><ul><ul><li>Version 2 of the specification has been released with implementations in C++, Java, Perl, .NET, and… </li></ul></ul><ul><ul><li>Large standards group run through OASIS </li></ul></ul><ul><li>Other standards and specifications </li></ul>
  43. 43. The SOA vision… 11010100101010101010001010010101010100010011110000001111001010101 11010100101010101010001010010101010100010011110000001111001010101 1101010010101010101000101001010101010001001111000000111010001110101011010100111010101000101010100011010100110101011101001101010010101110100100111001001101 11010100101010101010001010010101010100010011110000001111001010101 11010100101010101010001010010101010100010011110000001111001010101 11010100101010101010001010010101010100010011110000001111001010101 1101010010101010101000101001010101010001001111000000111100101010 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 101010001010110111010101000001010110101111011000101000010011001010111010100101001010111100100101010110010100011010101000101011011101010100000101011010111101100010100001001100101011 Data Application Service combined with DAS
  44. 44. What should you do? <ul><li>Make data access a first class citizen of any SOA environment </li></ul><ul><li>Don’t wait for “magic beans” to build your data access environment the right way - apply the Best Practices explained here today </li></ul><ul><ul><li>Decouple business logic and data access logic </li></ul></ul><ul><ul><li>Optimize the use of heterogeneous environments </li></ul></ul><ul><ul><li>Addressing persistent data access performance problems </li></ul></ul><ul><ul><li>Streamline data access with data integration techniques </li></ul></ul><ul><li>Keep an eye on emerging standards that can form the foundation of a complete data services solution </li></ul>
  45. 45. Questions?

×