Topic 06 Architectural Design - cs-is1.bradley.edu

13
1 Topic # 06 Topic # 06 Software Architectural Design Software Architectural Design (Ch. 9) (Ch. 9) 2 Software Architecture Software Architecture The goal of the architectural The goal of the architectural model model is to allow the software is to allow the software engineer to view and evaluate engineer to view and evaluate the the system system as a whole as a whole (as a (as a single unit) single unit) before moving to before moving to component design. component design. Software architecture Software architecture a framework made up of the a framework made up of the system structures that system structures that comprises comprises a) the software a) the software components components (objects) with their properties, (objects) with their properties, and and b) the b) the relationships (links) relationships (links) among these components. among these components.

Transcript of Topic 06 Architectural Design - cs-is1.bradley.edu

Page 1: Topic 06 Architectural Design - cs-is1.bradley.edu

1

Topic # 06Topic # 06

Software Architectural DesignSoftware Architectural Design

(Ch. 9)(Ch. 9)

2

Software ArchitectureSoftware Architecture

The goal of the architectural The goal of the architectural modelmodel

is to allow the software is to allow the software engineer to view and evaluate engineer to view and evaluate the the systemsystem as a wholeas a whole (as a (as a single unit)single unit) before moving to before moving to component design.component design.

Software architectureSoftware architecture ––

a framework made up of the a framework made up of the system structures that system structures that comprises comprises

a) the software a) the software componentscomponents(objects) with their properties, (objects) with their properties, and and

b) the b) the relationships (links)relationships (links)among these components. among these components.

Page 2: Topic 06 Architectural Design - cs-is1.bradley.edu

3

Why “Software Architecture”?Why “Software Architecture”?

The architecture The architecture is not the operational softwareis not the operational software..

Rather, it is a type of representation that enables a software eRather, it is a type of representation that enables a software engineer to: ngineer to:

(1)(1) analyze the effectivenessanalyze the effectiveness of the design in meeting its statedof the design in meeting its stated

requirements, requirements,

(2) (2) consider architectural alternativesconsider architectural alternatives at a stage when making design at a stage when making design changes is still relatively easy, and changes is still relatively easy, and

(3)(3) reduce the risksreduce the risks associated with the construction of the software.associated with the construction of the software.

Analogy: Design of a house = rooms, floors, fire places, etc., but there is still no information about specifics or details on furniture, wallpapers, etc.

4

Why is Software Architecture Important?Why is Software Architecture Important?

The architecture highlights early design decisionsThe architecture highlights early design decisions that will have a profound impact on all that will have a profound impact on all software engineering work that follows and, as important, on thesoftware engineering work that follows and, as important, on the ultimate success of the ultimate success of the system as an operational entity. system as an operational entity. As a result, As a result, -- financial resources (project cost),financial resources (project cost),-- human resources (people to be involved into a project and theirhuman resources (people to be involved into a project and their skills and qualifications)skills and qualifications)-- technological resources (hardware, software, equipment, etc.)technological resources (hardware, software, equipment, etc.)

-- project timetable and project duration,project timetable and project duration,and other types of resources will be SIGNIFICANTLY AFFECTED and other types of resources will be SIGNIFICANTLY AFFECTED by selected software by selected software architecturearchitecture..

Representations of software architecture act as enablerRepresentations of software architecture act as enabler for communication between all for communication between all parties (stakeholders) interested in the development of a computparties (stakeholders) interested in the development of a computerer--based system.based system.

Architecture “constitutes a relatively small, intellectually graArchitecture “constitutes a relatively small, intellectually graspable modespable mode of how the of how the system is structured and how its components work together”.system is structured and how its components work together”.

Page 3: Topic 06 Architectural Design - cs-is1.bradley.edu

5

Basic Architectural Styles of Software SystemsBasic Architectural Styles of Software Systems

1. Data centered data store (e.g., file or database) lies at the centerof this architecture and is accessed frequently byother components that modify data

2. Data flow input data is transformed by a series of computational or manipulative components intooutput data

3. Call and return program structure decomposes function intocontrol hierarchy with main program invokesseveral subprograms

4. Object-oriented components of system encapsulate data andoperations, communication between componentsis by message passing

5. Layered several layers are defined, each accomplishingoperations that progressively become closer tothe machine instruction set

6

