Introduction To Software Architecture - Semantic Scholar

1y ago
6 Views
2 Downloads
2.28 MB
67 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Kelvin Chao
Transcription

Introduction to SoftwareArchitectureImed HammoudaChalmers University of Gothenburg

Who am I? Associate Professor of Software Engineering, previously inTampere, FinlandResearch interests– Software Architecture, Open Source, Software Ecosystems,Software Development Methods and Tools, Variability Management Developing and supporting open software architecturesStudying socio-technical dependencies in software developmentSoftware ecosystemsCoordinates:Imed.hammouda@cse.gu.se, hammouda@chalmers.se Room 416, floor 4, Jupiter building, Campus LindholmenPhone 46 31 772 60 40Introduction to Software Architecture2

What is software architecture?Architectural driversAddressing architectural driversArchitectural viewsExample systemIntroduction to Software Architecture3

What is Software Architecture? Software Architecture is the global organization of a softwaresystem, including– the division of software into subsystems/components,– policies according to which these subsystems interact,– the definition of their interfaces.T. C. Lethbridge & R. LaganièreIntroduction to Software Architecture4

What is Software Architecture? "The software architecture of a program or computing system isthe structure or structures of the system, which comprisesoftware components, the externally visible properties ofthose components, and the relationships among them."Len BassIntroduction to Software Architecture5

What is Software Architecture? “fundamental concepts or properties of a system in itsenvironment embodied in its elements, relationships, and inthe principles of its design and evolution.”ISO/IEC/IEEE ining-architecture.htmlIntroduction to Software Architecture6

Architectural Information IncreasesArchitecture is everything that a (group of)person(s) needs to let a large team successfullydevelop a (family of) productsRob van Ommering, Philips Natlab Add your own rt/glossary/community.cfmIntroduction to Software Architecture7

The Role of an Architect Central activities:– Design– Document– Assess– Recover– MaintainIntroduction to Software Architecture8

Levels of Architecture*Enterprise architectureSystem architectureSubsystemApplication ion to Software Architectureforall o in rupdate()Design patterns* Mowbray and Malveau9

Types of ArchitectureMobile SystemDisplayScreenshapeLargeKeypadKeypadScreen Colortypesize capacityMedium SmallCameraKey presstypeOperatingSystemComposition Rule:”Web” requires ”Internet”MessagingLinux Symbian SMS FaxSimultaneous No SimultaneousKey pressKey pressS60WebConnectivityMMS Email Cable Infrared Internet BluetoothS80Rationale:”Large” for gameapplicationsProduct familySingle ProductIntroduction to Software Architecture10

Increasing Amount of Software inSystemsIntroduction to Software Architecture11

10% of the lifecycledetermines90% of the costs and risks 100xIntroduction to Software onDesign1xArchitectingRequirements &SW fault repaircostsThe Importance of Architecture12

The Importance of Architecture “If a project has not achieved a system architecture, including itsrationale, the project should not proceed to full-scale systemdevelopment. Specifying the architecture as a deliverableenables its use throughout the development and maintenanceprocess”Barry BoehmIntroduction to Software Architecture13

The Importance of Architecture Software architecture:– provides a communication among stakeholders– captures early design decisions– acts as a transferable abstraction of a system– defines constraints on implementation– dictates organizational structure– inhibits or enables a system’s quality attributes– is analyzable and a vehicle for predicting system qualities– makes it easier to reason about and manage change– helps in evolutionary prototyping– enables more accurate cost and schedule estimatesIntroduction to Software Architecture14

