29
Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Embed Size (px)

Citation preview

Page 1: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Software Architectural StylesAndrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones

1

Page 2: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

2

Page 3: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

What is Software Architecture?• Provides a very high level view of the

parts of the system and how they are related to form the whole system.

• More specifically, architecture partitions the system in logical parts such that each part can be comprehended independently and then describes the system in terms of these parts and their relationships.

3

Page 4: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

4

Page 5: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Some Examples…• Client-Server• Event-Driven• Peer-to-peer• Pipes and Filters• Three-Tier• Service-Oriented• Monolithic

• Blackboard• Implicit Invocation• Plug-in• Search-Oriented• Distributed Computing• Cloud Computing• Front end and Back end

5

Page 6: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

What Software Architecture is not

• Design patterns• Low-level design• Implementation• Computer Architecture

6

Page 7: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Design vs. Software Architecture

• Architecture deals with “what” and “where” whereas design deals with the “how”

• Design patterns are to design as architectural styles are to architecture

7

Page 8: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Event-Driven Architecture• Very common architecture• Three main components:• The Event• The Event Bus• The Listener

Figure 1: Block Diagrams for Event Driven Applications(Li, 2005)

8

Page 9: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

The Event• Something that happens, either inside or outside the system,

that causes some kind of action in the system.• Most of the time it is an external input, such as input from a

keyboard or controller, or sensors.• Can also be other processes.

9

Page 10: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

The Event Bus• The connector between events and listeners.• Performs event-stream-analysis, which includes data cleansing

and normalization.• Propagates events to the listeners connected to them.• Also handles listener registration.

10

Page 11: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

The Listener

• An object that executes some function when a specific event occurs.

• Registers its interest in certain events through the event bus.

11

Page 12: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Pros and Cons• Pros:• Analysis of events and actions related to them are done quickly. • Very good for systems that need to be able to respond to external

events.• Cons:• More complex programs: can be difficult to follow the flow of a

system.

12

Page 13: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Uses• Graphical User Interfaces• Swing

• Financial Trading systems• Pipeline monitoring systems• Sensor networks• Heart Rate Monitors

13

Page 14: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Client-Server Architecture• Very common type of

architecture• Used in computer networking• Some example protocols : DNS,

FTP, SMTP, HTTP• Three main Components:• The Client• The Server• A Network

14

Page 15: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

The Client• Usually a personal computer• Connects to a server, makes a request• Receives a reply, makes more requests, etc.

• Often accesses the server through an application• There are several different kinds of clients

15

Page 16: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

The Server• A computer program running to serve the requests of other

programs• Often performs computational tasks for the clients• There are several different types

16

Page 17: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Pros and Cons• Pros:• Performance• Simplicity (for clients)• Accessibility• Scalability

• Cons:• Cost• Overloading

17

Page 18: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

3-Tier• Was developed by John J. Donovan in Open Environment

Corporation (OEC)• User interface, process logic, computer data storage and data

access are developed and maintained as independent modules, often on separate platforms

• Eg) a change of an OS may want only to change the presentation layer would only affect the UI code (Windows 8?)

18

Page 19: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

3-Tier

19

Page 20: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Example: Siri?

20

Page 21: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Peer-to-Peer• P2P is a network architecture in which each computer has

equivalent capabilities and responsibilities. (Miller, 2001)

21

Page 22: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

A better definition• 5 Characteristics:• Computers connect to each other in real-time• Peers are both clients and servers• Primary content is provided by peers• Peers are autonomous and control their own activities• Peers are not necessarily permanent and many connect and

disconnect at will

22

Page 23: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Three forms• Pure• Centralized• Hybrid

23

Page 24: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Pros and Cons• Pros• Speed• Reliability• Availability• Privacy• Scalability

• Cons• Security• No mediator• Unavailability

24

Page 25: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Monolithic• A somewhat older style of

architecture, not used as often now

• Everything is compiled and linked into a single application

• Many programs we deal with day-to-day use it (sort of):• Word processors• Powerpoint• Older mainframes• Development Environments• Older accounting software• Some Games

25

Page 26: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Monolith – In Programming• Usually written in a single

programming language• Can operate in both batch

mode or GUI mode• Can have concurrency:• Multi-threading• Multi-Processing

• But only one executable!

26

Page 27: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Pros and Cons• Pros• Performance• Simplicity

• Cons• Problems with shared access• Quantity of Data

27

Page 28: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Summary• Architectural styles are used in

most applications today• They implement standards that

can be reused• These standards make it easier to

make early design decisions

28

Page 29: Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1

Questions?

29