Every long-term IT project reaches a point when one or more fundamental concepts that define the whole system are no longer true. If the business is lucky, this may lead to a brand new development project. If not, the current system must be altered to support requirements for which it was never designed. This presentation discusses how to mitigate possible design-time risks using available technologies and concepts from a database perspective, such as repository-based solutions, code generators, abstract models, micro-SOA, etc. The presentation will also cover real-life examples of best practices for handling unexpected architectural shifts based on systems with 10+ years of life span.
Based on my observations, in IT we suffer from continuous collective amnesia and we are even proud of it.
For at least 50 years meanwhile, we struggle how to build systems, that are easy to understand, to maintain, to change and to operate in a reliable way. Each time we hit the wall again, we start to look for a new silver bullet on the horizon, strongly believing that it will solve the problem for good.
The key word is "new": "New" is good in our community, while "old" is bad, worthless, crap. We suffer from youthism, not only in recruiting, but in all areas. This way we discard any "old" knowledge, no matter if it is valuable or not. We separate by age, not by value.
Additionally we continuously lose our collective memory with every new generation that leaves university as they are also taught not to value anything old and instead only look for the new, shiny stuff.
While not all old knowledge is worth being preserved, admittedly, there is still a lot of valuable old knowledge available, offering answers to the problems that we face today - creating maintainable and reliable systems, dealing with distribution and tackling complexity, just to name a few of the challenges.
This presentation is a journey through some (very) old computer science papers that contain a lot of very valuable knowledge regarding the problems we face today. For each of the papers, some of the key ideas are presented and how they address our current challenges.
Of course, the voice track is missing and there are a lot more papers that would be worth being mentioned in this presentation. Still, I hope that also the slides alone will be of some value for you - and convince you a bit that not everything "old" in IT is automatically worthless ... ;)
The document provides recipes for building CQRS architectures. It begins with an introduction and agenda. Lesson 1 discusses a basic layered architecture, noting its limitations in scalability and evolvability. Lesson 2 introduces n-layered architecture with dependency injection to improve decoupling but it also has scalability issues. Lesson 3 explains the Command Query Responsibility Segregation (CQRS) pattern, separating read and write operations for improved scalability and flexibility. It provides code examples of implementing CQRS. The document aims to help architects evolve monolithic systems to more scalable and maintainable architectures.
Big Data is changing abruptly, and where it is likely headingPaco Nathan
Big Data technologies are changing rapidly due to shifts in hardware, data types, and software frameworks. Incumbent Big Data technologies do not fully leverage newer hardware like multicore processors and large memory spaces, while newer open source projects like Spark have emerged to better utilize these resources. Containers, clouds, functional programming, databases, approximations, and notebooks represent significant trends in how Big Data is managed and analyzed at large scale.
No more Three Tier - A path to a better code for Cloud and AzureMarco Parenzan
Three Tier is no more a model for Cloud and in general Scalable Web Applications. Scaffolding from SQL Database is, sure, the worst way to do. A road to do this is changing modeling activity, from scaffolded DB model to Command/DTO model, through ViewModel pattern. Command and DTOs are pillars of CQRS model.
The document discusses the layered architecture pattern, one of the most common software architecture patterns. It describes the key aspects of the pattern, including that components are organized into horizontal layers with each layer performing a specific role. Most layered architectures consist of presentation, business, persistence, and database layers. The pattern emphasizes separation of concerns between layers and isolation of changes through the use of closed layers. It provides an example of how a request for customer information would flow through the layers. Considerations for using this pattern include the potential for an "architecture sinkhole" if most requests involve simple passing between layers without logic.
The document summarizes the layered architecture pattern, one of the most common software architecture patterns. It describes the key aspects of the pattern, including how it organizes components into horizontal layers with specific roles and responsibilities. Each layer forms an abstraction and the layers are closed, meaning requests must pass through each lower layer. This isolates changes and keeps layers independent. The document provides an example of how a request flows through the layers and considerations for using this pattern.
Based on my observations, in IT we suffer from continuous collective amnesia and we are even proud of it.
For at least 50 years meanwhile, we struggle how to build systems, that are easy to understand, to maintain, to change and to operate in a reliable way. Each time we hit the wall again, we start to look for a new silver bullet on the horizon, strongly believing that it will solve the problem for good.
The key word is "new": "New" is good in our community, while "old" is bad, worthless, crap. We suffer from youthism, not only in recruiting, but in all areas. This way we discard any "old" knowledge, no matter if it is valuable or not. We separate by age, not by value.
Additionally we continuously lose our collective memory with every new generation that leaves university as they are also taught not to value anything old and instead only look for the new, shiny stuff.
While not all old knowledge is worth being preserved, admittedly, there is still a lot of valuable old knowledge available, offering answers to the problems that we face today - creating maintainable and reliable systems, dealing with distribution and tackling complexity, just to name a few of the challenges.
This presentation is a journey through some (very) old computer science papers that contain a lot of very valuable knowledge regarding the problems we face today. For each of the papers, some of the key ideas are presented and how they address our current challenges.
Of course, the voice track is missing and there are a lot more papers that would be worth being mentioned in this presentation. Still, I hope that also the slides alone will be of some value for you - and convince you a bit that not everything "old" in IT is automatically worthless ... ;)
The document provides recipes for building CQRS architectures. It begins with an introduction and agenda. Lesson 1 discusses a basic layered architecture, noting its limitations in scalability and evolvability. Lesson 2 introduces n-layered architecture with dependency injection to improve decoupling but it also has scalability issues. Lesson 3 explains the Command Query Responsibility Segregation (CQRS) pattern, separating read and write operations for improved scalability and flexibility. It provides code examples of implementing CQRS. The document aims to help architects evolve monolithic systems to more scalable and maintainable architectures.
Big Data is changing abruptly, and where it is likely headingPaco Nathan
Big Data technologies are changing rapidly due to shifts in hardware, data types, and software frameworks. Incumbent Big Data technologies do not fully leverage newer hardware like multicore processors and large memory spaces, while newer open source projects like Spark have emerged to better utilize these resources. Containers, clouds, functional programming, databases, approximations, and notebooks represent significant trends in how Big Data is managed and analyzed at large scale.
No more Three Tier - A path to a better code for Cloud and AzureMarco Parenzan
Three Tier is no more a model for Cloud and in general Scalable Web Applications. Scaffolding from SQL Database is, sure, the worst way to do. A road to do this is changing modeling activity, from scaffolded DB model to Command/DTO model, through ViewModel pattern. Command and DTOs are pillars of CQRS model.
The document discusses the layered architecture pattern, one of the most common software architecture patterns. It describes the key aspects of the pattern, including that components are organized into horizontal layers with each layer performing a specific role. Most layered architectures consist of presentation, business, persistence, and database layers. The pattern emphasizes separation of concerns between layers and isolation of changes through the use of closed layers. It provides an example of how a request for customer information would flow through the layers. Considerations for using this pattern include the potential for an "architecture sinkhole" if most requests involve simple passing between layers without logic.
The document summarizes the layered architecture pattern, one of the most common software architecture patterns. It describes the key aspects of the pattern, including how it organizes components into horizontal layers with specific roles and responsibilities. Each layer forms an abstraction and the layers are closed, meaning requests must pass through each lower layer. This isolates changes and keeps layers independent. The document provides an example of how a request flows through the layers and considerations for using this pattern.
The document summarizes the layered architecture pattern, one of the most common software architecture patterns. It describes the key aspects of the pattern, including how it organizes components into horizontal layers with specific roles and responsibilities. Each layer forms an abstraction and the layers are closed, meaning requests must pass through each lower layer. This isolates changes and keeps layers independent. The document provides an example of how a request flows through the layers and considerations for using this pattern.
Tony Bibbs presented on frameworks for PHP development. He discussed when frameworks should and should not be used, common risks of frameworks, and typical framework components like MVC, ORM, templates. His key recommendation was to only change one component of a framework at a time through incremental improvements.
This document summarizes a guest lecture at UNSW about contemporary software challenges and solutions. It discusses how technology can provide a competitive advantage if developed properly. It presents case studies of legacy systems that were difficult to change and scale, as well as examples of systems that used newer architectures like microservices. The lecture promotes approaches like test-driven development, REST, and self-organizing teams to build independent, scalable services.
The document provides an overview of technologies that are useful for startups. It discusses what a startup is, stages of startup development, product evolution and life cycles, tech stacks, databases, programming languages, and server-side frameworks. The key considerations when choosing technologies include problem fit, performance, productivity, scalability, and maturity of the software/framework. Relational databases are generally the best default option, and other data stores like NoSQL should only be considered if relational databases cannot meet the needed scale.
hints for computer system design by Butler Lampsonmustafa sarac
This document provides hints for designing successful computer systems based on the author's experience designing and studying various systems. Some key hints discussed are: (1) Keep interfaces and abstractions simple by doing one thing well and avoiding unnecessary generalizations, (2) Separate normal and worst-case functionality to improve performance for common cases, and (3) Make actions atomic and use logging to update state to improve fault tolerance and reliability. The hints are illustrated with examples ranging from hardware to operating systems to applications.
New software ecosystems like cloud, cyber-physical systems provide opportunities but also risks. Case studies show issues like difficult access control in private clouds, significant effort in migrating systems to private clouds, challenges doing forensics in public clouds. Performance can be highly sensitive to specifics and vendors overpromise. Connecting systems over the internet increases vulnerabilities. Expectations for reliability are increasing but quality varies greatly. Focus should be on minimizing unintended consequences, building security from the start, and reducing variability for critical systems like cyber-physical.
The document discusses the origins of software engineering as a discipline. It summarizes discussions from a conference in 1968 where the term "software engineering" was first used. Key points discussed included that testing is best done iteratively during design rather than after, that small groups tend to be more successful than large groups on software projects, and that an organizational structure is needed for communication and decision making in large groups. The document also discusses criticisms of the "waterfall" development model and advocates for an iterative approach.
Developer workflow analysis and ownership management present comprehension challenges for software ecosystems and global software engineering. Dark matter exists because tools are not fully integrated, logging is not designed for analysis, and developer workflow is unstructured. Probabilistic models using machine learning and heuristics can help associate activities with work items to address this. Ownership management challenges include ownership decay, asset subclassing, team-level ownership, and providing explainable recommendations.
From Agile Development to Agile Operations (QCon SF 2009)Stuart Charlton
From Agile Development to Agile Operations discusses how cloud computing is changing the relationship between development and operations. It suggests design goals for cloud technology to better integrate application design, development, and operations. These include separating applications from infrastructure, enabling computer-assisted design and operations through machine reasoning, and improving collaboration between teams. The document also characterizes an integrated approach with distributed control, open documentation describing systems, model-driven practices, goal-driven specifications, viewpoint-based modeling, collaboration, and governance.
Tech challenges in a large scale agile projectHarald Soevik
1. The document discusses three major technical challenges faced in a large-scale Java project that adopted Scrum methodology: modularization, testing environments, and declaratively representing domain knowledge.
2. For modularization, the project struggled with creating an optimal structure that balanced complexity, coupling, and cohesion across modules. Testing multiple environments provided benefits but also challenges in maintenance and automation.
3. Representing domain knowledge declaratively aimed to separate knowledge from implementation, but specific issues are not discussed in the summary due to a missing portion of the original text.
Slides presented at MODEVAR 2024 co-located with VaMoS 2024: https://modevar.github.io/program/ Thanks to Jessie Galasso and Chico Sundermann for the invitation Abstract: "Variability models (e.g., feature models) are widely considered in software engineering research and practice, in order to develop software product lines, configurable systems, generators, or adaptive systems. Numerous success stories of variability models have been reported in different domains (e.g., automotive, aerospace, avionics) and the applicability broadens. However, the use of variability models is not yet universally adopted… Why? Some examples: variability models are not continuously extracted from projects and artefacts; each time a variability model is used, its expressiveness and language should be specialized; learning-based models are decoupled from variability models; modeling software variability should cover different layers and their interactions, etc. The list is arguably opinionated, incomplete, and based on my own practical experience, but also on observations of existing works. I will give 24 reasons to occupy your day as a researcher or practitioner in the field of variability modeling."
Slides: https://github.com/acherm/24RWVMANYU-VaMoS-MODEVAR/blob/main/vamos2024.md (Markdown content) PDF: https://github.com/acherm/24RWVMANYU-VaMoS-MODEVAR/blob/main/VaMoS2024-MODEVAR.pdf (slides in PDF format)
Computer systems are broken from top to bottom due to changing requirements, stakeholders, resources, and environments over long projects. Technical debt grows non-linearly with large, complex projects that develop inertia. Diversity in technologies, languages, and architectures emerges from solving different problems, but also introduces maintenance issues. Well-designed software strives for minimal and simple APIs between components to reduce complexity. Craftsmanship requires focusing effort where it matters most through autonomous engineering practices, careful API design, and right-sizing architectural components for agility and maintainability.
The document discusses the concept of premature optimization and how it can be counterproductive. It defines optimization as procedures used to make a system as effective as possible, especially mathematical techniques. While optimization is important, prematurely optimizing code before identifying bottlenecks can introduce bugs, waste time, and negatively impact design. The document recommends optimizing during design when possible and only optimizing code proven to be bottlenecks based on measurements. Premature optimization is identified as an anti-pattern that should generally be avoided 97% of the time.
To Microservice or Not to Microservice?Eran Stiller
This document discusses the benefits and drawbacks of monolithic architectures versus microservice architectures. It notes that while monoliths are simpler to develop initially, they become more complex and difficult to work with over time as features are added. Microservices break the application into smaller, independent services that are easier to maintain and upgrade independently. However, microservices introduce additional complexity related to distributed systems, increased latency, and coordination between services. The document advocates for microservices if the organization has experienced architects, rapid infrastructure provisioning, mature continuous integration/delivery processes, and an advanced DevOps culture to help manage the additional complexity.
Software Architecture for Agile DevelopmentHayim Makabee
Slides of a workshop given at Herzliya on June/2017, organized by ILTAM and IASA Israel. This workshop was dedicated to the topic of Software Architecture in the context of Agile Development. We answered the question: “How much Design Up Front should be done in an Agile project?” Hayim presented his approach of Adaptable Design Up Front (ADUF), describing its rationale, applications in practice and comparison to other approaches such as Emergent Design. He explained why adaptability is essential for the development of complex software systems using Agile methods. The concepts were illustrated through practical software architecture approaches such as micro-services and examples of real software systems that were developed in the past. The workshop also included an exercise on the definition and evolution of the design of an interesting system.
The theme for the 2015 LabMan Conference (held at UNT in Denton, TX) is sustainability, and this closing keynote presentation talks about sustaining your career.
My project complexity model -- one year after I initially had the idea. The purpose is to help Project Managers define what processes and techniques should be applied to their particular project. The model is coded and working, but "not ready for prime time."
The document discusses object-oriented design principles and patterns. It covers topics like encapsulation, inheritance, polymorphism, the open-closed principle (OCP), dependency inversion, and architectural patterns like layered architectures and domain-driven design. Examples are provided to illustrate concepts like dependency injection and inversion of control. The conclusion emphasizes applying principles pragmatically based on user needs while aiming for maintainable code.
Most modern computer applications include an “advanced search” screen that allows users to enter multiple criteria and parameters. Unfortunately, behind the scenes, this functionality can cause major headaches for implementing the back end, because the resulting queries may reference an unknown number of tables and/or columns and may return unknown numbers of rows. In addition, the results may mutate depending upon the parameters. There are multiple ways of solving this problem with various levels of efficiency. This presentation will demonstrate how to handle generic search functionality within an Oracle database by utilizing Dynamic SQL, object collections, and a bit of a creativity.
Managing Unstructured Data: Lobs in the World of JSONMichael Rosenblum
This document discusses managing unstructured JSON data in Oracle databases. It describes how a company initially stored JSON files in VARCHAR2 columns, but then the files grew larger than 4000 characters requiring a change to CLOB storage. This change caused issues until developers understood that CLOBs have different access, storage, and processing mechanisms compared to VARCHAR2. The document provides an overview of CLOB architecture including data access, internal storage, caching, logging, and indexing. It emphasizes that properly understanding CLOBs is important when storing and manipulating JSON data in Oracle databases.
More Related Content
Similar to Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2022)
The document summarizes the layered architecture pattern, one of the most common software architecture patterns. It describes the key aspects of the pattern, including how it organizes components into horizontal layers with specific roles and responsibilities. Each layer forms an abstraction and the layers are closed, meaning requests must pass through each lower layer. This isolates changes and keeps layers independent. The document provides an example of how a request flows through the layers and considerations for using this pattern.
Tony Bibbs presented on frameworks for PHP development. He discussed when frameworks should and should not be used, common risks of frameworks, and typical framework components like MVC, ORM, templates. His key recommendation was to only change one component of a framework at a time through incremental improvements.
This document summarizes a guest lecture at UNSW about contemporary software challenges and solutions. It discusses how technology can provide a competitive advantage if developed properly. It presents case studies of legacy systems that were difficult to change and scale, as well as examples of systems that used newer architectures like microservices. The lecture promotes approaches like test-driven development, REST, and self-organizing teams to build independent, scalable services.
The document provides an overview of technologies that are useful for startups. It discusses what a startup is, stages of startup development, product evolution and life cycles, tech stacks, databases, programming languages, and server-side frameworks. The key considerations when choosing technologies include problem fit, performance, productivity, scalability, and maturity of the software/framework. Relational databases are generally the best default option, and other data stores like NoSQL should only be considered if relational databases cannot meet the needed scale.
hints for computer system design by Butler Lampsonmustafa sarac
This document provides hints for designing successful computer systems based on the author's experience designing and studying various systems. Some key hints discussed are: (1) Keep interfaces and abstractions simple by doing one thing well and avoiding unnecessary generalizations, (2) Separate normal and worst-case functionality to improve performance for common cases, and (3) Make actions atomic and use logging to update state to improve fault tolerance and reliability. The hints are illustrated with examples ranging from hardware to operating systems to applications.
New software ecosystems like cloud, cyber-physical systems provide opportunities but also risks. Case studies show issues like difficult access control in private clouds, significant effort in migrating systems to private clouds, challenges doing forensics in public clouds. Performance can be highly sensitive to specifics and vendors overpromise. Connecting systems over the internet increases vulnerabilities. Expectations for reliability are increasing but quality varies greatly. Focus should be on minimizing unintended consequences, building security from the start, and reducing variability for critical systems like cyber-physical.
The document discusses the origins of software engineering as a discipline. It summarizes discussions from a conference in 1968 where the term "software engineering" was first used. Key points discussed included that testing is best done iteratively during design rather than after, that small groups tend to be more successful than large groups on software projects, and that an organizational structure is needed for communication and decision making in large groups. The document also discusses criticisms of the "waterfall" development model and advocates for an iterative approach.
Developer workflow analysis and ownership management present comprehension challenges for software ecosystems and global software engineering. Dark matter exists because tools are not fully integrated, logging is not designed for analysis, and developer workflow is unstructured. Probabilistic models using machine learning and heuristics can help associate activities with work items to address this. Ownership management challenges include ownership decay, asset subclassing, team-level ownership, and providing explainable recommendations.
From Agile Development to Agile Operations (QCon SF 2009)Stuart Charlton
From Agile Development to Agile Operations discusses how cloud computing is changing the relationship between development and operations. It suggests design goals for cloud technology to better integrate application design, development, and operations. These include separating applications from infrastructure, enabling computer-assisted design and operations through machine reasoning, and improving collaboration between teams. The document also characterizes an integrated approach with distributed control, open documentation describing systems, model-driven practices, goal-driven specifications, viewpoint-based modeling, collaboration, and governance.
Tech challenges in a large scale agile projectHarald Soevik
1. The document discusses three major technical challenges faced in a large-scale Java project that adopted Scrum methodology: modularization, testing environments, and declaratively representing domain knowledge.
2. For modularization, the project struggled with creating an optimal structure that balanced complexity, coupling, and cohesion across modules. Testing multiple environments provided benefits but also challenges in maintenance and automation.
3. Representing domain knowledge declaratively aimed to separate knowledge from implementation, but specific issues are not discussed in the summary due to a missing portion of the original text.
Slides presented at MODEVAR 2024 co-located with VaMoS 2024: https://modevar.github.io/program/ Thanks to Jessie Galasso and Chico Sundermann for the invitation Abstract: "Variability models (e.g., feature models) are widely considered in software engineering research and practice, in order to develop software product lines, configurable systems, generators, or adaptive systems. Numerous success stories of variability models have been reported in different domains (e.g., automotive, aerospace, avionics) and the applicability broadens. However, the use of variability models is not yet universally adopted… Why? Some examples: variability models are not continuously extracted from projects and artefacts; each time a variability model is used, its expressiveness and language should be specialized; learning-based models are decoupled from variability models; modeling software variability should cover different layers and their interactions, etc. The list is arguably opinionated, incomplete, and based on my own practical experience, but also on observations of existing works. I will give 24 reasons to occupy your day as a researcher or practitioner in the field of variability modeling."
Slides: https://github.com/acherm/24RWVMANYU-VaMoS-MODEVAR/blob/main/vamos2024.md (Markdown content) PDF: https://github.com/acherm/24RWVMANYU-VaMoS-MODEVAR/blob/main/VaMoS2024-MODEVAR.pdf (slides in PDF format)
Computer systems are broken from top to bottom due to changing requirements, stakeholders, resources, and environments over long projects. Technical debt grows non-linearly with large, complex projects that develop inertia. Diversity in technologies, languages, and architectures emerges from solving different problems, but also introduces maintenance issues. Well-designed software strives for minimal and simple APIs between components to reduce complexity. Craftsmanship requires focusing effort where it matters most through autonomous engineering practices, careful API design, and right-sizing architectural components for agility and maintainability.
The document discusses the concept of premature optimization and how it can be counterproductive. It defines optimization as procedures used to make a system as effective as possible, especially mathematical techniques. While optimization is important, prematurely optimizing code before identifying bottlenecks can introduce bugs, waste time, and negatively impact design. The document recommends optimizing during design when possible and only optimizing code proven to be bottlenecks based on measurements. Premature optimization is identified as an anti-pattern that should generally be avoided 97% of the time.
To Microservice or Not to Microservice?Eran Stiller
This document discusses the benefits and drawbacks of monolithic architectures versus microservice architectures. It notes that while monoliths are simpler to develop initially, they become more complex and difficult to work with over time as features are added. Microservices break the application into smaller, independent services that are easier to maintain and upgrade independently. However, microservices introduce additional complexity related to distributed systems, increased latency, and coordination between services. The document advocates for microservices if the organization has experienced architects, rapid infrastructure provisioning, mature continuous integration/delivery processes, and an advanced DevOps culture to help manage the additional complexity.
Software Architecture for Agile DevelopmentHayim Makabee
Slides of a workshop given at Herzliya on June/2017, organized by ILTAM and IASA Israel. This workshop was dedicated to the topic of Software Architecture in the context of Agile Development. We answered the question: “How much Design Up Front should be done in an Agile project?” Hayim presented his approach of Adaptable Design Up Front (ADUF), describing its rationale, applications in practice and comparison to other approaches such as Emergent Design. He explained why adaptability is essential for the development of complex software systems using Agile methods. The concepts were illustrated through practical software architecture approaches such as micro-services and examples of real software systems that were developed in the past. The workshop also included an exercise on the definition and evolution of the design of an interesting system.
The theme for the 2015 LabMan Conference (held at UNT in Denton, TX) is sustainability, and this closing keynote presentation talks about sustaining your career.
My project complexity model -- one year after I initially had the idea. The purpose is to help Project Managers define what processes and techniques should be applied to their particular project. The model is coded and working, but "not ready for prime time."
The document discusses object-oriented design principles and patterns. It covers topics like encapsulation, inheritance, polymorphism, the open-closed principle (OCP), dependency inversion, and architectural patterns like layered architectures and domain-driven design. Examples are provided to illustrate concepts like dependency injection and inversion of control. The conclusion emphasizes applying principles pragmatically based on user needs while aiming for maintainable code.
Similar to Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2022) (20)
Most modern computer applications include an “advanced search” screen that allows users to enter multiple criteria and parameters. Unfortunately, behind the scenes, this functionality can cause major headaches for implementing the back end, because the resulting queries may reference an unknown number of tables and/or columns and may return unknown numbers of rows. In addition, the results may mutate depending upon the parameters. There are multiple ways of solving this problem with various levels of efficiency. This presentation will demonstrate how to handle generic search functionality within an Oracle database by utilizing Dynamic SQL, object collections, and a bit of a creativity.
Managing Unstructured Data: Lobs in the World of JSONMichael Rosenblum
This document discusses managing unstructured JSON data in Oracle databases. It describes how a company initially stored JSON files in VARCHAR2 columns, but then the files grew larger than 4000 characters requiring a change to CLOB storage. This change caused issues until developers understood that CLOBs have different access, storage, and processing mechanisms compared to VARCHAR2. The document provides an overview of CLOB architecture including data access, internal storage, caching, logging, and indexing. It emphasizes that properly understanding CLOBs is important when storing and manipulating JSON data in Oracle databases.
Hidden Gems of Performance Tuning: Hierarchical Profiler and DML Trigger Opti...Michael Rosenblum
In any large ecosystem, there are always areas that stay in the twilight, outside of the public’s attention. This deep dive attempts to change the trend regarding two, at first glance, unrelated PL/SQL topics: hierarchical profiler (HProf) and database triggers. But if you look closer, there’s something in common: they’re significantly underused! HProf because nobody heard about it, database triggers because of decades-old stigma. Let’s put both of them back into our development toolset!
Part #1. One of the most critical FREE SQL and PL/SQL performance tuning tools is almost totally unknown! If you ask, how much time is spent on routine A? How often is function B called? Most developers would hand-code something instead of using the Oracle PL/SQL HProf. This isn’t because the provided functionality is disliked, but because developers aren’t aware of its existence! This presentation is an attempt to alter this trend and reintroduce HProf to a wider audience.
Part #2. There isn’t anything “evil” about database triggers; they just have to be used where they can actually solve problems. In this presentation, various kinds of triggers will be examined from a global system optimization view, including tradeoffs between multiple goals (e.g., depending upon the available hardware, developers can select either CPU-intensive or I/O-intensive solutions). This presentation will focus on the most common performance problems related to different kinds of DML triggers and the proper ways of resolving them.
Bringing Oracle databases to the cloud involves major tectonic shifts: (1) hardware resources are no longer static and (2) expense model is “pay-per-use”. Previously, as long as your current servers were surviving the workload, no one cared whether they were under-utilized. Now, this difference can be immediately monetized because the resource elasticity means that you can give it back. As a result, the total quality of the code base (+performance tuning) has a direct impact on cost. This presentation will share some of the corresponding best practices: code instrumentation, profiling, code management, resource optimization etc. Overall, you can make your system cloud-friendly, but doing so takes explicit effort and serious thinking!
This presentation is the attempt to switch sides and show code management from the developer's point of view. It stays outside of various VCS solutions and focuses on hands-on approaches: activity control via system triggers, conditional compilation, synonym manipulation, utilization of Edition-Based Redefinition (EBR).
The Hidden Face of Cost-Based Optimizer: PL/SQL Specific StatisticsMichael Rosenblum
Database statistics are not limited to tables, columns, and indexes. PL/SQL functions also have a number of associated statistics, namely costs (CPU, I/O, network), selectivity, and cardinality (for functions that return collections). These statistics have default values that only somewhat represent reality. However, these values are always used by Oracle's cost-based optimizer to build execution plans. This session uses real-life examples to illustrate how properly managed PL/SQL statistics can significantly improve executions plans. It also demonstrates that Oracle's extensible optimizer is flexible enough to support packaged functions.
When performance issues arise, developers often blame the database, while DBAs are quick to blame developers. If all else fails, the network is the culprit. Most systems have many parts managed by multiple entities within an organization. This session explores how to improve system quality by proper monitoring of user activity rather than server activity. Without an overall architectural approach to performance tuning, any aggregated statistics (CPU workload, communication speed, network latency, etc.) are meaningless unless you can explain to a user why a button click takes so much time. This session offers a coherent methodology for identifying performance issues, pinpointing common problem sources, and providing solutions.
This document provides an overview of different approaches to generating documents from a database, including client-side, middle-tier, and server-side approaches. It discusses existing tools like PL/JSON, PL/PDF, and IText that can be used for JSON, PDF, and document generation from PL/SQL. The document also provides code samples and discusses lessons learned from implementing document generation solutions in various projects.
The document discusses calling user-defined functions within SQL statements. It notes that functions may be called multiple times depending on the structure of the SQL statement. Functions in the SELECT and WHERE clauses of a query will be called independently for each row. Functions in an ORDER BY clause may also be called twice if an inline view or view is used due to query rewrite. The number of function calls can be tracked using a package to inspect execution.
The document discusses views in Oracle databases and how they have evolved beyond simple stored SQL queries. Views can now serve as an isolation layer between applications and tables, accept DML operations directly or through triggers, and include complex functionality through features like parameterized conditions, dynamic SQL, and INSTEAD OF triggers. The document outlines techniques for optimizing DML operations on views, such as using dynamic SQL to only update changed columns, and leveraging compound triggers for shared program logic. It also warns of performance issues that can arise from logical primary keys on views.
Data Tracking: On the Hunt for Information about Your DatabaseMichael Rosenblum
Behind the scenes, Oracle databases hide a myriad of processes to ensure that your data can be safely stored and retrieved. These processes also leave “tracks” (or they COULD leave tracks if you set them up properly). These tracks, together with application-specific data, create a complete representation of the system’s day-to-day activity. Too often this representation is lost at the DBA/Developer borderline, mostly because one side is not aware of the needs of the other. This presentation strives to bridge this gap. It focuses on key sources of database information and techniques that are useful for both DBAs and developers:
- Data Dictionary
- Oracle Logging
- Oracle Tracing
- Advanced code instrumentation
International Upcycling Research Network advisory board meeting 4Kyungeun Sung
Slides used for the International Upcycling Research Network advisory board 4 (last one). The project is based at De Montfort University in Leicester, UK, and funded by the Arts and Humanities Research Council.
Architectural and constructions management experience since 2003 including 18 years located in UAE.
Coordinate and oversee all technical activities relating to architectural and construction projects,
including directing the design team, reviewing drafts and computer models, and approving design
changes.
Organize and typically develop, and review building plans, ensuring that a project meets all safety and
environmental standards.
Prepare feasibility studies, construction contracts, and tender documents with specifications and
tender analyses.
Consulting with clients, work on formulating equipment and labor cost estimates, ensuring a project
meets environmental, safety, structural, zoning, and aesthetic standards.
Monitoring the progress of a project to assess whether or not it is in compliance with building plans
and project deadlines.
Attention to detail, exceptional time management, and strong problem-solving and communication
skills are required for this role.
Practical eLearning Makeovers for EveryoneBianca Woods
Welcome to Practical eLearning Makeovers for Everyone. In this presentation, we’ll take a look at a bunch of easy-to-use visual design tips and tricks. And we’ll do this by using them to spruce up some eLearning screens that are in dire need of a new look.
Explore the essential graphic design tools and software that can elevate your creative projects. Discover industry favorites and innovative solutions for stunning design results.
Managing the Earthquake: Surviving Major Database Architecture Changes (rev.2022)
1. 1 of 54
Managing the Earthquake:
Surviving Major Database Architecture
Changes
(rev.2022)
Michael Rosenblum
www.dulcian.com
2. 2 of 54
Who Am I? – “Misha”
Oracle ACE
Co-author of 3 books
PL/SQL for Dummies
Expert PL/SQL Practices
Oracle PL/SQL Performance Tuning Tips & Techniques
Known for:
SQL and PL/SQL tuning
Complex functionality
Code generators
Repository-based development
3. 3 of 54
Background (1)
Year 2011
I didn’t have any gray hair.
I had just published my second book.
I thought that I knew everything about database development.
I had been building IT systems for a WHOLE DECADE!
5. 5 of 54
Background (3)
Year 2022:
I am slowly starting to resemble Santa Claus.
I’ve become tired of publishing.
I recognize that knowing everything is impossible.
I have been building and maintaining IT systems at the same
company for TWO DECADES!
6. 6 of 54
Background (4)
Point of view:
Keeping systems alive for years teaches you a lot about good
vs. bad architectures.
… and you get a chance to learn from your own mistakes.
You recognize strategic vs. tactical trade-offs.
… and you get a chance to learn from your management mistakes.
7. 7 of 54
So…
“Managing the Earthquake” rev.2022:
1. Why bother?
2. Trends
3. Best practices
9. 9 of 54
Does anybody care?
Perfectly valid question:
Agile development is iterative by its nature.
DevOps is focused on continuous delivery
You (theoretically) should be able to rapidly adjust the system to
changes.
All startups want to deliver something new faster than anybody
else (i.e. what matters is V1)
10. 10 of 54
Yes, we do!
Reasons:
Changes are inevitable
… so, there will be V2,V3 etc.
Patience is a very rare virtue
… i.e. you will be constantly running against the clock.
Constraints:
Agile development works only sometimes
… and when it doesn’t work – the whole process is SLOW!
Efficient DevOps is hard to set up and is often limited in scope
… because data/data storage is the most critical IT asset.
11. 11 of 54
Reality Check
Time is limited
… otherwise you could just build something new every time.
Money is limited
… i.e. throwing more developers/hardware may help, but only
up to a point.
Predictability is limited
… i.e. you cannot protect yourself against “unknown
unknowns.”
13. 13 of 54
Known Unknowns (1)
We ARE going to “the cloud”
… but there are different “flavors” of cloud implementations
(each with its own limitations/features).
Architectural ramifications:
Different pricing mechanisms may require different
optimization patterns.
Platform-dependent features have to be vetted very carefully.
14. 14 of 54
Example
Case:
During final tests, clients were contemplating Amazon RDS as one
of the hosting options.
Impact:
At that time, RDS did not support Java within the database.
Solution:
Rewrite of Base64 encoding/decoding to become purely PL/SQL-
based.
Lesson learned:
Hosting decisions must be explicitly spelled out beforehand!
15. 15 of 54
Known Unknowns (2)
We ARE working with unstructured/semi-structured data
… but that data could be stored in a number of different forms
(within an Oracle DB/separate noSQL implementation)
Architectural ramifications:
Cheap short-term solutions may not scale.
Semi-structured data could mutate.
16. 16 of 54
Example
Case:
External provider suddenly decided to change communication
mechanism from XML to JSON and warned about potential internal
JSON changes in the future.
Impact:
Historical reporting became complicated.
Solution:
To protect existing functionality, extract key data elements out of
XML/JSON into a relational table.
Lesson learned:
If you have an API-driven system, it is better to have a platform-
independent isolation layer in-between.
17. 17 of 54
Known Unknowns (3)
You WILL be releasing the next version (sooner than you
expect)
… and somebody will have to do it.
Architectural ramifications:
Last 5% of requirements often take the most time.
Every system architect should have a clear path between IOC
and FOC.
Not delivering that last 5% could be a major contract breach.
18. 18 of 54
Example
Case:
One consulting company was “dragging their feet” for a couple of
years by partially implementing requirements. The company was
fired and eventually sued by the client.
Research:
I was involved as an expert and was able to prove that the provided
architecture was not capable of doing what was promised.
Impact:
The consulting company had a huge fine imposed and had to return
all of the money earned under that contract.
Lesson learned:
Cover-ups have a tendency to blow up!
20. 20 of 54
Personal Bragging - Story #1
United States Air Force Recruiting system
Initially built in 2003 – contract was just extended for another 5
years
Survived:
Shift from single component to multi-component structure
Absorption of various smaller Air Force services
Several internal Air Force hierarchy reorganizations
Transformation from app-based to browser-based
Architectural shifts in recruitment form maintenance
Migration from “on-premises” to “cloud”
23. 23 of 54
Why Data Modeling Matters
Database structure is the least agile part of the system:
It has to be flexible enough to absorb expected “small” changes.
It has to be generic enough to simplify “mid-level” changes.
The database is the most critical part of the whole system:
It has to be understandable enough to prevent inadvertent data
corruption.
It has to perform well enough for the expected workload.
24. 24 of 54
“Smart Columns” vs. Attributes
Column
Represents a single logical attribute
Does not make sense if split
“Smart” column
Has internal structure
May even change meaning depending upon the data
Opinion:
Major source of problems!
During system migration, I NEVER encountered “smart columns” without some kind
of issues.
Avoid them if you can!
25. 25 of 54
Examples of “Smart” Columns
Organization rollup
Pipe-delimited combination of Region/State/City/Zip
Long-term project impact:
Adding extra level to rollup became extremely challenging.
Search was very expensive.
Answers on questionnaires:
Single text line where number of characters = number of questions:
“YYYNNNNYYNY”
Long-term project impact
Developer’s mistake during one release caused data corruption that was
detected only after some time major data recovery project
26. 26 of 54
If it is more than ONE – is it MANY?
Correct model:
Proper Generalization
Org Ship
OrgRole
- Role_CD
0..*
1
0..1 0..*
manage
maintain
Org Ship
0..1
0..* 0..*
1
0..*
repair
0..1
27. 27 of 54
OVER-Generalization
Reasons for generic solutions:
Changes are costly.
We feel “protected” against the future.
Generic models are “cool” (especially now with the Big Data
movement).
BUT
Generic solutions often mask an incomplete understanding of
the subject area.
Generic solutions in one area may cause major issues in others.
28. 28 of 54
Example of Over-Generalization
Object AttribValue
- Name
- Value_NR
- Value_DT
- Value_TX
Assoc
0..*
0..*
0..*
1
1 1
29. 29 of 54
Over-Generalization Problems
Data entry:
Uses a lot of operations to retrieve a single object
Data quality is hard to enforce.
Data retrieval
Indexes are useless.
CBO goes crazy.
Performance is sporadic and does not follow any meaningful
logic.
Functional complex reporting is impossible.
30. 30 of 54
Over-Generalization Potential
There are cases when key-value stores are perfect
(NoSQL environments).
BUT they should not be mixed with:
OLTP solutions when high data quality is required
Heavy reporting workloads
What could be done:
Storage is cheap.
Create duplicate structures that look like real tables
31. 31 of 54
Recursion
Recursion
Powerful modeling technique
Can be used for a number of reasons
Linked lists (e.g. contract versions)
Storage of tree structures (e.g. organizational hierarchy)
BUT
Storage mechanisms are wrong, which causes a lot of issues
32. 32 of 54
Pseudo-Recursion Trap
Real recursion
“Kind of”-recursion
THING
THING
ASSOCIATION
from/to date
1 < Child of 0..*
1 < Parent of 0..*
THING
Child of
0..1
0..*
33. 33 of 54
Why is it a trap?
Reasons why people do it:
Versioning
Historical data
Reporting purposes
Long-term project effect:
Hierarchical data consistency is not enforced.
Timing can very easily be off.
34. 34 of 54
Proper Recursive Multi-Tree Model
OrgStruct
- Start_dt
- End_dt
1
OrgStructDtl
1 0..*
OrgUnit
- Type
0..*
0..*
0..1
36. 36 of 54
Do not hide your business rules!
Business rules should be visible:
Anything published in the database will eventually be used in
ways not initially intended
… so, changes may have very strange side effects.
Stale code becomes buggy
… because the context of the whole system may have changed.
Under stress, you may have problems understanding your own
code (especially at 2AM)
… so, a properly constructed system should prevent you from making
“unforced errors.”
37. 37 of 54
Repository-Based Solutions
Part #1: Repository
Business rules can be explicitly articulated.
You can have version control.
You can even have your own pseudo-language.
Part #2: Code generator
You can either generate program units beforehand or interpret
them during runtime [Dynamic SQL!]
38. 38 of 54
Repository Example
Hundreds of forms
Originally hard-coded
Hard to maintain
Significant development time to add any new forms
Solution:
Generic repository to define object transformation
Data in the database data in the form
Changes in the form changes in the database
Code generator
Performance considerations
40. 40 of 54
Impact
Timeline:
Development of new forms had to stop for a month.
In two months – 100% conversion to the new engine
After solution:
Adding a new form takes hours instead of days
200 forms added in approximately 2 months
Making changes/bug fixes takes minutes
Change mapping regenerate done!
Major architectural changes can be made in 2 days!
A few updates to the repository generate done!
41. 41 of 54
Since then…
The same repository now supports:
Data transformation inside the database
Data migration
Processing data from/to XML
Offline data export
It is that simple!
Writing one generator is faster than writing hundreds of routines
Statistic:
More than 300,000 generated PL/SQL lines of code
43. 43 of 54
Using a Thick Database Approach
UI screens NEVER touch tables
… i.e. UI is isolated from the physical data representation as
much as possible
All data-related processes are written using PL/SQL
… since PL/SQL is the most tightly integrated environment to
operate various SQL statements
44. 44 of 54
Micro-SOA at the Database Level
Views and PL/SQL APIs are serving as an isolation level
between data storage and data representation
Advantages:
A lot of database changes can be absorbed without UI impact
Edition-based redefinition (EBR) lets you avoid downtime
Disadvantages:
Requires clear separation of duties between the database and UI team
Requires knowledgeable database developers (lots of advanced
features!)
Requires security audits (Dynamic SQL!)
45. 45 of 54
Simplest representative of micro-SOA:
Bring everything your front-end developer needs at once
Capture changes using INSTEAD-OF triggers
Beware:
Underlying queries tend to grow in complexity
Stacking various UI views could confuse the CBO
De-Normalized Views
46. 46 of 54
create or replace view v_customer
as
select c.cust_id,
c.name_tx,
a.addr_id,
a.street_tx,
a.state_cd,
a.postal_cd
from customer c
left outer join address a
on c.cust_id = a.cust_id
Example (1)
47. 47 of 54
create or replace trigger v_customer_ii
instead of insert on v_customer
declare
v_cust_id customer.cust_id%rowtype;
begin
if :new.name_tx is not null then
insert into customer
(cust_id,name_tx,phone_tx)
values
(object_seq.nextval,:new.name_tx,:new.phone_tx)
returning cust_id into v_cust_id;
if :new.street_tx is not null then
insert into address
(addr_id,street_tx,state_cd, postal_cd, cust_id)
values (object_seq.nextval,:new.street_tx,
:new.state_cd,:new.postal_cd, v_cust_id);
end if;
end;
Example (2)
48. 48 of 54
Complete isolation:
Data is processed within the PL/SQL function.
The output is an object collection (could be even pipelined!)
Result of function call can be converted to a SQL data set
Extras:
Views can be built on top of functions
Views can have INSTEAD OF triggers
Beware:
Significant performance issues if handled incorrectly
Functions Returning Object Collections
49. 49 of 54
Case:
Complex search engine
About 20 different filtering criteria
Applicable to different tables
Large data volume
Problem:
Unpredictable performance results in a single SQL query.
Use Case (1)
50. 50 of 54
Use Case (2)
A. Create an output object with corresponding collection.
CREATE type search_ot as object
(Name_TX Varchar2(50),Phone_TX varchar2(20)…)
CREATE type search_nt as table of search_ot;
B. Create a function to return a collection where all search criteria
become input variables
CREATE OR REPLACE FUNCTION f_search_tt
(i_name_tx varchar2, i_phone_tx varchar2, …)
RETURN search_nt
IS
v_tt search_nt:= search_nt();
BEGIN
RETURN v_tt;
END;
51. 51 of 54
Use Case (3)
Use Dynamic SQL to build the query
FUNCTION f_search_tt IS
v_sql_tx varchar2(32000);
BEGIN
v_sql_tx:='select search_ot(...) '||chr(10)
'from ... '||chr(10)
'where ...';
if i_name_tx is not null then
v_sql_tx:=v_sql_tx||' and cust.name_tx like ''%'||i_name_tx||'%''
'
end if;
...
execute immediate v_sql_tx bulk collect into v_tt;
...
END;
52. 52 of 54
Use Case (4)
Give code to developers
select name_tx, address_tx, phone_tx, …
from table(
cast(f_search_nt
(:1, -- name
:2, -- phone
…
)
as search_nt)
)
53. 53 of 54
Conclusions
Good system architecture does matter.
Good system architects play a key role in building
successful systems.
Devoting adequate time and resources to good system
architecture in the short run will always pay off in the long
run.
54. 54 of 54
Contact Information
Michael Rosenblum – mrosenblum@dulcian.com
Dulcian, Inc. website - www.dulcian.com
Blog: wonderingmisha.blogspot.com
Available NOW:
Oracle PL/SQL Performance Tuning Tips & Techniques