Presentation is loading. Please wait.

Presentation is loading. Please wait.

Architectural Modeling and Domain-Specific Architecture

Similar presentations


Presentation on theme: "Architectural Modeling and Domain-Specific Architecture"— Presentation transcript:

1 Architectural Modeling and Domain-Specific Architecture
CS310 – Software Engineering

2 What to Model in Architectures?
Basic architectural elements Components Connectors Interfaces Configurations Rationale – reasoning behind decisions

3 Important Characteristics of Models
A model is ambiguous if it is open to more than one interpretation A model is accurate if it is correct, conforms to fact, or deviates from correctness within acceptable limits A model is precise if it is sharply exact or delimited

4 Accuracy vs. Precision Inaccurate and imprecise: incoherent or contradictory assertions Accurate but imprecise: ambiguous or shallow assertions Accurate and precise: detailed assertions that are correct Inaccurate but precise: detailed assertions that are wrong

5 Views and Viewpoints Generally, it is not feasible to capture everything we want to model in a single model or document The model would be too big, complex, and confusing So, we create several coordinated models, each capturing a subset of the design decisions Generally, the subset is organized around a particular concern or other selection criteria We call the subset-model a ‘view’ and the concern (or criteria) a ‘viewpoint’

6 Views and Viewpoints Example
Deployment view of a 3-tier application Deployment view of a Lunar Lander system Both instances of the deployment viewpoint

7 Commonly-Used Viewpoints
Logical Viewpoints Capture the logical (often software) entities in a system and how they are interconnected. Physical Viewpoints Capture the physical (often hardware) entities in a system and how they are interconnected. Deployment Viewpoints Capture how logical entities are mapped onto physical entities.

8 Commonly-Used Viewpoints (cont’d)
Concurrency Viewpoints Capture how concurrency and threading will be managed in a system. Behavioral Viewpoints Capture the expected behavior of (parts of) a system.

9 Example of View Inconsistency

10 Many Modeling-Language Options
Generic approaches Natural language PowerPoint-style modeling UML, the Unified Modeling Language Early architecture description languages Darwin Rapide Wright Domain- and style-specific languages Koala Weaves AADL Extensible architecture description languages Acme ADML xADL

11 Natural Language Spoken/written languages such as English Advantages
Highly expressive Accessible to all stakeholders Good for capturing non-rigorous or informal architectural elements like rationale and non-functional requirements Plentiful tools available (word processors and other text editors) Disadvantages Ambiguous, non-rigorous, non-formal Often verbose Cannot be effectively processed or analyzed by machines/software

12 Natural Language Example
“The Lunar Lander application consists of three components: a data store component, a calculation component, and a user interface component. The job of the data store component is to store and allow other components access to the height, velocity, and fuel of the lander, as well as the current simulator time. The job of the calculation component is to, upon receipt of a burn-rate quantity, retrieve current values of height, velocity, and fuel from the data store component, update them with respect to the input burn-rate, and store the new values back. It also retrieves, increments, and stores back the simulator time. It is also responsible for notifying the calling component of whether the simulator has terminated, and with what state (landed safely, crashed, and so on). The job of the user interface component is to display the current status of the lander using information from both the calculation and the data store components. While the simulator is running, it retrieves the new burn-rate value from the user, and invokes the calculation component.”

13 Related Alternatives Ambiguity can be reduced and rigor can be increased through the use of techniques like ‘statement templates,’ e.g.: The (name) interface on (name) component takes (list-of-elements) as input and produces (list-of-elements) as output (synchronously | asynchronously). This can help to make rigorous data easier to read and interpret, but such information is generally better represented in a more compact format

14 Informal Graphical Modeling
General diagrams produced in tools like PowerPoint and OmniGraffle Advantages Can be aesthetically pleasing Size limitations (e.g., one slide, one page) generally constrain complexity of diagrams Extremely flexible due to large symbolic vocabulary Disadvantages Ambiguous, non-rigorous, non-formal But often treated otherwise Cannot be effectively processed or analyzed by machines/software

