Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Architecture Styles

Similar presentations


Presentation on theme: "Software Architecture Styles"— Presentation transcript:

1 Software Architecture Styles
بسم الله الرحمن الرحيم الحمد لله ، والصلاة والسلام على رسول الله Software Architecture Styles Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical Engineering West Virginia University, Morgantown, West Virginia, USA, and Visiting Professor, Faculty of Computers and Information, Cairo University, Cairo, Egypt Modeling and Documenting Software Architectures

2 OUTLINE Software Architecture Styles Independent Components
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return SW Systems Mix of Architecture Styles Other Important Styles Modeling and Documenting Software Architectures

3 Introduction Recall the definition of Styles
An architectural style is a coordinated set of architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements within any architecture that conforms to that style.

4 Introduction What does it give us?
An architectural style describes a certain codification of elements and their arrangements. Conversely, an architectural style constrains both the elements and their interrelationships. It specifies components and connectors types

5 Introduction Example Component Types

6 Ex: Connector Types

7 Examples of Popular Architecture Styles

8 Families of Architecture Styles
There is a number of families of styles that has been defined and used in many software systems Notable examples are: Independent Components: Event-based Architectures Virtual Machines Data Flow: Pipes and Filters Data-Centered Systems Call-and Return Architectures Modeling and Documenting Software Architectures

9 OUTLINE Software Architecture Styles Independent Components
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Modeling and Documenting Software Architectures

10 Architectural Styles Independent Components
Independent Components. Architecture is viewed a set of independent processes or objects or components that communicate through messages. Two subfamilies: - Event based systems (implicit and direct invocation style), and - Communicating processes family (client-server style). Modeling and Documenting Software Architectures

11 Architectural styles: Event-based Architecture
Some processes post events, others express an interest in events Modeling and Documenting Software Architectures

12 Event-based Architecture

13 Event-based Architecture Implicit Invocation: The Observer Pattern

14 Modeling and Documenting Software Architectures

15 Modeling and Documenting Software Architectures

16 Component-connector notation
Another Example: Lunar Lander Game Players Subscribers register to the Game Server that Publishes information on new Lunar Terrain data, new spacecraft, and the locations of currently registered space crafts Component-connector notation

17

18 Summary of Event-Based Style
Independent Components asynchronously emit and receive events communicated over event buses Components are independent concurrent even generators and consumers Data elements are events sent as first class entities over the event bus

19 Communicating Processes: Client-Server Architecture Style

20 OUTLINE Software Architecture Styles Independent Components
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Modeling and Documenting Software Architectures

21 Architectural Styles Virtual Machines
2. Virtual Machines. Originated from the concept that programs are treated as data by a virtual machine, which is an abstract machine implemented entirely in software, that runs on top of the actual hardware machine. Ex: rule-based style. Modeling and Documenting Software Architectures

22 Architectural Styles Virtual Machines

23 Virtual Machines: The primary benefits are the
separation between instruction and implementation, (Used when inputs are defined by a script and data) Example: Java Virtual Machine. Java code translated to platform independent bytecodes. JVM is platform specific and interprets (or compiles -JIT) the bytecodes. Modeling and Documenting Software Architectures

24 Virtual Machines Style

25 Virtual Machines Style Example

26 OUTLINE Software Architecture Styles Independent Components
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Modeling and Documenting Software Architectures

27 Architectural Styles Data Flow
3. Data Flow. Include Batch Sequential Systems (BSS) and Pipes and Filters (PF). - BSS: different components take turns at processing a batch of data, each saving the result of their processing in a shared repository that the next component can access. Ex. Dynamic control of physical processes based on a feedback loop. - PF: A stream of data processed by a complex structure of process (filters). Ex, UNIX. Modeling and Documenting Software Architectures

28 Architectural Styles Data Flow: Control Loop and Pipes and Filters
Modeling and Documenting Software Architectures

29 BSS Architecture Style Example

30 BSS Style Summary

31 PF Example concurrency between components (Filters) is allowed

32 PF example in Embedded Systems concurrency between components (Filters) is allowed
A Robotics Example

33 Modeling and Documenting Software Architectures

34 PF Another Architecture Example: Watch for the Two Views
Modeling and Documenting Software Architectures

35 PFs Style Summary

36 OUTLINE Software Architecture Styles Independent Components
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Modeling and Documenting Software Architectures

37 Data-Centered Architectural Styles
4. Data-Centered Systems. Consist of having different components communicate through shared data repositories. When data repository is an active repository that notifies registered components of changes in it then-blackboard style. Modeling and Documenting Software Architectures

38 Data-Centered Architectural Styles Repository Architecture Style

39 Data-Centered Architectural Styles Repository Architecture Example: CASE Tools Example

40 Data-Centered Architectural Styles Repository Architecture Example: Compiler Architecture