What Drives Software Architecture? System requirements:– Functional needs (what the system should do)– Quality needs (properties that the system must possess such asavailability, performance, security, Design constraints– Development process– Technical constraints– Business constraints– Contractual requirements– Legal obligations– Economic factorsIntroduction to Software Architecture15

What Drives Software Architecture?*Plain Old Telephone System Feature:Skype Feature: – Call subscriberGood qualities:– Works during power shortage– Reliable– Emergency calls get locationinformation Architecture:Centralized hardware switch– Call subscriberGood qualities:– Scales without central––hardware changesEasy to add new featuresEasy deployment Architecture:Peer-to-peer software*George FairbanksIntroduction to Software Architecture16

Architectural Drivers Architectural drivers are the design forces that will influencethe early design decisions the architects makeArchitectural drivers are not all of the requirements for a system,but they are an early attempt to identify and capture thoserequirements, that are most influential to the architect makingearly design decisions. Architecturally Significant RequirementsArchietcts pay more attention to qualities that arrisefrom architecture choicesIntroduction to Software Architecture17

Functional Requirements Functional requirements specify what the software needs todo. They relate to the actions that the product must carry out inorder to satisfy the fundamental reasons for its existence.Business Level: defines the objective/goal of the project andthe measurable business benefits for doing it.User Level: user requirements are written from the user's pointof-view.System Level: defines what the system must do to processinput and provide the desired output.Introduction to Software Architecture18

Functional Requirements MoSCoW Method:– M - MUST: Describes a requirement that must be satisfied in thefinal solution for the solution to be considered a success.– S - SHOULD: Represents a high-priority item that should beincluded in the solution if it is possible. This is often a criticalrequirement but one which can be satisfied in other ways if strictlynecessary.– C - COULD: Describes a requirement which is considered desirablebut not necessary. This will be included if time and resourcespermit.– W - WON'T: Represents a requirement that stakeholders haveagreed will not be implemented in a given release, but may beconsidered for the future.Introduction to Software Architecture19

Functionality and Software Architecture It is the ability of the system or application to satisfy thepurpose for which it was designed.It drives the initial decomposition of the system.It is the basis upon which all other quality attributes arespecified.It is related to quality attributes like validity, correctness,interoperability, and security.Functional requirements often get the most focus in adevelopment project. But systems are often redesigned,not because of functional requirements.Introduction to Software Architecture20

Quality Attributes A quality attribute is a measurable or testable property of asystem that is used to indicate how well the system satisfies theneeds of its stakeholders.*A quality requirement is a specification of the acceptablevalues of a quality attribute that must be present in the system.Quality attributes should be:– Not subjective– In sufficient detail– Of a value and context (e.g: 180 seconds)*Bass Clements KazmanIntroduction to Software Architecture21

Quality Attributes*AttributeDescriptionPerformanceHow fast does it respond or execute?AvailabilityIs it available when an where I need to use it?SafetyHow well does it protect against damage?UsabilityHow easy it is for people to learn and use?InteroperabilityHow easily does it interconnect with other systems?IntegrityDoes it protect against unauthorized access and data loss?InstallabilityHow easy is it to correctly install the product?RobustnessHow well does it respond to unexpected operating conditions?ReliabilityHow long does it run before experiencing a failure?RecoverabilityHow quickly can the user recover from a failure?*EnfocusSolutionsIntroduction to Software Architecture22

Quality AttributesAttributeDescriptionRecoverabilityHow quickly can the user recover from a failure?EfficiencyHow well does it utilize processor capacity, disk space,memory, bandwidth, and other resources?FlexibilityHow easily can it be updated with new functionality?MaintainabilityHow easy is it to correct defects or make changes?PortabilityHow easily can it be made to work on other platforms?ReusabilityHow easily can we use components in other systems?ScalabilityHow easily can I add more users, servers, or otherextensions?SupportabilityHow easy will it be support after installation?TestabilityCan I verify that it eas implemented correctly?Introduction to Software Architecture23

ISO/IEC 25010:2011 Quality ModelFunctional Functional completenessFunctional correctnessFunctional yAvailabilityFault abilityModifiabilityTestabilityPerformance efficiencyUsabilitySecurityPortabilityTime behaviourResource utilizationCapacityAppropriateness recognizabilityLearnabilityOperabilityUser error protectionUser interface InstallabilityReplaceabilityIntroduction to Software Architecture24

ISO/IEC 25010:2011 Quality in Use UsefulnessTrustPleasureComfortFreedom from riskEconomic risk mitigationHealth and safety risk mitigationEnvironmental risk mitigationContext coverageContext completenessFlexibilityIntroduction to Software Architecture25

Quality Attributes & Software Architecture Different architectural styles address different sets of qualityattributes and to varying degrees– Architecture decides range of quality possibilities The specification of quality attributes affects the architecturalstyle of the system– Architectures are evaluated w.r.t quality attributes Not all quality attributes are addressed by the architecturaldesign, e.g. some aspects of usability (e.g. layouts) and someaspects of performance (e.g. algorithms)Impossible to maximize all quality attributes at once– Tradeoff: More of this less of that– Performance versus security– Everything versus time-to-market (or cost)Introduction to Software Architecture26

Specifying Quality Requirements A Quality Attribute Scenario is a quality attribute specificrequirement.– Stimulus – a condition that needs to be considered– Source of stimulus (e.g., human, computer system, etc.)– Environment - what are the conditions when the stimulus occurs?– Artifact – what elements of the system are stimulated.– Response – the activity undertaken after arrival of the stimulus.– Response measure – when the response occurs it should bemeasurable so that the requirement can be tested.Introduction to Software Architecture27

Specifying Quality RequirementsReliabilityStimulusDatabase unresponsive/crashSource of sponseDetect the failure, inform the system, use redundant database serverResponse MeasureDegraded mode not to exceed 5 minsIntroduction to Software Architecture28

Availability Concrete ScenarioIntroduction to Software Architecture29

Making Design Decisions To make each design decision, the software engineeruses knowledge of:– the application domain– the requirements– the design as created so far– the technology available– software design principles and ‘best practices’– what has worked well in the past”The architecture f(requirements,design methods, experience,knowledge, patterns, intuition, .)”Introduction to Software Architecture30

Making Design Decisions Quality attributes can be addressed through different(architectural) tactics:– Architectural styles: for example pipes-and-filters, MVC,––– blackboard, publish-subscribe, Design patterns: for example Abstract Factory, Adapter,Command, Observer, Tactics: A design decision: for example heartbeat, limit accessConverting quality requirement to functionality: for exampleexception handling, loggingQuality requirements can be distributed at the system level tothe subsystems or components that make up the system.Introduction to Software Architecture31

Example Architectural StyleRemote Interaction SystemPipes and FiltersIntroduction to Software Architecture32

Or it could have been dataComponentRemote Interaction SystemIntroduction to Software ArchitectureComponentComponentBlackboard33

Example Design n to Software Architecture34

Example Architectural TacticsIntroduction to Software Architecture35

Design Principles: Keep it Simple (KIS) Simplicity is a great virtue but it requires hard work toachieve itand education to appreciate it.And to make matters worse: complexity sells better.Introduction to Software Architecture36

Design Principles: Decomposition Breaking problem into independent smaller parts– Each individual component is smaller, and therefore easier tounderstand– Parts can be replaced or changed without having to replace orextensively change other parts.– Separate people can work on separate parts– An individual software engineer can specializeIntroduction to Software Architecture37

Design Principles: Coupling Coupling is a measure of interdependency betweenmodules.high couplingIntroduction to Software Architecturelow coupling38

Design Principles: Cohesion Cohesion is concerned with the relatedness within amodule.high cohesionIntroduction to Software Architecturelow cohesion39

Design Principles: Information Hiding What is inside, must stay inside.Introduction to Software Architecture40

Design Principles: No Circular DependenciesCallers must depend on callee,not vice versaThis violates an earlier designadvice: DecompositionIntroduction to Software Architecture41

Design Principles: Separation of Concerns Issues that are not related should be handled indifferent componentsTelecom protocol:decode1 ; handle1 ; decode2 ; handle2 ; decode3handle &decodeIntroduction to Software Architecturehandledecode42

Design Principles: Open/Closed Entities should be open for extension, but closed formodification.Introduction to Software Architecture43

Evaluating Quality Attributes Quality attributes can be evaluated through:– Scenario-based evaluation: for example change scenarios forassessing maintainability– Simulation: for example Prototyping is a form of simulation wherea part of the architecture is implemented and executed in the actualsystem context.– Mathematical modeling: for example, checking for potentialdeadlocks.– Experience-based assessment: this is based on subjectivefactors like intuition and expertise of software engineers.Introduction to Software Architecture44

ViewsIntroduction to Software Architecture45

’4 1’ View Model** Philippe KruchtenIntroduction to Software Architecture46

’4 1’ View Model* Logical– Focus: Functional requirements of the system.– Contents: Class diagrams, Sequence diagrams, Layer diagrams.Development (implementation)– Focus: Static organization of the software in its development environment– Contents: Component diagram, Package diagrams.Process– Focus: Runtime behavior of the system, such as the system processes andcommunication, concurrency, performance and scalability.– Contents: Activity diagrams.Physical (Deployment)– Focus: System Engineer’s perspective, looking at the system topology,deployment and communication.– Contents: Deployment diagrams.Scenarios– Focus: Use cases for illustrating and validating the architecture.– Contents: Use case diagrams.Introduction to Software Architecture47

Notations for Arch. Documentation Informal notations.– Views are depicted (often graphically) using general-purposediagramming and editing tools and visual conventions chosen forthe system at hand.– The semantics of the description are characterized in naturallanguage and cannot be formally analyzed.Introduction to Software Architecture48

Notations for Arch. Documentation Semiformal notations.– Views are expressed in a standardized notation that prescribesgraphical elements and rules of construction, but does not providea complete semantic treatment of the meaning of those elements.– Rudimentary analysis can be applied to determine if adescription satisfies syntactic properties. Unified ModelingLanguage (UML) is a semiformal notation in this sense.Introduction to Software Architecture49

Notations for Arch. Documentation Formal notations.– Views are described in a notation that has a precise (usuallymathematically based) semantics.– Formal analysis of both syntax and semantics is possible. There–are a variety of formal notations for software architecture available,although none of them can be said to be in widespread use.Architecture Description Languages (ADLs)Introduction to Software Architecture50

Online Catering 09427.aspx/https://www.ibm.com5

Logical View: Layer DiagramIntroduction to Software Architecture1Layer2Dependency3Bidirectional dependency4Comment5Comment link52

Logical View: Component DiagramIntroduction to Software Architecture1Component2Provided interface3Required interface4Dependency53

Logical View: Class DiagramIntroduction to Software 5aAggregation5bComposition9Generalization54

Logical View: Sequence DiagramIntroduction to Software Architecture1Lifeline2Actor3Sync. Message4Async. Message5Execution occurence55

Development View: Layer DiagramTeam ATeam BTeam CIntroduction to Software Architecture56

Process View: Activity DiagramIntroduction to Software Architecture1Action2Control flow3Initial node4Final node5Decision node7Merge node57

Process View: Activity DiagramIntroduction to Software Architecture11Fork node12Join node58

Physical View: Deployment Diagram1 Node2 AssociationIntroduction to Software Architecture59

Physical View: Deployment Diagram3 ArtifactIntroduction to Software Architecture60

Scenarios View: Use Case DiagramIntroduction to Software Architecture1Actor2Use Case3Association4Subsystem61

Scenarios View: Use Case DiagramIntroduction to Software 62

Data View: Activity DiagramIntroduction to Software Architecture15, 18Object node16Input pin17Output pin63

The ”Sad” RealityIntroduction to Software Architecture64

Wrap-up: IEEE-Std-1471 Conceptual Frameworkestablishes methods forconsists onfulfills1.*1.*providesparticipates ininfluencesdescribed byArchitectural Descriptionhas anArchitectureSystemselectsidentifies 1.*1.*used to coverorganized by1.*participates in1.*ViewConcernis addressed to1.*1.*1.*hasStakeholderIntroduction to Software Architecture1.*is important toidentifiesViewpointconforms to1.* has source1.*1.* hasLibraryViewpoint65

Wrap-up Architecture should be the product of a single architect or asmall group of architects with an identified leader.Architect team should have functional requirements for thesystem and an articulated prioritized list of quality attributesthat the architecture is expected to satisfy.Architecture should be well documented, and circulated andreviewed by system stakeholders.Architecture should be analyzed for applicable quantitativemeasures and formally evaluated for quality attributes before itis too late to make changes to it.Architecture should lend itself to incremental refinement andimplementation.Introduction to Software Architecture66

Tack så mycket!Frågor?Introduction to Software Architecture67

Introduction to Software Architecture The Importance of Architecture Software architecture: - provides a communication among stakeholders captures early design decisions acts as a transferable abstraction of a system defines constraints on implementation dictates organizational structure inhibits or enables a system's quality attributes is analyzable and a vehicle for predicting system .

Related Documents:

Semantic Analysis Chapter 4 Role of Semantic Analysis Following parsing, the next two phases of the "typical" compiler are –semantic analysis –(intermediate) code generation The principal job of the semantic analyzer is to enforce static semantic rules –constructs a syntax tree (usua

WibKE – Wiki-based Knowledge Engineering @WikiSym2006 Our Goals: Why are we doing this? zWhat is the semantic web? yIntroducing the semantic web to the wiki community zWhere do semantic technologies help? yState of the art in semantic wikis zFrom Wiki to Semantic Wiki yTalk: „Doing Scie

(semantic) properties of objects to place additional constraints on snapping. Semantic snapping also provides more complex lexical feedback which reflects potential semantic consequences of a snap. This paper motivates the use of semantic snapping and describes how this technique has been implemented in a window-based toolkit. This

tive for patients with semantic impairments, and phono-logical tasks are effective for those with phonological impairments [4,5]. One of the techniques that focus on semantic impair-ments is Semantic Feature Analysis (SFA). SFA helps patients with describing the semantic features which ac-tivate the most distinguishing features of the semantic

A. Personalization using Semantic web: Semantic technologies promise a next generation of semantic search engines. General search engines don’t take into consideration the semantic relationships between query terms and other concepts that might be significant to the user. Thus, semantic web vision and its core ontology’s are used to .

Semantic wikis enrich the wiki technology with semantic information. They are quite popular, as evidenced by the large number of semantic wiki systems. Examples are: KnowWE [1], OntoWiki [6] or SweetWiki [3]. The most popular is the Semantic MediaWiki (SMW) [7] that is bas

{ Semantic reasoning for network topology management { Semantic web in sensor data mashups { Semantic sensor context management and provenance { Citizen sensors, participatory sensing and social sensing The First International Semantic Sensor Network Workshop was held with ISWC in 2006, ve

Semantic search in video can be modeled as a typical retrieval problem in which given a user query, we are in-terested in returning a ranked list of relevant videos. The proposed system comprises four major components, name-ly Video Semantic INdexing (VSIN), Semantic Query Gen-eration (SQG),