15 Informal Graphical Model Example

16 UML – the Unified Modeling Language
13 loosely-interconnected notations called diagrams that capture static and dynamic aspects of software-intensive systems Advantages Support for a diverse array of viewpoints focused on many common software engineering concerns Ubiquity improves comprehensibility Extensive documentation and tool support from many vendors Disadvantages Needs customization through profiles to reduce ambiguity Difficult to assess consistency among views Difficult to capture foreign concepts or views

17 UML Example Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2010 John Wiley & Sons, Inc. Reprinted with permission.

18 Domain-Specific Software Engineering
The traditional view of software engineering shows us how to come up with solutions for problems de novo But starting from scratch every time is infeasible This will involve re-inventing many wheels Once we have built a number of systems that do similar things, we gain critical knowledge that lets us exploit common solutions to common problems In theory, we can simply build “the difference” between our new target system and systems that have come before

19 Examples of Domains Compilers for programming languages
Consumer electronics Electronic commerce system/Web stores Video game Business applications Basic/Standard/“Pro” We can subdivide, too: Avionics systems Boeing Jets Boeing

20 Traditional Software Engineering
One particular problem can be solved in innumerable ways

21 Architecture-Based Software Engineering
Given a single problem, we select from a handful of potential architectural styles or architectures, and go from these into specific implementations

22 Domain-Specific Software Engineering
We map regions of the problem space (domains) into domain-specific software architectures (DSSAs) These are specialized into application-specific architectures These are implemented

23 Three Key Factors of DSSE
Domain Must have a domain to constrain the problem space and focus development Technology Must have a variety of technological solutions—tools, patterns, architectures & styles, legacy systems—to bring to bear on a domain Business Business goals motivate the use of DSSE Minimizing costs: reuse assets when possible Maximize market: develop many related applications for different kinds of end users

24 Becoming More Concrete
Applying DSSE means developing a set of artifacts more specific than an ordinary software architecture Focus on aspects of the domain Focus on domain-specific solutions, techniques, and patterns These are Domain Model Reference Requirements Reference Architecture

25 Domain Model A domain model is a set of artifacts that capture information about a domain Functions performed Objects (also known as entities) that perform the functions, and on which the functions are performed Data and information that flows through the system Standardizes terminology and semantics Provides the basis for standardizing (or at least normalizing) descriptions of problems to be solved in the domain

26 (Partial) Domain Dictionary
Lunar Module (LM): this is the portion of the spacecraft that lands on the moon. It consists of two main parts: the Ascent Stage (which holds the crew cabin) and the Descent Stage, which contains thrusters used for controlling the landing of the LM. Reaction Control System (RCS): a system on the Lunar Module responsible for the stabilization during lunar surface ascent/descent and control of the spacecraft’s orientation (attitude) and motion (translation) during maneuvers Vertical velocity (see also One-dimensional motion): For a free-falling object with no air resistance, ignoring the rotation of the lunar surface, the altitude is calculated as follows: y = ½ * a * t2 + vi * t + yi y = altitude a = constant acceleration due to gravity on a lunar body (see Acceleration for sample values) t = time in seconds; vi = initial velocity; yi = initial altitude When thrust is applied, the following equation is used: y = ½ * (aburner – agravity) * t2 + vi * t + yi aburner = constant acceleration upward due to thrust agravity = constant acceleration due to gravity on a lunar (see Acceleration for sample values)

27 Info Model: Context Info Diagram
Defines high-level entities Defines what is considered inside and outside the domain (or subdomains) Defines relationships and high-level flows

28 Info Model: Entity-Relationship Diagram
Defines entities and cardinal relationships between them

29 Info Model: Object Diagram
Defines attributes and operations on entities Closely resembles class diagram in UML but may be more abstract

