Using AOP to Ease Evolution Presented by David Shepherd (QLI & UD) Co-Authors: Thomas Roper (QLI) and Lori Pollock (UD)

Slides:



Advertisements
Similar presentations
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Aspect Oriented Programming - AspectJ Radhika Rajput.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Understand Database Security Concepts
Programming Creating programs that run on your PC
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
Database Management: Getting Data Together Chapter 14.
11 3 / 12 CHAPTER Databases MIS105 Lec14 Irfan Ahmed Ilyas.
Aspect-Oriented Software Development (AOSD) Additional Tutorial.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Data Warehouse View Maintenance Presented By: Katrina Salamon For CS561.
SQL Forms Engine Koifman Eran Egri Ozi Supervisor: Ilana David.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Android Core Logging Application Keith Schneider Introduction The Core Logging application is part of a software suite that is designed to enable geologic.
Question 1: (20 Points – 4 Points Each)
4.1 EbD Human-Centered Design 1 ® ®. Essential Question: ® How can the Human-Centered design model help frame my project and how will all the information.
Sage CRM Developers Course
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Database Design for DNN Developers Sebastian Leupold.
1 Intro to Info Tech Database Management Systems Copyright 2003 by Janson Industries This presentation can be viewed on line at:
MAHI Research Database Data Validation System Software Prototype Demonstration September 18, 2001
Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each.
September 20, 2015 Viewing and Editing Offices. Lesson Overview: Viewing and Editing Offices September 20, USA2  In this lesson we will cover:
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Chapter 15: Using LINQ to Access Data in C# Programs.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
PHP meets MySQL.
Database Management. ICT5 Database Administration (DBA) The DBA’s tasks will include the following: 1. The design of the database. After the initial design,
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
(Chapter 10 continued) Our examples feature MySQL as the database engine. It's open source and free. It's fully featured. And it's platform independent.
Information: Policy, Strategy and Systems Module Overview
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Chapter 5 Database Processing. Neil uses software to query a database, but it has about 25 standard queries that don’t give him all he needs. He imports.
Analysis of SQL injection prevention using a filtering proxy server By: David Rowe Supervisor: Barry Irwin.
A Distributed Aspect-Oriented System for J2EE Applications Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) Background - As benefits.
IPortal Bringing your company and your business partners together through customized WEB-based portal software. SanSueB Software Presents iPortal.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Mobile Software Development ISCG 7424 Department of Computing UNITEC John Casey and Richard Rabeder SQLite and Permissions.
DataSet Your Database student test score Database Connection Your program needs to establish a connection to the database. Click on “Add New Data Source.”
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Task #1 Create a relational database on computers in computer classroom 308, using MySQL server and any client. Create the same database, using MS Access.
Android - SQLite Database 12/10/2015. Introduction SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with.
CSC 405: Web Application Engineering II8.1 Web programming using PHP What have we learnt? What have we learnt? Underlying technologies of database supported.
AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.
Module 6: Configuring User Environments Using Group Policies.
ASSIGNMENT 2 Salim Malakouti. Ticketing Website  User submits tickets  Admins answer tickets or take appropriate actions.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Lab 301 Populating Template Data from a Third Party Data Source Justin Pava, Software Release Manager Andrew Schoonmaker, Software QA Engineer.
PPL 2004, Gamagori, AICHI1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech, Japan) Shigeru Chiba (Tokyo Tech, Japan)
/16 Final Project Report By Facializer Team Final Project Report Eagle, Leo, Bessie, Five, Evan Dan, Kyle, Ben, Caleb.
Agenda for Today  DATABASE Definition What is DBMS? Types Of Database Most Popular Primary Database  SQL Definition What is SQL Server? Versions Of SQL.
David Shepherd, Zachary P. Fry, Emily Hill, Lori Pollock, and K
Design Patterns Part 1: Observer, Singleton, & Adapter
Developing a Model-View-Controller Component for Joomla Part 3
Queries.
Developing and testing enterprise Java applications
Updating Databases With Open SQL
Do it now – PAGE 8 You will find your do it now task in your workbook – look for the start button! Sunday, 12 May 2019.
DATABASE Purpose of database
Updating Databases With Open SQL
Presentation transcript:

