AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.

Slides:



Advertisements
Similar presentations
AspectWerkz 2 - and the road to AspectJ 5 Jonas Bonér Senior Software Engineer BEA Systems.
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.
1 JAC : Aspect Oriented Programming in Java An article review by Yuval Nir and Limor Lahiani.
1 An Aspect-Aware Outline Viewer Michihiro Horie and Shigeru Chiba Tokyo Institute of Technology, Japan.
Aspect Oriented Programming - AspectJ Radhika Rajput.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Secure Systems Research Group - FAU Aspect Oriented Programming Carlos Oviedo Secure Systems Research Group.
Overview of AspectJ Aspect Oriented Software Development Seminar Technion presented by Oren Mishali.
Remote Method Invocation
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales.
University of British Columbia Software Practices Lab 2005 CASCON A Fluid AOP Editor Terry Hon Gregor Kiczales.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
More on AspectJ. aspect MoveTracking { private static boolean _flag = false; public static boolean testAndClear() { boolean result = _flag; _flag = false;
Aspect-Oriented Software Development (AOSD) Tutorial #3 AspectJ - continued.
A Framework for Smart Proxies and Interceptors in RMI Nuno Santos P. Marques, L. Silva CISUC, University of Coimbra, Portugal
1 Model Interface Implementation for Two-Way Obliviousness in Aspect-Oriented Modeling Presented by Wuliang Sun Department of Computer Science Baylor University.
Włodzimierz Funika, Filip Szura Automation of decision making for monitoring systems.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Fall 2012.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
Chapter 3: Objects, Components, and the Web Textbook IT Architectures and Middleware, Second Edition Chris Britton and Peter Bye AIT 600 Jeff Schmitt September.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) 1 A Small Extension to Java for Class Refinement ACM SAC'08, March 18, 2008.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
Modularizing Web Services Management with AOP María Agustina Cibrán, Bart Verheecke { Maria.Cibran, System and Software Engineering.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton February 28th, 2003 Advisor: David G. Hannay Client:
Using Aspects to Support the Software Process: XP over Eclipse Oren Mishali and Shmuel Katz Technion, Israel Institute of Technology.
Aspect Oriented Programming Gülşah KARADUMAN.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
A Distributed Aspect-Oriented System for J2EE Applications Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) Background - As benefits.
AOSD1 Aspect-Oriented Software Design Karl Lieberherr Theo Skotiniotis.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
AspectWrapper CHALFOUN Pierre et BUIST Éric. Overview Introduction – what and why In a nutshell – main components Our approach – how we did it Demo –
Virtual Support for Dynamic Join Points C. Bockisch, M. Haupt, M. Mezini, K. Ostermann Presented by Itai Sharon
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Region Pointcut for AspectJ Shumpei Akai Shigeru Chiba Muga Nishizawa.
AspectJ – AOP for Java Tom Janofsky. Instructor at Penn State Abington Consultant with Chariot Solutions JUG Member.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Aspect Oriented Programming Adlux Consultancy Services Pvt Ltd
Kansas City Java User’s Group Jason W. Bedell July 12, 2006
Comparison of Different AOP Approaches Presented by: Xiaojing Wang.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Spring 2012.
CSC450 Software Engineering Devon M. Simmonds University of North Carolina, Wilmington 1.
AspectScope: An Outline Viewer for AspectJ Programs Michihiro Horie, Shigeru Chiba Tokyo Institute of Technology, Japan.
Distributed Computing in Life Science Research -Presenter: Yijian Yang
University of British Columbia Software Practices Lab Uniform Support for Modeling Crosscutting Structure Maria Tkatchenko Gregor Kiczales Work supported.
1 An AOP Implementation Framework for Extending Join Point Models Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Hidehiko Masuhara(University.
Distributed programming in Java Faculty:Nguyen Ngoc Tu Session 5 - RMI.
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
Implementing Distribution and Persistence Aspects with AspectJ WAS CLASS.
PPL 2004, Gamagori, AICHI1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech, Japan) Shigeru Chiba (Tokyo Tech, Japan)
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
An Interface Mechanism for Encapsulating Weaving in Class-based AOP
Chengyu Sun California State University, Los Angeles
Remote Method Invocation
Aspect-Oriented Generation of the API Documentation for AspectJ
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Aspect-Oriented Programming
Chengyu Sun California State University, Los Angeles
Distributed Dynamic Weaving is a Crosscutting Concern
Structuring Adaptive Applications using AspectJ and AOM
CS520 Web Programming Spring – Aspect Oriented Programming
Presentation transcript:

AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori (IBM)

AOSD'04, Lancaster, UK 2 This Talk  Our goal To modularize crosscutting concerns in distributed software  Motivating problem AspectJ can separate them But, the implementation is NOT simple e.g. a test code for distributed software  Our solution Remote pointcut

AOSD'04, Lancaster, UK 3 Test Code for Distributed Authentication Service  Confirm addUser() is executed on Database if a client remotely calls registerUser()  Authentication service Authenticator receives a client request Database adds the new user’s information Authenticator Database registerUser() Client addUser() Register a new user on a DB

AOSD'04, Lancaster, UK 4 Ideal Design for Test Code  On Client, 1. flag = false. 2. call registerUser() on Authenticator. 3. if addUser() is executed on Database, then flag = true. 4. assert flag == true. Authenticator Database registerUser() addUser() Client

AOSD'04, Lancaster, UK 5 Test Code in Java  A crosscutting concern arises in the test program Database code must be edited, only for the test 1.Flag = false 2.Call registerUser() 3.assert flag == true class Database { void addUser() { invoke Callback … … add the user to the database } … … } Client Flag = true Callback Database Authenticator RMI (Remote Method Invocation) Crosscutting concern

AOSD'04, Lancaster, UK 6 Test Code in AspectJ  The concern is separated Database code is not edited 1.Flag = false 2.Call registerUser() 3.Assert flag == true Client Flag = true Callback class Database { void addUser() { … … add the user to the database } Database aspect DatabaseTest { before(): execution(void addUser()){ invoke Callback } DatabaseTest RMI The concern is separated but, three distributed sub-modules

AOSD'04, Lancaster, UK 7 This Design is Not Satisfactory  When writing the test code, we must consider two concerns: Test Distribution  It requires to divide the code into three sub-modules  Network processing (RMI) and deployment is needed 1. flag = false. 2. call registerUser() on Authenticator. 3. if addUser() is invoked on Database, flag = true. 4. Assert flag == ture Three distributed sub-modules We don’t want to consider this concern!

AOSD'04, Lancaster, UK 8 Our Solution - Remote Pointcut  Identifies join points in a program on a remote host Advice is run on a host different from the host where join points are pointcut  Transparently Like RMI for distributed OOP class Database { void addUser() { … … } Remote pointcut aspect Log { before() : execution(void addUser()) { System.out.println(“addUser”); } Identified join point

AOSD'04, Lancaster, UK 9 Test Code using a Remote Pointcut  We could write the test program as a single non-distributed module on the client side Authenticator 1. flag = false 2. call registerUser() 3. assert flag == true before(): cflow(call(void registerUser())) &&execution(void addUser()){ flag = true } call addUser() Remote Pointcut class Database { void addUser() { } … … } Database AuthenticatorTest (Aspect) call registerUser()

AOSD'04, Lancaster, UK 10 Test Code with Remote Pointcuts aspect AuthenticatorTest extends TestCase { boolean flag; void testRegisterUser() { flag = false; String userId = "muga", password = "xxx"; Authenticator auth = (Authenticator) Naming.lookup("auth"); auth.registerUser(userId, password); assertTrue(flag); } before(): // remote pointcut cflow(call(void Authenticator.registerUser())) && execution(void Database.addUser()) { flag = true; }} When addUser() is executed, the flag is set to true Confirms the flag is true Calls registerUser() Declares and initializes the flag

AOSD'04, Lancaster, UK 11 DJcutter - Distributed AOP Language  An extension to the AspectJ language Remote pointcut Remote inter-type declaration  Load-time weaving A class loader provided by DJcutter weaves aspects and classes.

AOSD'04, Lancaster, UK 12 DJcutter: Language Specification  Pointcut call, execution, within, target, …  DJcutter provides pointcut designators similar to AspectJ’s. cflow (Pointcut)  All join points that remotely occur between the entry and exit of each join point specified by Pointcut hosts (Host, …)  The join points in execution on the hosts  Advice Before, after, and around new

AOSD'04, Lancaster, UK 13 Remote Inter-type Declaration  To declare methods and fields in classes on a remote host  They are automatically distributed on the fly Database aspect AuthenticatorTest { boolean Database.containsUser(String userId) { // If the user entry specified by userId is found // in the database. } boolean containsUser(); Append at load-time AuthenticatorTest

AOSD'04, Lancaster, UK 14 Use of Remote Inter-type Declaration aspect AuthenticatorTest extends TestCase { void testRegisterUser() { String userId = "muga", password = "xxx"; Authenticator auth = (Authenticator) Naming.lookup("auth"); Database db = (Database) Naming.lookup(“db”); assertTrue(! db.containsUser(userId)); auth.registerUser(userId, password); assertTrue(db.containsUser(userId)); } boolean Database.containsUser(String userId) { // If the user entry specified by userId is // found in the database. }} Test code remotely calls the accessor method added by inter-type decl. Declares the accessor method on the remote database

AOSD'04, Lancaster, UK 15 Load-time Weaving by DJcutter Aspect source file Java bytecode Compiler Aspect Server (Runtime Infrastructure) Class Loader (Runtime Infrastructure) store Distributed software Load&weave deploy e.g. AuthenticatorTest e.g. Authenticator e.g. Database Class Loader (Runtime Infrastructure) Distributed software The users of DJcutter don’t have to manually deploy the compiled aspects to every host.

AOSD'04, Lancaster, UK 16 Related Work 1  Middleware for automatic distribution e.g. Addistant [Ecoop01], J-Orchestra [Ecoop02] The distribution concern is completely hidden. DJcutter ≠AspectJ + Addistant  DJcutter selectively hides the distribution concern, when users don’t want to see it.  DJcutter works with existing infrastructure such as Tomcat, JBoss, Oracle, …

AOSD'04, Lancaster, UK 17 Related Work 2  Distributed AOP languages D language framework JAC (Java Aspect Componenets) for modularizing functional crosscutting concerns  DJcutter Remote pointcut for modularizing non-functional crosscutting concerns without consideration of distribution

AOSD'04, Lancaster, UK 18 Conclusion  Remote pointcut transparently identifies join points on remote hosts  Without consideration of distribution concern  Advice is executed on a host different from the host where join points are identified  Like RMI for distributed OOP  DJcutter – Distributed AOP Language Remote pointcut An extension to AspectJ

AOSD'04, Lancaster, UK 19 Thank you!  If you have any questions, please ask me clearly and loudly

AOSD'04, Lancaster, UK 20

AOSD'04, Lancaster, UK 21