Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cataloging and Detecting Architectural Bad Smells Joshua Garcia, Daniel Popescu, and Nenad Medvidovic, University of Southern California Yuanfang Cai,

Similar presentations


Presentation on theme: "Cataloging and Detecting Architectural Bad Smells Joshua Garcia, Daniel Popescu, and Nenad Medvidovic, University of Southern California Yuanfang Cai,"— Presentation transcript:

1 Cataloging and Detecting Architectural Bad Smells Joshua Garcia, Daniel Popescu, and Nenad Medvidovic, University of Southern California Yuanfang Cai, Drexel University

2 Motivation – Refactoring Architecture Successful systems are maintained over multiple years System’s Life-Cycle Properties worsen over time Understandability Testability Extensibility Reusability Restructuring/Refactoring helps to improve life-cycle properties Code Smells When and where to refactor a software system’s architecture? 2

3 Motivation – iRODS - Prescriptive 3 Source: https://www.irods.org/index.php/Introduction_to_iRODS

4 Motivation – iRODS - Descriptive 4

5 Contribution and Goals Categorization of Architectural Smells Components, Connectors, Interfaces, Data Elements, Concerns Separation of Concerns Coupling and Cohesion Novel Architectural Recovery Technique Identification of Elements Concern Meta-Classification Novel Architecture Representation Extended Augmented Constraint Network Design Structure Matrix Architectural Smell Detection 5

6 Connector Envy - Example Component exhibiting interaction-related functionality that should be delegated to connector Reusability, understandability, testability StrategyAnalyzerAgent from Emergency Response System 6

7 Architectural Recovery for Smells Component identification Hierarchical clustering Concerns through topic modeling SAA – “strategy,” “rule,” “region” Connector identification Pattern matching, Supervised Learning Interface and Data Element Identification Concern Meta-classification Application-specific or application-independent concern Supervised Learning 7

8 Component Identification 8 1 f1, f2, … fn 2 n

9 Component Identification 9 1 0, 1, … 1 2 0, 1, … 0...... n 1, 0, … 1

10 Component Identification 10 1 0, 1, … 1 2 1, 0, … 0...... n 1, 0, … 1 Cluster 1, 1, … 1 3 0, 1, … 0 Cluster 1, 1, … 0 4 … n-1

11 Cluster 1 Cluster 2 Component Identification 11 A B C D E Component 1 Component 2

12 Concerns through Topic Modeling 12 Component 1 Component 2 Stream Events UI Weather

13 Concerns through Topic Modeling 13 Component 2 Events Weather WordProbability Send0.2 Receive0.4 Event0.4 WordProbability Temperature0.7 Wind0.1 Humid0.2

14 Connector Identification 14 Component 1 Component 2 Stream Events UI Weather

15 Connector Identification 15 Component 1 Component 2 Stream – 0.1 Events – 0.1 UI – 0.9 Weather - 0.9

16 Connector Identification 16 Component 1 Component 2 Stream – 0.1 Events – 0.1 UI – 0.9 Weather - 0.9 Cluster 3 Events – 1.0 Connector

17 Novel Architecture Representation Extended Augmented Constraint Network Uniform, formal way of capturing of architectural decisions Constraint network, design rule, cluster set, concerns from topic models 17

18 Design Structure Matrix of ERS 18

19 Future Work Evaluation of the recovery technique Evaluation of the smell detection Expansion of the catalog 19

20 Thank You 20

21 Smells of Different Granularities Code smell Code smells are implementation structures that negatively affect system lifecycle properties Defined in terms of implementation-level constructs Classes Methods Statements Examples Long parameter list Large methods Code smells do not necessarily address architectural decisions Architectural smell A commonly used architectural decision that negatively impacts lifecycle properties Possible Causes Applying a design solution in an inappropriate context Mixing design fragments that have undesirable emergent behaviors Architectural Refactoring – The remedy Altering the internal structure of the system Altering the behaviors of internal system elements Avoid changing external system behavior 21

22 Ambiguous Interfaces – Description An Ambiguous Interface offers only one public interface Internally dispatches to multiple services Appears especially in event-based publish-subscribe systems Example: JMS User has to inspect the component’s implementation before knowing about its offered services Negatively affects Analyzability Understandability 22

23 Connector Envy – Description Connector roles Communication Coordination Conversion Facilitation Components with Connector Envy encompass extensive interaction-related functionality Example: Gridfarm Filesystem Daemon Violates separation of concerns Negatively affects Reusability Understandability Testability 23

24 Scattered Functionality – Description Multiple components are responsible for realizing the same high-level concern Some of those components are responsible for orthogonal concerns Example: Linux’s Status Reporting Violates the principle of separation of concerns twice Negatively affects Reusability Understandability Testability 24

25 Extraneous Connector - Description Two connectors of different types are used to link a pair of component Example: Events vs. Procedure Calls Example system: Example: Old MIDAS version Benefits of each connector type may cancel each other out This example negatively impacts Understandability Reusability Adaptability 25


Download ppt "Cataloging and Detecting Architectural Bad Smells Joshua Garcia, Daniel Popescu, and Nenad Medvidovic, University of Southern California Yuanfang Cai,"

Similar presentations


Ads by Google