1. Data1. Data--Centered Software ArchitectureCentered Software Architecture

A data store resides at the center.

Client software accesses a central repository.

It promotes integrability – new clients can be added and existing clients can be changes WITHOUT concern about other clients.

(Ex: online shopping – Amazon.com, Neflix.com, digital or online libraries and repositories of files such as MERLOT, etc.)

Page 4: Topic 06 Architectural Design - cs-is1.bradley.edu

7

2. Data2. Data--Flow Software Architecture (1)Flow Software Architecture (1)

This type is applied when input data are to be transformed through a series of computational components into output data = “a pipe and filter” pattern

Ex # 1 : Taxes Calculator: a) Federal Taxes -> pipe # 1; b) State Taxes -> pipe # 2,

c) Local Taxes - pipe # 3, d) Other – pipe # 4, etc.

Ex # 2: Multitasking operating systems: Task 1 (pipe 1), task 2 (pipe 2), etc.

8

2. Data2. Data--Flow Software Architecture (2)Flow Software Architecture (2)

Ex # 3: Solver of equations:

a) quadratic equations -> pipe # 1;

b) cubic equations -> pipe # 2,

c) ODEs – pipe # 3,

d) partial differential equations – pipe # 4, etc.

Page 5: Topic 06 Architectural Design - cs-is1.bradley.edu

9

3. “Call and Return” Software Architecture3. “Call and Return” Software Architecture

This type is relatively easy can be modified and scaled.