41 Data-Centered Architectural Styles Blackboard Architecture Style: Components perusing shared data, and communicating through it. Used in Database intensive systems Modeling and Documenting Software Architectures

42 Data-Centered Architectural Styles Blackboard Architecture Style Example
Compare with the PFs Style

43 Data-Centered Architectural Styles Blackboard Architecture Style: Intelligent Agent Systems Example

44 Data-Centered Architectural Styles Blackboard Architecture Style: Travel Counseling System Example

45 Data-Centered Architectural Styles Blackboard Architecture Style: Intelligent Agent Systems Example

46 Blackboard Architecture Style: Intelligent Agent Systems Example

47 Data-Centered Architectural Styles Blackboard and Publish/Subscribe Styles: Intelligent Agent Systems Example

48 Blackboard Architecture Style

49 Rule-Based or Expert System Architecture Style: Three components, a user interface, an inference engine, and a knowledgebase

50 Rule-Based or Expert Systems Style

51 OUTLINE Software Architecture Styles Independent Components
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return SW Systems Mix of Architecture Styles Modeling and Documenting Software Architectures

52 Architectural styles Call-and Return Family
5. Call-and Return Architectures. Due to heir simple control paradigm and component interaction mechanism , these architectures have dominated the SW landscape by the early decades of the SW Eng. There are several styles within this family: examples are main program and subroutine, and layered architectures. -) Main Program and Subroutine Style. Programs are modularized based on functional decomposition, single thread of control held by the main program, which is then passed to subprograms, along with some data on which the subprograms can operate. Modeling and Documenting Software Architectures

53 Main Program and Subroutine Style
Register.exe Course registration System example CourseInfo PeopleInfo Course CourseOffering StudentInfo ProfessorInfo Modeling and Documenting Software Architectures

54 Call-and Return Architectural styles
-) Layered. Functionality is divided into layers of abstraction-each layer provides services to the layer(s) above it, and uses the services of layer(s) below it. In its purest form, each layer access only the layer below it, but does not depend on lower layers. Based on general systems Architecture, Network Architectures, etc. Modeling and Documenting Software Architectures

55 Layered Architectural styles Example of a Layered Application Architecture

56 Layered Architectural styles Example: Interactive Electronic Technical Manual Layered Architecture
Data Layer Business Layer Presentation Layer

57 Layered Architectural styles A Robotics Architecture
The Reactive Layer contains basic skills of the robot such as grasping an object and behavior that must execute immediately in response to inputs from sensors. The Sequencing Layer combines functions in the reactive layer into more complex behavior. The Planning Layer performs slower Long-term planning

58 OUTLINE Software Architecture Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return SW Systems Mix of Architecture Styles Modeling and Documenting Software Architectures

59 SW Systems-Mix of Architecture Styles
Most SW systems use a mix of architecture styles. Ex, personnel management system with a scheduling component, implemented using the independent component style, and a payroll component, using the batch sequential style. Modeling and Documenting Software Architectures

60 SW Systems-Mix of Architecture Styles Quality Attributes tradeoffs
Choosing a style to implement a particular system depends on several factors based on stakeholders concerns. The typical factors concern the level of quality attributes that each style enables us to attain. EX, event-based systems-achieve very high level of evolvability, at the expense of performance and complexity. Virtual-machine style-achieve very high level of portability, at expense of performance and perhaps even testability.

61 SW Systems-Mix of Architecture Styles Components of each Layer use different architecture styles

62 SW Systems-Mix of Architecture Styles

63 OUTLINE Software Architecture Styles Other Important Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return SW Systems Mix of Architecture Styles Other Important Styles Buffered Massage-Based Model-View-Controller Presentation-Abstraction-Control Broker Architecture Style Service Oriented Architecture (SOA) Peer-to-Peer Architecture Modeling and Documenting Software Architectures

64 Buffered Massage-Based Software Architecture Style
In the J2EE Paltform, Java Massage Server (JMS) ia an API thatprovides Asynchronous massage queuing mechanism Massage Driven Bean (MDB) is a special type of EJBs that consumes asynchronous massages

65 Buffered Massage-Based Software Architecture Style
Clients can publish massages on the JMS and MDBs register with the JMS to receive Certain massage topics (asynchronous massage based publish/subscribe).

66 Buffered Massage-Based Software Architecture Style
The MDB plays the role of a massage listener It can connect remote Session EJBs or Entity EJBs

67 Web Application Example

68 Massage-Based Architecture Style consists of three types of components

69 Massage-Based Architecture Style

70 Massage-Based Architecture Style

71 OUTLINE Software Architecture Styles Other Important Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Other Important Styles Buffered Massage-Based Model-View-Controller Presentation-Abstraction-Control Broker Architecture Style Service Oriented Architecture (SOA) Peer-to-Peer Architecture Modeling and Documenting Software Architectures

