TRANSPARENT EXTENSION OF SINGLE- USER APPLICATIONS TO MULTI-USER REAL-TIME COLLABORATIVE SYSTEMS An Aspect Oriented Approach to Framework Integration ICEIS 2007 Special Session 3 - Computer Supported Collaborative Editing Ansgar R.S.Gerlicher
ICEIS Ansgar Gerlicher Content Introduction Aspect Oriented Programming The Application and the Framework used Integration Steps Conclusions Demonstration Video
ICEIS Ansgar Gerlicher Introduction The Challenge Extend an existing single-user application with collaborative functionality without changing the applications source code (transparent extension) and with as little effort as possible The Approach Concentrate on the data model manipulation concerns and use aspect-oriented programming to integrate a collaboration framework
ICEIS Ansgar Gerlicher Aspect Oriented Programming (AOP) A programming paradigm originated by Gregor Kiczales et al. at Xerox PARC, 1997* Attempts to aid programmers in the separation of concerns, specifically crosscutting concerns Aspects can alter the behavior of the base code by applying advices Advices define additional behaviour at join points Join points are specified by using a quantification or query called a pointcut AOP extensions for many programming languages exist. AspectJ is the most popular AOP extension for the Java programming language * Kiczales, G.,et al. Aspect-Oriented Programming.In Proc. of ECOOP 1997, Springer-Verlag LNCS June 1997.
ICEIS Ansgar Gerlicher The Application and the Framework used GLIPS Graffiti SVG graphics editing application Open source graphics editor developed by ITRIS Java based Supports editing of SVG graphic documents Uses the W3C DOM API internally for manipulation of the SVG documents Collaborative Editing Framework for XML (CEFX) Real-Time collaboration on XML documents Optional locking of nodes Awareness support Flexible plug-in architecture
ICEIS Ansgar Gerlicher The Collaborative Editing Framework for XML (CEFX) CEFX Architecture Overview Other components
ICEIS Ansgar Gerlicher Integration Steps 1. Identify the crosscutting concerns of data model manipulation of the single-user application (GLIPS uses the DOM API) 2. Specify join points for the relevant calls to the data model manipulation API (DOM API) 3. Define advices for delegating corresponding actions to the collaborative editing framework
ICEIS Ansgar Gerlicher Call Interception Single-User Application Element Advice setAttribute CEFX DOMAdapter CEFX Controller setAttribute(name:String,value:String) setAttribute(target:Element,name:String,value:String) Element_setAttribute(target:Element,name:String,value:String ) Operation= createUpdateOperation(...) executeOperation(op:Operation) Integrating CEFX into GLIPS using AOP Call interception, delegation to Advice: void around(Element p, String attr, String value) JoinPoint: call(void setAttribute(String,String)...)
ICEIS Ansgar Gerlicher Conclusion Pros Little programming effort: only seven advices where needed No source-code modification necessary Application-transparent Reusable advices Acceptable performance Cons Still some AOP implementations require source code recompilation AOP is still an immature technology, resulting in lack of tool support and adoption risks
ICEIS Ansgar Gerlicher Collaborative Editing Demonstration
Thank you for your attention ICEIS 2007 Ansgar R.S.Gerlicher Stuttgart Media University (HdM) and London College of Communication