30 Feature Model: Feature Relationship Diagram
Feature Relationship Diagram – Landing Phase Mandatory: The Lunar Lander must continually read altitude from the Landing Radar and relay that data to Houston with less than 500 msec of latency. Astronauts must be able to control the descent of the Lunar Lander using manual control on the descent engine. The descent engine must respond to control commands in 250msec, with or without a functioning DSKY… Optional/Variant: Lunar Lander provides the option to land automatically or allow the crew to manually steer the spacecraft. Quality Requirements: Real-time requirements: The thrusters and the descent engine must be able to respond to commands from the computer system in real-time. Fault tolerance: Lunar Lander must be able to continue in its flight-path even when the main computer system (Primary Navigation Guidance & Control) goes down. Lunar Lander must be able to maintain system altitude even when one of the thrusters and propellant supplies goes down in the Reaction Control System. Describes overall mission operations of a system Describes major features and decomposition

31 Feature Model: Use Case Diagram
Defines use cases within the domain Similar to use case models in UML

32 Feature Model: Representation Diagram
Defines how information is presented to human users

33 Operational Model: Data Flow Diagram
Focuses on data flow between entities with no notion of control

34 Operational Model: Control Flow Diagram
Focuses on control flow between entities separate from data flow

35 Operational Model: State Transition Diagram
Focuses on states of systems and transitions between them Resembles UML state diagrams

36 Reference Requirements
Mandatory Must display the current status of the Lunar Lander (horizontal and vertical velocities, altitude, remaining fuel) Must indicate points earned by player based on quality of landing Optional May display time elapsed Variant May have different levels of difficulty based on pilot experience (novice, expert, etc) May have different types of input depending on whether Auto Navigation is enabled Auto Throttle is enabled May have to land on different celestial bodies Moon Mars Jupiter’s moons Asteroid Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

37 Reference Architecture
Definition. Reference architecture is the set of principal design decisions that are simultaneously applicable to multiple related systems, typically within an application domain, with explicitly defined points of variation. Reference architectures are still architectures (since they are also sets of principal design decisions) Distinguished by the presence of explicit points of variation (explicitly “unmade” decisions)

38 Example Reference Architecture
Structural view of Lunar Lander DSSA Invariant with explicit points of variation Satellite relay Sensors

39 Product Lines A set of related products that have substantial commonality In general, the commonality exists at the architecture level One potential ‘silver bullet’ of software engineering Power through reuse of Engineering knowledge Existing product architectures, styles, patterns Pre-existing software components and connectors

40 Business vs. Engineering Product Lines
Business Product Line A set of products marketed under a common banner to increase sales and market penetration through bundling and integration Engineering Product Line A set of products that have substantial commonality from a technical/engineering perspective Generally, business product lines are engineering product lines and vice-versa, but not always Applications bundled after a company acquisition Chrysler Crossfire & Mercedes SLK V6

41 A Business or Engineering Product Line?
40% reuse of Mercedes parts in the Crossfire

42 Business Motivation for Product Lines
Traditional Software Engineering

43 Business Motivation for Product Lines
Traditional Software Engineering

44 Business Motivation for Product Lines
Product Line-Based Software Engineering

45 Capturing Product Line Architectures
Common: features common to all products A: features specific to product A B: features specific to product B Product A = Common + A Product B = Common + B

46 A Product-Line Architecture
Definition: A product-line architecture captures the architectures of many related products simultaneously Generally employs explicit variation points in the architecture indicating where design decisions may diverge from product to product

47 Remember This?

48 Growing Sophistication of Consumer Devices

49 Families of Related Products

50 Philips’ Solution – Architecture

51 Case Study – Call Center Customer Care

52 Some Additional Resources
The entire deck is great, but particularly interesting are things starting on slide titled “ARCHITECTURAL DESIGN-1”


Download ppt "Architectural Modeling and Domain-Specific Architecture"

Similar presentations


Ads by Google