A Multifaceted Dependency Map of MySQL

Similar documents
Creating a Lattix Dependency Model The Process

Implementation Work Flow. CSC 532: Advanced Software Engineer Louisiana Tech University

Element: Relations: Topology: no constraints.

Monitor database health in a dashboard

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

Performance improvements through a strong cooperation between the well-known functions and a new clear and thorough layout.

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

Qlik. 10 key elements of a successful data strategy and modern analytics platform. February 2019 Julie Kae Executive Director, Qlik.


ONOS OVERVIEW. Architecture, Abstractions & Application

SteelCentral Packet Analyser Walkthrough

CAMELOT Configuration Overview Step-by-Step

CS519: Computer Networks. Lecture 2, part 2: Feb 4, 2004 IP (Internet Protocol)

Introduction to System Design

CS519: Computer Networks

Automatic network discovery, documentation & visualization. IP Explorer

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

Topics in Object-Oriented Design Patterns

ESET Remote Administrator 6. Version 6.0 Product Details

This is a brief tutorial that explains how to make use of Sqoop in Hadoop ecosystem.

Cisco Network Assurance Engine with ServiceNow Cisco Network Assurance Engine, the industry s first SDN-ready intent assurance suite, integrates with

Object-Oriented Design

How to Harvest Reusable Components in Existing Software. Nikolai Mansurov Chief Scientist & Architect

Analysis and Modeling of Evolving Database-centric Web Applications

Lasso Your Business Users by Designing Information Pathways to Optimize Standardized Reporting in SAS Visual Analytics

CS 390 Chapter 2 Homework Solutions

Enterprise Workflow Resource Management

Consider The Source. Express Logic, Inc.

How Listing Distribution Affects the Accuracy of Online Data

(Team Name) (Project Title) Software Design Document. Student Name (s):

SIEM: Five Requirements that Solve the Bigger Business Issues

Managing Data Resources

5/15/16. Computational Methods for Data Analysis. Massimo Poesio UNSUPERVISED LEARNING. Clustering. Unsupervised learning introduction

Intro to Modelling and UML

WHAT IS SOFTWARE ARCHITECTURE?

Designing Component-Based Architectures with Rational Rose RealTime

Appendix A: Scenarios

Top five Docker performance tips

The Software Design Process. CSCE 315 Programming Studio, Fall 2017 Tanzir Ahmed

Web Applications (Part 2) The Hackers New Target

Oracle Endeca Information Discovery

6 TOOLS FOR A COMPLETE MARKETING WORKFLOW

Queries give database managers its real power. Their most common function is to filter and consolidate data from tables to retrieve it.

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends!

An Introduction to Big Data Formats

Chapter 11 Database Concepts

Object-Oriented Design

Le nouveau Morfik est arrivé (The new Morfik has arrived)

Monitor DNS errors in a dashboard

Verification and Validation

Chapter 10 Error Detection and Correction 10.1

MICROSOFT VISUAL STUDIO 2010 Overview

Static Conformance Checking of Runtime Architectures Tool Demonstration

A Systems Approach to Dimensional Modeling in Data Marts. Joseph M. Firestone, Ph.D. White Paper No. One. March 12, 1997

Identify and Eliminate Oracle Database Bottlenecks

Data Structures Lecture 2 : Part 1: Programming Methodologies Part 2: Memory Management

Concord OneClick for ehealth

Software Service Engineering

Machine-Powered Learning for People-Centered Security

Splunk Review. 1. Introduction

Client Code - the code that uses the classes under discussion. Coupling - code in one module depends on code in another module

Accelerating BI on Hadoop: Full-Scan, Cubes or Indexes?

Model-Based Design for Large High Integrity Systems: A Discussion Regarding Model Architecture

JAVASCRIPT CHARTING. Scaling for the Enterprise with Metric Insights Copyright Metric insights, Inc.

Oracle - MySQL Developer Techniques with Advanced

Introduction to MySQL Cluster: Architecture and Use

Ch 1: The Architecture Business Cycle

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements.

elektronik Security for Software and IT ECU ENERGY STORAGE TESTING COVER STORY Gasoline Direct Injection in-the-loop

Attackers Process. Compromise the Root of the Domain Network: Active Directory

For our next chapter, we will discuss the emulation process which is an integral part of virtual machines.

PHP Composer 9 Benefits of Using a Binary Repository Manager

Chapter 2 Assignment (due Thursday, April 19)

MAKE THE MOST OF SEO HOW TO BRING CUSTOMERS TO YOUR DOOR

Enabling Performance & Stress Test throughout the Application Lifecycle

UX Research: Good to Go website

Course Outline. MySQL Database Administration & Design. Course Description: Pre-requisites: Course Content:

MARKING KEY The University of British Columbia MARKING KEY Computer Science 260 Midterm #2 Examination 12:30 noon, Thursday, March 15, 2012

PYRAMID Headline Features. April 2018 Release

Developing SQL Databases (762)

Software Design Document (SDD) Template (summarized from IEEE STD 1016)

Two-Tier Oracle Application

Teiid Designer User Guide 7.5.0

An Empirical Study of Architectural Decay in Open-Source Software

EMC VMAX UNISPHERE 360

DELL EMC VMAX UNISPHERE 360

TOP New Features of Oracle Business Intelligence 11g

CHAPTER 9 DESIGN ENGINEERING. Overview

GFI Product Comparison. GFI WebMonitor 2015 vs. McAfee Web Gateway

CSE 374 Programming Concepts & Tools. Hal Perkins Fall 2015 Lecture 19 Introduction to C++

MySQL Worst Practices. Introduction. by Jonathan Baldie

Component-Based Software Engineering TIP