(Ex # 1: Main program – subprograms architectures in scientific research programs – solving of differential equations.

Ex # 2: Remote software components are distributed across multiple computers on a network.

Numeric Integration of ODEs (to simulate mechanical, electrical, hydraulic, thermal systems):

Ordinary differential equations

Nonlinear algebraic equations

Linear algebraic equations

LU-factorization

Gauss Method

10

4. Object4. Object--Oriented ArchitectureOriented Architecture

Encapsulation:Encapsulation:

Objects Objects -- encapsulate both data and data manipulation procedures needed tencapsulate both data and data manipulation procedures needed to o describe the content and behavior of a real world entity describe the content and behavior of a real world entity

Class Class -- generalized description (template or pattern) that describes a generalized description (template or pattern) that describes a collection of collection of similar objects similar objects

InheritanceInheritanceprovides a means for allowing subclasses to reuse existing superprovides a means for allowing subclasses to reuse existing superclass data and class data and procedures; also provides mechanism for propagating changesprocedures; also provides mechanism for propagating changes

Abstraction:Abstraction:provides operation of object and classes with different type of provides operation of object and classes with different type of informationinformation

PolymorphismPolymorphism

provides a mechanism that allows several objects in an class hieprovides a mechanism that allows several objects in an class hierarchy to have rarchy to have different methods with the same name (instances of each subclassdifferent methods with the same name (instances of each subclass will be free to will be free to respond to messages by calling their own version of the method) respond to messages by calling their own version of the method)

Page 6: Topic 06 Architectural Design - cs-is1.bradley.edu

11

5. Layered Software Architecture5. Layered Software Architecture

This type usually represents software of operating systems – UNIX, Linux, etc.

At the outer layer, components service user interface operations.

At the inner layer, components perform core operations.

Intermediate layers provide utility services and application software functions.

12

Topic # 06Topic # 06

Software Architectural DesignSoftware Architectural Design

InIn--Classroom ExerciseClassroom Exercise

Page 7: Topic 06 Architectural Design - cs-is1.bradley.edu

13

Other Types of SW ArchitecturesOther Types of SW Architectures

BlackboardBlackboard

ClientClient--serverserver (2(2--tier, ntier, n--tier, peertier, peer--toto--peer, Cloud Computing all use this model) peer, Cloud Computing all use this model)

Distributed computingDistributed computing

Event Driven ArchitectureEvent Driven Architecture

FrontFront--end and backend and back--endend

Implicit invocationImplicit invocation

Monolithic applicationMonolithic application

PeerPeer--toto--peerpeer

PlugPlug--ins (Addins (Add--ins)ins)

Representational State TransferRepresentational State Transfer

Rule evaluationRule evaluation

SearchSearch--oriented architectureoriented architecture (A pure SOA implements a service for every data access point) (A pure SOA implements a service for every data access point)

ServiceService--oriented architectureoriented architecture

Shared nothing architectureShared nothing architecture

Software Software componentrycomponentry (strictly module(strictly module--based, usually based, usually objectobject--oriented programmingoriented programming within within modules, slightly less monolithic) modules, slightly less monolithic)

Space based architectureSpace based architecture

StructuredStructured (module(module--based but usually monolithic within modules) based but usually monolithic within modules)

ThreeThree--tier modeltier model (An architecture with Presentation, Business Logic and Database(An architecture with Presentation, Business Logic and Database tiers)tiers)

14

An Example: PeerAn Example: Peer--toto--Peer ArchitecturePeer Architecture

A peerA peer--toto--peer distributed network architecturepeer distributed network architecture is composed of participants that make a portion is composed of participants that make a portion of their resources (such as processing power, disk storage or neof their resources (such as processing power, disk storage or network bandwidth) directly twork bandwidth) directly available to other network participants, without the need for ceavailable to other network participants, without the need for central coordination instances ntral coordination instances (such as servers or stable hosts). (such as servers or stable hosts).

Peers are both suppliers and consumers of resources,Peers are both suppliers and consumers of resources, in contrast to the traditional in contrast to the traditional clientclient--serverservermodel where only servers supply, and clients consume.model where only servers supply, and clients consume.

PeerPeer--toto--peer was popularized by peer was popularized by file sharingfile sharing systems like systems like NapsterNapster..

Page 8: Topic 06 Architectural Design - cs-is1.bradley.edu

15

An Example: PeerAn Example: Peer--toto--Peer ArchitecturePeer Architecture

Active peerActive peer--toto--peer technologies include:peer technologies include:

Many Many file sharingfile sharing networks, including networks, including NapsterNapster, , GnutellaGnutella, , G2G2 and and FastTrackFastTrack. . PeerPeer--toto--peer file peer file sharingsharing popularized peerpopularized peer--toto--peer technologies. As of 2009, it is the largest contributor of peer technologies. As of 2009, it is the largest contributor of network network traffic on the Internet. traffic on the Internet.

The The JXTAJXTA extensions of extensions of JavaJava. . Distributed hash tablesDistributed hash tables The The sciencenetsciencenet P2P search engine. P2P search engine. Pennsylvania State University, MIT and Simon Fraser University aPennsylvania State University, MIT and Simon Fraser University are carrying on a project called re carrying on a project called

LionShareLionShare designed for facilitating file sharing among educational institdesigned for facilitating file sharing among educational institutions globally. utions globally. Delivery of TV content over a P2P network (Delivery of TV content over a P2P network (P2PTVP2PTV) ) SkypeSkype, one of the most widely used internet phone applications is usi, one of the most widely used internet phone applications is using P2P technology. ng P2P technology. VoIPVoIP (using application layer protocols such as (using application layer protocols such as SIPSIP) ) Streaming mediaStreaming media. . P2PTVP2PTV and and PDTPPDTP. Applications include . Applications include TVUPlayerTVUPlayer, , JoostJoost, , CoolStreamingCoolStreaming, ,

CyberskyCybersky--TVTV, , TVantsTVants, , PPLivePPLive, , LiveStationLiveStation Instant messagingInstant messaging and and online chatonline chat PeercastingPeercasting for multicasting streams. See for multicasting streams. See PeerCastPeerCast, , IceShareIceShare, , FreeCastFreeCast, , RawflowRawflow UsenetUsenet for distributed discussion. See also for distributed discussion. See also list of Usenet newsreaderslist of Usenet newsreaders WindowsWindows PeerPeer--toto--Peer. Distributed peer application development, collaborationPeer. Distributed peer application development, collaboration[9][9] Shipped with Shipped with

AdvancedAdvanced Cloud computingCloud computing

16

An Example: PlugAn Example: Plug--In ArchitectureIn Architecture

Software applications support plugSoftware applications support plug--ins for many reasons. Some of the main reasons include:ins for many reasons. Some of the main reasons include:

to enable to enable thirdthird--party developersparty developers to create capabilities to extend an application to create capabilities to extend an application

to support features yet unforeseen to support features yet unforeseen

to reduce the size of an application to reduce the size of an application

to separate to separate source codesource code from an application because of incompatible from an application because of incompatible software licensessoftware licenses. .

Examples of applications and their plugExamples of applications and their plug--ins include:ins include:

Microsoft OfficeMicrosoft Office uses pluguses plug--ins (better known as ins (better known as addadd--insins) to extend the capabilities of its application by ) to extend the capabilities of its application by adding custom commands and specialized features adding custom commands and specialized features

Web browsersWeb browsers use pluguse plug--ins to play video and presentation formats (ins to play video and presentation formats (FlashFlash, , QuickTimeQuickTime, , Microsoft Microsoft SilverlightSilverlight, , 3DMLW3DMLW) )

Email clientsEmail clients use pluguse plug--ins to decrypt and encrypt email or to send oversized email attains to decrypt and encrypt email or to send oversized email attachments () chments ()

Graphics softwareGraphics software use pluguse plug--ins to support file formats and process images (ins to support file formats and process images (Adobe PhotoshopAdobe Photoshop) )

Media playersMedia players use pluguse plug--ins to support file formats and apply filters (ins to support file formats and apply filters (foobar2000foobar2000, , GStreamerGStreamer, , QuintessentialQuintessential, , VSTVST, , WinampWinamp, , XMMSXMMS) )

Packet sniffersPacket sniffers use pluguse plug--ins to decode packet formats (ins to decode packet formats (OmniPeekOmniPeek) )

Software development environmentsSoftware development environments use pluguse plug--ins to support ins to support programming languagesprogramming languages ((EclipseEclipse, , jEditjEdit, , MonoDevelopMonoDevelop) )

Some Some Web content management systemsWeb content management systems use pluguse plug--ins to increase functionality.ins to increase functionality.

Page 9: Topic 06 Architectural Design - cs-is1.bradley.edu

17

Cloud ComputingCloud Computing

Cloud computing is a paradigm of computing in Cloud computing is a paradigm of computing in which dynamically which dynamically scalablescalable and often and often virtualizedvirtualizedresources are provided resources are provided as a serviceas a service over the over the InternetInternet..

Users need not have knowledge of, expertise in, or Users need not have knowledge of, expertise in, or control over the technology infrastructure in the control over the technology infrastructure in the "cloud" that supports them."cloud" that supports them.

The concept generally incorporates combinations of The concept generally incorporates combinations of the following:the following: Software as a serviceSoftware as a service ((SaaSSaaS). ). Infrastructure as a serviceInfrastructure as a service ((IaaSIaaS). ). Platform as a servicePlatform as a service ((PaaSPaaS). ).

Cloud computing users can avoid Cloud computing users can avoid capital capital expenditureexpenditure ((CapExCapEx) on hardware, software, and ) on hardware, software, and services when they pay a provider only for what services when they pay a provider only for what they use. they use.

18

IT Hiring Remains Strong Despite Economic FearsIT Hiring Remains Strong Despite Economic FearsCIO.comCIO.comhttp://www.cio.com/article/688029/IT_Hiring_Remains_Strong_Despihttp://www.cio.com/article/688029/IT_Hiring_Remains_Strong_Despite_Economic_Fears?source=CIte_Economic_Fears?source=CIONLE_nlt_careers_2011ONLE_nlt_careers_2011--0808--2323

IT staffing industry executives agree that IT hiring in the U.S.IT staffing industry executives agree that IT hiring in the U.S. will remain robust through the will remain robust through the end of the year. In addition, most IT professionals are optimistend of the year. In addition, most IT professionals are optimistic about the future of the job ic about the future of the job market, with 44% feeling confident about finding a new job and 7market, with 44% feeling confident about finding a new job and 71% reporting they aren't 1% reporting they aren't worried about getting laid off. In fact, IT professionals' confiworried about getting laid off. In fact, IT professionals' confidence in their employers' futures dence in their employers' futures climbed to its highest level since the 4Q of 2007. These numbersclimbed to its highest level since the 4Q of 2007. These numbers are supported by a recent are supported by a recent survey by CDW, in which 19% of IT departments said they plan to survey by CDW, in which 19% of IT departments said they plan to hire in the next six months, hire in the next six months, while only 7% anticipate staff cuts.while only 7% anticipate staff cuts.

Staffing industry executives are optimistic about IT hiring despStaffing industry executives are optimistic about IT hiring despite economic concerns because IT ite economic concerns because IT departments cut so deeply and delayed so many projects during thdepartments cut so deeply and delayed so many projects during the recession of 2008 and 2009. IT e recession of 2008 and 2009. IT hiring will remain strong through the remainder of the year simphiring will remain strong through the remainder of the year simply because businesses across the ly because businesses across the board are so dependent on IT infrastructure and technology. Busiboard are so dependent on IT infrastructure and technology. Businesses will continue to invest in IT nesses will continue to invest in IT through the end of the year as a way to cut costs or improve prothrough the end of the year as a way to cut costs or improve productivity, as they've done in previous ductivity, as they've done in previous downturns. According to a recent IT hiring and budget survey, 90downturns. According to a recent IT hiring and budget survey, 90% of IT decision makers at large % of IT decision makers at large companies and 89% of IT decision makers at midsize companies placompanies and 89% of IT decision makers at midsize companies plan to purchase new hardware n to purchase new hardware over the next six months. Approximately 40% of IT leaders plan tover the next six months. Approximately 40% of IT leaders plan to install new software over the next o install new software over the next six months. six months.

Virtualization, Virtualization, cloud computingcloud computing, , mobility mobility and security are high spending priorities for and security are high spending priorities for CIOsCIOs over the over the next six months. next six months. The four IT jobs that are currently The four IT jobs that are currently in highest demand are project managers, in highest demand are project managers, business analysts, application developers and IT security profesbusiness analysts, application developers and IT security professionalssionals. These positions . These positions should remain in demand through the rest of 2011, even if the ecshould remain in demand through the rest of 2011, even if the economy deteriorates.onomy deteriorates. Systems Systems administrators are also in demand, along with product managers aadministrators are also in demand, along with product managers and project managers. Even if the nd project managers. Even if the economy forces economy forces CIOsCIOs to make cuts, they will cut areas such as the help desk before to make cuts, they will cut areas such as the help desk before they put projects they put projects on hold and cut project managers and developers. on hold and cut project managers and developers.

Page 10: Topic 06 Architectural Design - cs-is1.bradley.edu

19

Partitioned Architecture: Why?Partitioned Architecture: Why?

1. results in software that is 1. results in software that is easier to testeasier to test

2. leads to software that is 2. leads to software that is easier to maintaineasier to maintain

3. results in propagation of 3. results in propagation of fewer side effectsfewer side effects

4. results in software that is 4. results in software that is easier to extendeasier to extend

20

Partitioning the Software ArchitecturePartitioning the Software Architecture

Motto: “Divide and Concur”Motto: “Divide and Concur”

“Horizontal” and “vertical” partitioning are required“Horizontal” and “vertical” partitioning are required

Page 11: Topic 06 Architectural Design - cs-is1.bradley.edu

21

Vertical PartitioningVertical Partitioning

1. define separate branches of the module hierarchy for each maj1. define separate branches of the module hierarchy for each major functionor function

2. use control modules to coordinate communication between funct2. use control modules to coordinate communication between functionsions

function 1function 1(for ex: interface)(for ex: interface)

function 3function 3(for ex: security (for ex: security login, password)login, password)

function 2function 2(for ex: online database)(for ex: online database)

22

Horizontal Partitioning: FactoringHorizontal Partitioning: Factoring

1. design so that decision making and work are stratified (or, s1. design so that decision making and work are stratified (or, separated by eparated by levels)levels)

2. decision making modules should reside at the top of the archi2. decision making modules should reside at the top of the architecturetecture

workers (developers, workers (developers, programmers)programmers)

decisiondecision--makersmakers(conceptual modeling)(conceptual modeling)

Page 12: Topic 06 Architectural Design - cs-is1.bradley.edu

23

Topic # 06Topic # 06

Software Architectural DesignSoftware Architectural Design

Homework AssignmentHomework Assignment

24

Topic # 06Topic # 06

Software Architectural Design:Software Architectural Design:Additional InformationAdditional Information

Page 13: Topic 06 Architectural Design - cs-is1.bradley.edu

25

Architectural Genres Architectural Genres (as proposed by Grady Booch)(as proposed by Grady Booch)

Artificial intelligence Commercial and non-profit Communications Content authoring Devices Entertainment and sports Financial Games Government Industrial Legal Medical Military Operating systems Platforms Scientific Tools Transportation Utilities

Chief Scientist

Software Engineering

IBM Research