Devon M. Simmonds Computer Science Department, CSC592 1 Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington August 19, 2008 Software Engineering Research
Devon M. Simmonds Computer Science Department, CSC592 2 © Devon M.Simmonds, 2007 Computer science/Information Systems - solving problems with the aid of a computer Artificial intelligence Database management systems Distributed systems Computer graphics Operating systems Software engineering Motivation
Devon M. Simmonds Computer Science Department, CSC592 3 Software Development Simple Tools Power Tools Blueprints International Space Station International Airport Baggage Handling System
Devon M. Simmonds Computer Science Department, CSC592 4 Models in Engineering Benefits of models – Help us understand and manage complex systems – Communicate understanding – Drive implementation – Save resources Need to improve the use of models in software development!
Devon M. Simmonds Computer Science Department, CSC592 5 Model-Driven Development (MDD) CodeCode Create Model Model of the Program AA BB CC Compile Model Compile Code Binary instructions Code-centric Development Manually Create Code Realizing the dream – MDD challenges – Model Specification – Model Transformation Code Generation – Managing technologies – Model Analysis
Devon M. Simmonds Computer Science Department, CSC592 6 The World of Software network Space Europe Asia USA Distributed Systems Africa Distributed systems are normative Complex, critical systems are pervasive! Consequences of errors are far-reaching
Devon M. Simmonds Computer Science Department, CSC592 7 Distributed Systems Context Computer Hardware Operating System Application program Computer Hardware Operating System Application program Transaction management Fault tolerance Security Naming Concurrency Replication Query Event Quality of service Middleware Application program Many middleware technologies –.Net, EJB, SOAP, COM, CORBA, Jini, Software require many middleware technologies Middleware technologies evolve Changing middleware in code is difficult
Devon M. Simmonds Computer Science Department, CSC592 8 Model Driven Architecture (MDA) [From OMG website] An initiative to address pervasive middleware features
Devon M. Simmonds Computer Science Department, CSC592 9 Fall 2008 Graduate Course CSC592 Distributed Systems A practical introduction to the development of distributed systems
Devon M. Simmonds Computer Science Department, CSC CSC592 Distributed Systems Overview – A practical introduction to the development of Distributed Systems – Important theoretical underpinnings – Use of middleware technologies: SOAP, EJB, Java RMI, CORBA, Jini – Introduction to aspect-oriented software development and AspectJ language. – Course web page: s/Fall08/csc592.htm Masters Theses & projects may be started in this course. sss
Devon M. Simmonds Computer Science Department, CSC Theses & Project Possibilities
Devon M. Simmonds Computer Science Department, CSC Using aspect to support the migration of application across middleware. Decouple technology from application code. Project #1 Complete Application Integration Design of Application Design of Middleware Concerns CodeCode
Devon M. Simmonds Computer Science Department, CSC Crosscutting functionality logging in org.apache.tomcat – red shows lines of code that handle logging – not in just one place – not even in a small number of places logging is not modularized The Problem
Devon M. Simmonds Computer Science Department, CSC AOSD 2003 Can we modularize this crosscutting concern? : System.out.println("foo called"); Helper.foo(n/3); : System.out.println("foo called"); Helper.foo(i+j+k); : System.out.println("foo called"); Helper.foo(x); : class Helper { : public static void foo(int n) { … } : } every call to foo is preceded by a log call 14 Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC AOSD 2003 Yes! : System.out.println("foo called"); Helper.foo(…); : System.out.println("foo called"); Helper.foo(…); : System.out.println("foo called"); Helper.foo(…); : class Helper { : public static void foo(int n) { … } : } class Helper { : public static void foo(int n) { System.out.println("foo called."); … } : } : Helper.foo(n/3); : Helper.foo(i+j+k); : Helper.foo(x); : procedures can modularize this case unless logs use calling context, we don’t control source of Helper… 15 Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC AOSD Point getX() getY() setX(int) setY(int) moveBy(int, int) draw() refresh() Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) draw() refresh() FigureElement moveBy(int, int) all subclasses have an identical method 16 Can we modularize this crosscutting concern? Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC AOSD 2003 Yes! 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) draw() refresh() Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) draw() refresh() FigureElement moveBy(int, int) 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) draw() Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) draw() FigureElement moveBy(int, int) refresh() inheritance can modularize this 17 Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC AOSD Point getX() getY() setX(int) setY(int) moveBy(int, int) draw() Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) draw() FigureElement moveBy(int, int) refresh() these methods all end with call to: Display.update(); 18 Can we modularize this crosscutting concern? Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC AOSD 2003 NO! not with Java, C++ etc. DisplayUpdating 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) draw() Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) draw() FigureElement moveBy(int, int) refresh() Need new modular structure after(): call(void FigureElement+.set*(..)) || call(void FigureElement.moveBy(int, int)) { Display.update(); } 19 Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC AOSD 2003 YES! – with AspectJ DisplayUpdating 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) draw() Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) draw() FigureElement moveBy(int, int) refresh() after(): call(void FigureElement+.set*(..)) || call(void FigureElement.moveBy(int, int)) { Display.update(); } 20 Tyranny of the dominant decomposition
Devon M. Simmonds Computer Science Department, CSC Program A AA BB CC Program B B2B2B2B2 B2B2B2B2 DD CC A1A1A1A1 A1A1A1A1 B1B1B1B1 B1B1B1B1 A2A2A2A2 A2A2A2A2 Aspect-based refactoring of components Project #2
Devon M. Simmonds Computer Science Department, CSC Aspect-oriented Testing, Monitoring & Policy Enforcement Project #3
Devon M. Simmonds Computer Science Department, CSC Transformation languages for aspect- oriented model driven development. To be done – Compare language – Extend language – Implement language Model B MM BB CC AA PP KK Project #4
Devon M. Simmonds Computer Science Department, CSC class Department { private: char name[40]; Student csc[100]; public: void manageStudents(){ csc[i]->register(); csc[i]->grade(); csc[i]->graduate(); }} Generating code from aspect-oriented design models Project #5 :Student:Department takeCourse() graduate()
Devon M. Simmonds Computer Science Department, CSC Q u e s t i o n s ? TheEnd Devon M. Simmonds, Computer Science Department, University of North Carolina Wilmington