Unit 10 Databases. Computer Concepts Unit Contents. 10 Operational and Analytical Databases. 10 Section A: Database Basics

1Z Oracle. MySQL 5 Database Administrator Certified Professional Part I

Data Warehouse Testing. By: Rakesh Kumar Sharma

AFFILIATE FAQ: CNN NEWSOURCE UPGRADED VIDEO INTERFACE Updated July 7, 2015

IBM Tivoli Netcool Service Quality Manager V4.1.1

Parallels Virtuozzo Containers

DELL POWERVAULT ML6000

Transcription:

Lattix White Paper A Multifaceted Dependency Map of MySQL Lattix White Paper April 2016 Copyright 2016 Lattix, Inc. All rights reserved

Analyzing MySQL Introduction MySQL is one of the most popular open source databases and an integral part of the infrastructure of the Internet. MySQL is a modern database. It came into prominence at a time when relational databases were well established, SQL was standardized, and C++ was already in wide use. Our interest is in exploring MySQL s code to discover its various parts and to understand how they relate to each other. Using Lattix Architect we will identify all code elements such as methods, structs, classes, and global variables and discover the dependencies among them. This creates the underlying dependency map that can be explored both in terms of how the source code is organized into its file directory structure and in terms of how relationships manifest themselves in the binary artifacts. The result is a view that provides high level visibility along with the ability to drill down to a specific line in code. Starting out MySQL is not one program As developers we started out by building the MySQL source distribution. One of the first things to notice is that MySQL is not one program. Instead, it is a collection of binaries, one of which is the database server (mysqld). However, it also includes multiple libraries including ones that sql client applications can link into, along with many other utilities and test programs. When we built MySQL we saw close to 100 binaries. As a first step, we started our exploration to develop an understanding of the relationships between these binaries. Our goal is to create a dependency map and to answer a number of interesting questions: 1. What are the various executables and libraries and how are they related? For instance, can we say exactly what libraries the program mysqld uses and identify those dependencies down to the line in code? 2. How coupled are each of the individual executables and libraries? Which ones have greater coupling? 3. Are some header files being included needlessly? Are there header files included indirectly even though there are direct dependencies on them? Are external declarations being used to circumvent including header files? These are thorny questions that have an important bearing on the compilation speed and in managing the complexity of the C/C++ code. 4. Can we identify and prioritize the dependencies that lead to unwanted coupling? 5. When we change one or more files, how does that change ripple through the code and what components are affected? 6. What are the differences between various versions of MySQL? Can we examine trends of stability, coupling, and other important architectural metrics? 7. Ultimately, how closely does our implementation match the intended architecture and what can we do to make it more modular so that it becomes easier to understand, maintain, and test? Creating a project Analyzing MySQL is a two-step process: 1. Configure the MySQL build. Run make through the utility lxbuild (lxbuild make) to build MySQL while lxbuild captures the build options. The output of this process is a build specification file. 2. Run lattixarchitect to take the build specification file as the input to generate a Lattix Architect project. A Dependency Map of MySQL Page 2 Copyright 2016 Lattix, Inc. All rights reserved

Once this process is complete, the resulting Lattix Architect project is the dependency map. We can query it, report on it, and view it in different ways. It is easy to identify the bad dependencies, trace them to the line in code, and understand the impact of change. We ended up analyzing about 2.5 million lines of code organized into 1,369 files. View organized by source structure Hierarchical decomposition Reordering algorithms help reveal the architecture Users can identify the cyclic dependencies and then drill down to the actual code for those dependencies. Dependencies by Source Code Organization The hierarchy of the map aggregates the dependencies so you can see how various source code directories relate to each other. The hierarchy also allows you to drill down to the lowest level element (method, data, struct, etc.) and jump directly to the source code. A partitioning algorithm was applied to order the subsystems in such a way as to reveal the underlying design intent. Notice how the dbug and test directories move to the top because they have dependencies to the libraries but the libraries don t have dependencies on the tests directory (as would be expected). Furthermore, elements in each layer were ordered to minimize the strength A Dependency Map of MySQL Page 3 Copyright 2016 Lattix, Inc. All rights reserved

above the diagonal. For instance, the automatic ordering reveals that mysys is at a lower level compared to client as would be expected because the client programs depend on the common code in mysys. View organized by datasource (programs and libraries) Dependencies by Datasource This view shows the dependencies organized by programs and libraries (called datasources in Lattix Architect). To get an even bigger picture view, the datasources are organized by their file and directory structure. We can see that the major coupling is between storage and sql, which together contain 60% of the source files. Further drill down will show programs such as mysqld, mysql, mysqladmin, mysqldump, libraries such as libmyisam.a, ha_innodb.a, libmysqlclient.a, and many others. This means that you can identify, down to the line in code, how programs and libraries depend on each other. Drilling further down into each of the datasources reveals the source organization. Not only can you see the dependencies across datasources, you can also identify to the line of source code exactly what those dependencies are. A Dependency Map of MySQL Page 4 Copyright 2016 Lattix, Inc. All rights reserved

Conclusion The dependency map of MySQL allows us to see the big picture view and then drill down to the lowest level element and ultimately to the source code. This means that unwanted coupling can be identified quickly and efficiently. The dependency map also allows us to perform detailed include file analysis to reduce the complexity and to streamline the inclusion of header files. By analyzing successive versions of the code, it is easy to see what has changed from one version to another and to see whether those changes are contributing to further erosion of the intended design. Try Lattix on your Project Is your software complex, buggy and hard to maintain? Do you want to see what your code looks like and what you can do to modularize it? If so, contact Lattix: sales@lattix.com. A Dependency Map of MySQL Page 5 Copyright 2016 Lattix, Inc. All rights reserved