72 Model-View-Controller Architecture Style
The Controller manipulates the data Model The View retrieves data from the model and displays needed information

73 Model-View-Controller Architecture Style Dynamic Interactions

74 Model-View-Controller Architecture Style Web Applications Java-based Implementation Example

75 OUTLINE Software Architecture Styles Other Important Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Other Important Styles Buffered Massage-Based Model-View-Controller Presentation-Abstraction-Control Broker Architecture Style Service Oriented Architecture (SOA) Peer-to-Peer Architecture Modeling and Documenting Software Architectures

76 Presentation-Abstraction-Control Agents Architecture Style
Based on MVC Style but geared towards agent-oriented Systems Consists of a Hierarchy of Agents, each agent with a P, A, and C components The C component in each agent is in charge with communicating with other agents The top-level agent is in charge of the core data and business logics Lower-Level Agents provides detailed data and presentation

77 Presentation-Abstraction-Control Agents Architecture Style Example
Simple Presentation Application that can display Pages of a presentation Consists one a top-level agent 1 and four lower level agents Agent 1 have access to the pages, and the other agents respond to user requests for first, previous, next and last pages A scenario capturing the event of pressing the next button

78 Presentation-Abstraction-Control Style

79 Presentation-Abstraction-Control Style

80 PAC Style vs MVC Style

81 OUTLINE Software Architecture Styles Other Important Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Other Important Styles Buffered Massage-Based Model-View-Controller Presentation-Abstraction-Control Broker Architecture Style Service Oriented Architecture (SOA) Peer-to-Peer Architecture Modeling and Documenting Software Architectures

82 Broker Architecture Style
Brokers gets requests from client proxies and manages them by forwarding to server Proxies or dispatches them to other connected brokers

83 Broker Architecture Style

84 Broker Architecture Style

85 Broker Architecture Style

86 Example: CORBA, Common Object Request Broker Architecture
Client-Side Proxy IDL Server-Side Proxy (IDL)

87 Example: CORBA, Common Object Request Broker Architecture

88 OUTLINE Software Architecture Styles Other Important Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Other Important Styles Buffered Massage-Based Model-View-Controller Presentation-Abstraction-Control Broker Architecture Style Service Oriented Architecture (SOA) Peer-to-Peer Architecture Modeling and Documenting Software Architectures

89 Service Oriented Architecture (SOA) Style Makes use of an Enterprise Service Bus ESB Used in web-based systems and distributed computing The SOA Style Before SOA nodes make resources available to other participants in the system as independent services that the participants access in a standardized way using the ESB

90 Service Oriented Architecture (SOA) Style A Map of SOA Components
Web Portals Human Business Process Management (BPM) Security Manage and monitor Registry and Repository Enterprise Service Bus (ESB) Data Services Process Services Orchestration System BPM Business Logic The ESB Performs: data transformation Intelligent routing Real time monitoring Exception handling Service security Databases Systems of Record

91 Cloud Services Architecture SOA supports Cloud Computing Models

92 Cloud Services Architecture Human as a service, Software as a service, Infrastructure as a service

93 OUTLINE Software Architecture Styles Other Important Styles
Introduction Software Architecture Styles Independent Components Virtual Machines Data Flow Data-Centered Call-and return Other Important Styles Buffered Massage-Based Model-View-Controller Presentation-Abstraction-Control Broker Architecture Style Service Oriented Architecture (SOA) Peer-to-Peer Architecture Modeling and Documenting Software Architectures

94 Peer-to-Peer Architecture Style

95 Peer-to-Peer Architecture Style The Gnutella Example
Pure Peer-to-Peer Architecture A sends query for a data resource to neighbors B and H, they pass it on until the peer having the resource is found or until a certain threshold of hops is reached

96 Peer-to-Peer Architecture Style The Gnutella Example
Recent Versions of Gnutella supports two types of peers Ultra peers and Leaf peers Ultra peers runs in systems with fast internet connects and are responsible for request routing and responses, they are connected to a large number of other Ultra peers and leaf peers, while the leaf peers are connected to a small number of Ultra peers

97 Peer-to-Peer Architecture Style The Skype Example
A mixed client-Server and Pee-to-Peer Skype Peers get promoted to a supernode status based on their network connectivity And machine performance Supernodes perform the Communication and routing of massages to establish a call When a user logs in to the server he is connected to a supernode If a peer becomes a supernode he unknowingly bears the cost of routing a potentially large number of calls.

98 Peer-to-Peer Architecture Style The Skype Example

99 Conclusions An architectural style is a coordinated set of architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements Choosing a style to implement a particular system depends on several factors based on stakeholders concerns and quality attributes Most SW systems use a mix of architecture styles


Download ppt "Software Architecture Styles"

Similar presentations


Ads by Google