130 likes | 233 Views
State Consistency Strategies for COTS Integration. Sven Johann Teknowledge Corp. / University of Applied Sciences Mannheim Alexander Egyed Teknowledge Corp. Outline. Motivation for State Consistency Realization of State Consistency
E N D
State Consistency Strategies for COTS Integration Sven Johann Teknowledge Corp. / University of Applied Sciences Mannheim Alexander Egyed Teknowledge Corp.
Outline • Motivation for State Consistency • Realization of State Consistency • State Consistency between Semantically Different Domains
Motivation (1) • COTS software integrated into system: • passive COTS software (back-end) • active COTS software (front-end) • E.g., UML Model Analysis Tool • Model Analysis Tool UML Modeling Tool (Rose) • New Requirement: Only changes in UML should be re-analyzed (incremental analysis instead of batch transformation and re-analysis of all) • UML Modeling Tool (Rose) Model Analysis Tool • BUT: Rose does not want to be a service requesting component!
Motivation (2) UML Model Analysis Tool • Model analysis tool gets notified about Rose model changes instantly • when it changed and • where it changed • Solution?: Change Notification, e.g., MVC, Observer, Publisher/Subscriber • Problem: COTS software typically does not support this solution (Rose does not) • And we cannot do anything about that (no source code)
Detect a Change (1) • A change notification mechanism for COTS? • Observations: • Changes seem to happen by mouse clicks and keyboard events only (when) • Changes seem to happen to selected elements only (where) • We assume that selected elements have changed after every event done? • Rose tells us about selected elements • Our Instrumentation technology tells about keyboard and mouse event • Double-clicking a class selects the class and opens its properties not a change
Detect a Change (2) • Better Solution: • Cache the current state of element(s) when first selected • Compare cached state with latest state after keyboard and mouse events. • How do we know about state? • Rose has a programmatic API to access all properties of UML model elements (state) => Difference between cached state and latest state is a change!
Detect a Change (3) • Exceptions for new and deleted elements: • How do we know about newly created elements? • indexing system that keeps track of things we have seen before • Deleted elements are in cache, but not in Rose • exception implies no longer available
Detect a Change (4) • Non-selected elements can be changed after all: • deletion of a class in Rose also deletes all its relationships, attributes and methods • Only class was selected (not relationships, attributes, etc.) • Requires knowledge of side effects of Rose actions that need to be handled explicitly • And there are other anomalies that have to be handled individually => BUT WE CAN DO IT. IN FACT, WE HAVE DONE IT FOR RATIONAL ROSE AND OTHER COTS SOFTWARE
Abstract Component Attribute Variability TaggedValue Imagine: ESCM Model Analysis Tool for Rose- ESCM is semantically very different from UML- The graphical notation of Rose is not UML any longer Batch transformation Non-trival mapping (one-to-many) (many-to-many) Find a way to translate UML change notifications into ESCM change notification
Abstract Component Attribute Abstract Component Attribute Variability TaggedValue CompositeTag Variability TaggedValue TaggedValue How to find the When and Where? Trivial: re-transform all & compare • ESCM model always consistent with Rose • ESCM change notifications whenever there is inconsistency
Abstract Component Attribute Abstract Component Variability Variability TaggedValue TaggedValue CompositeTag TaggedValue How to find the When and Where? Better: re-transform partially & compare & update • ESCM model always consistent with Rose • ESCM change notifications whenever there is inconsistency
Thank You! • Design critique • Design navigation • Design feedback • Design sharing