Using AOP to Ease Evolution Presented by David Shepherd (QLI & UD) Co-Authors: Thomas Roper (QLI) and Lori Pollock (UD)

2 Making a Distributed Database Application  Issue: Stale Data DB Delaware Hawaii North Carolina Request Data Data Detective DMV Update ? notify Motivation for Evolution in the Field Databases with Records Of Cars Detective App. Non-Trivial Data Mining Clerk App. Update car data

3 Desired Evolution Task Notification Scheme DMV AppDB Server DetectApp Interesting Update Return Results Send Primary Keys Return Results Query DB Can a database support this functionality? Who is interested in these records? No

4 Software Evolution Problem Open Source Software X A dditional Feature(s) Have Open-Source Software (OSS) App Need to Modify Application Adding Feature(s) Issues OSS evolves independently Injection of feature Maintenance of feature Potential Solutions OOP vs. Aspect-Oriented Programming (AOP)

5 Overview of Evolution Process Original Open Source Software Augmented Open Source Software Original Open Source Software Feature Augmented New Version OSS New Version OSS Feature Aug- mented New Version OSS2 New Version OSS2 Feature OOP Process AOP Process New Version of OSS Available

6 Possible OOP Solution DBObserver executes notifies Notifies listeners Add Code into method Add Code into method Add methods Add interface Add implementation of interface try{ // Evaluate the sql query Table result = sql_executor. execute(db_conn, query); query.notifyObservers(result); error = false; return t; } public class SQLQuery implements Subject{... public void notifyObservers(Table result){ //Get the primary keys, table, etc. ResultInfo resultInfo =... //Get query info from the query QueryInfo queryInfo =... //update all... } public SQLQuery(){ addObserver(DatabaseDistributedNotifier. getInstance());... } SQLQuery notifyObservers getQuery addObserver SQLQuery addVar Clear … DbServer executeQuery openConnection parseQuery commitQuery Public interface DBObserver{ … } Public class MckoiDBObserver implements DBObserver { … } Original OSS Code New Feature Code

7 2 packages 3 classes *needs to be added here Crosscutting Concern (CCC) An Outcome of OOP Solution This represents one.java file Taller = Longer file Blue lines represent our feature’s implementation

8 Another Outcome of OOP Solution Tangling  Statement level  Method level

9 Pointcut AOP Solution ObserverProtocol SQLQuery execute Prepare SQLQuery Pointcut SubjectChange Pointcut updateObserver Pointcut registration DBObserverProtocol Pointcut subjectChange Pointcut updateObserver Pointcut registration Declare Subject Declare Observer DBObserver update Feature Implementation Original Code Base Key Feature: Only loosely coupled with Original OSS Key Feature 2: Observer concern modularized Pointcut

10 Finding Code Insertion Points Database Codebase A First Step in implementation (for both methods)

11 Finding Insertion Point – A Closer Look Statement “Select”’s evaluate method /** * Evaluates the select statement with the given Database context. */ public Table evaluate() throws DatabaseException { DatabaseQueryContext context = new DatabaseQueryContext(database); // Check the permissions for this user to select from the tables in the // given plan. checkUserSelectPermissions(context, user, plan); boolean error = true; try { Table t = plan.evaluate(context); error = false; return t; } Snippet from JDBCDatabaseInterface’s execQuery method... … try { // Evaluate the sql query. Table result = sql_executor.execute(database_connection, query); // Put the result in the result cache... This will lock this object // until it is removed from the result set cache. Returns an id that // uniquely identifies this result set in future communication. // NOTE: This locks the roots of the table so that its contents // may not be altered. result_set_info = new ResultSetInfo(query, result); result_id = addResultSet(result_set_info); } … Which place is better?

12 OOP Process – Find Insertion Point 1 Insert in most likely place 2 Test – Fail 3 Remove Code We removed an extra statement Causing two errors 4 Continue Cutting and Pasting... 5 Answer Co-Worker’s Question About Another Project Ponder, where was I? (what is my working set)

13 AOP Process – Find Insertion Point 1 Set Pointcut to Most Likely Place 2 Test – Fail 3 Change Pointcut 4 Continue Changing Pointcut... 5 Answer Co-Worker’s Question About Another Project Only working with one file: Easy to remember working set

14 New OSS Version Available Original Open Source Software Augmented Open Source Software Original Open Source Software Feature Augmented New Version OSS New Version OSS Feature Aug- mented New Version OSS2 New Version OSS2 Feature OOP Process AOP Process 2 2

15 OOP Solution another outcome Database Codebase Process with OOP 1.Find Feature Code 2.Extract Feature Code 3.Find new insertion points 4.Insert Feature code New Database Codebase

16 Evolution of Codebase: AOP Solution Database Codebase New Code Well-Modularized  Separate from main code base  Refers to main code base New Database Codebase AOP: At worst, realign pointcut references

17 Concluding Remarks - Lessons Learned AOP saves effort when adapting an open-source project Eases Initial Maintenance Task - Add New Feature  Non-Invasive Change  Maintaining Working Set Eases Evolution - Adapt to OSS Change  Finding the Feature  Only Re-Align Pointcuts Status  Working Implementation  Continue to use in ongoing industry research AOP is AOK!

18

19 Slide graveyard

20 AOP Process – Find Insertion Point Snippet from JDBCDatabaseInterface’s execQuery method... … try { // Evaluate the sql query. Table result = sql_executor.execute(database_connection, query); query.notification(result); error=false; // Put the result in the result cache... This will lock this object // until it is removed from the result set cache. Returns an id that // uniquely identifies this result set in future communication. // NOTE: This locks the roots of the table so that its contents // may not be altered. result_set_info = new ResultSetInfo(query, result); result_id = addResultSet(result_set_info); } …

21

22 com.mckoicom.mckoi.database com.mckoi.database.control com.mckoi.toolscom.mckoi.utilcom.mckoi.storecom.mckoi.runtimecom.mckoi.jfccontrolscom.mckoi.debugcom.mckoi.database.sqlcom.mckoi.database.regexbridgecom.mckoi.database.procedurecom.mckoi.database.jdbcservercom.mckoi.database.jdbc com.mckoi.database.interpret com.mckoi.database.global com.mckoi com.mckoi.database com.mckoi.database.control com.mckoi.database.global com.mckoi.database.interpret com.mckoi.database.jdbc com.mckoi.database.jdbcserver com.mckoi.database.procedure com.mckoi.database.regexbridge com.mckoi.database.sql com.mckoi.debugc om.mckoi.jfccontrols com.mckoi.runtime com.mckoi.store com.mckoi.tools com.mckoi.util

23 Possible Solutions Can a database support this functionality? DbServer executeQuery openConnection parseQuery commitQuery … try{ // Evaluate the sql query Table result = sql_executor.execute(db_conn, query); query.notifyObservers(result); error = false; return t; } public class SQLQuery implements Subject{... public void notifyObservers(Table result){ //Get the primary keys, table, etc. from results ResultInfo resultInfo =... //Get query info from the query QueryInfo queryInfo =... for(Iterator e = observers.iterator(); e.hasNext(); ){ ((DBObserver)e.next()). update(resultInfo,queryInfo); } public SQLQuery(){ addObserver(DatabaseDistributedNotifier. getInstance());... } SQLQuery notifyObservers getQuery addObserver removerObserver SQLQuery addVar translateObjectType clear …

24 Quantum Leap Innovations – Business Model What We Do We create pioneering technologies that are used by our partners to build innovative products and services. How We Do It We support our partners as a team member by providing our unique IP, software technologies and people. Gov’t AgenciesPartners Technology Differentiated Products & Services Research Programs End Users Pioneering Software Technologies Tom, am I allowed to show this? It was from the Template.ppt in J:\Presentations.