CSC 340 Tutorial 6 System Design TA Y

  • Slides: 18
Download presentation
CSC 340: Tutorial 6 System Design TA: Y. An Date: 9: 00 -10: 00

CSC 340: Tutorial 6 System Design TA: Y. An Date: 9: 00 -10: 00 am, Fri. Nov 14, 2003 Location: BA 1130 2020/10/3 CSC 340 1

Elements of System Design n n n Software architecture. Concurrency identification. Processor allocation. Data

Elements of System Design n n n Software architecture. Concurrency identification. Processor allocation. Data management strategies. Establishing protocols and standards. Test plans. Design trade-offs. 2020/10/3 CSC 340 2

System Architecture n n n System design is focused on making highlevel decisions concerning

System Architecture n n n System design is focused on making highlevel decisions concerning the overall structure of the system. The major part of system design is defining the system architecture. The architecture of a system is concerned with its overall structure, the relationships among its major components and their interactions. 2020/10/3 CSC 340 3

Description of System Architecture Type of architecture Examples of elements Examples of relationships Conceptual

Description of System Architecture Type of architecture Examples of elements Examples of relationships Conceptual Components Connectors Module Sub-systems, modules Exports, imports Code Files, directories, Includes, libraries contains Execution Tasks, threads, object interactions 2020/10/3 CSC 340 Uses, calls 4

Sub-systems n n A sub-system typically group together elements of the system that share

Sub-systems n n A sub-system typically group together elements of the system that share common properties, e. g. , the interface sub-system, data management sub-system… Advantages of division: ¡ ¡ ¡ 2020/10/3 Smaller units of development. Improvement of maintainability. Increase of portability. Improvement of reusability. Decrease of complexity. CSC 340 5

Interactions between Subsystems n Each sub-system provides services for other subsystems, there are two

Interactions between Subsystems n Each sub-system provides services for other subsystems, there are two different types of communications: client/server and peer-to-peer. 2020/10/3 <<Client>> <<Server>> Sub-system A Sub-system B CSC 340 6

Peer-to-peer 2020/10/3 <<Peer>> Sub-system A Sub-system CSC 340 7

Peer-to-peer 2020/10/3 <<Peer>> Sub-system A Sub-system CSC 340 7

Approaches to division n There are two general approaches to the division of a

Approaches to division n There are two general approaches to the division of a software system into subsystems: layering and partitioning. Layering: sub-systems at different layers represents different levels of abstraction. Partitioning: each sub-system focuses on a different aspect of the functionality of the system as a whole. 2020/10/3 CSC 340 8

Layering n n Each layer corresponds to one or more subsystems: the top layer

Layering n n Each layer corresponds to one or more subsystems: the top layer uses services provided by the layers below it. Closed vs. open layered architectures: 2020/10/3 Layer N-1 Layer 2 Layer 1 CSC 340 9

Closed vs. Open Layered Architectures n n A closed architecture minimizes dependencies between the

Closed vs. Open Layered Architectures n n A closed architecture minimizes dependencies between the layers and reduces the impact of a change to the interface of any one layer. An open layered architecture produces more compact code since the services of all lower level layers can be accessed directly by any layer above. However, it increases the difficulty caused when a layer needs to be changed. 2020/10/3 CSC 340 10

Partitioning n Some layers within a layered architecture may have to be decomposed into

Partitioning n Some layers within a layered architecture may have to be decomposed into sub-systems because of their intrinsic complexity. Presentation layer Application layer Domain layer Database layer 2020/10/3 Advert HCI Campaign costs Sub-system HCI sub-system Advert Campaign Costs Sub-system Campaign domain Campaign database CSC 340 11

Model-View-Controller (MVC) n MVC architecture separates an application into three major types of components:

Model-View-Controller (MVC) n MVC architecture separates an application into three major types of components: ¡ ¡ ¡ n Models: comprise the main functionality. Views: present the user interface. Controllers: manage the updates to views. Different user may have different requirements for viewing the system’s functionality. 2020/10/3 CSC 340 12

Multiple Interfaces for the same Core Functionality Changes to data in One sub-system need

Multiple Interfaces for the same Core Functionality Changes to data in One sub-system need To be propagated to The others. Each sub-system Contains some Core functionality Campaign Forecasting Advert Development Campaign Management Campaign and Advert Database Access 2020/10/3 CSC 340 13

General Structure of Model. View-Controller View A View B Model Controller A 2020/10/3 Controller

General Structure of Model. View-Controller View A View B Model Controller A 2020/10/3 Controller B CSC 340 14

MVC Applied to Agate 2020/10/3 CSC 340 15

MVC Applied to Agate 2020/10/3 CSC 340 15

MVC Component Interaction 2020/10/3 CSC 340 16

MVC Component Interaction 2020/10/3 CSC 340 16

Architecture for Distributed Systems Server 1 Client A Broker Client B 2020/10/3 Server 2

Architecture for Distributed Systems Server 1 Client A Broker Client B 2020/10/3 Server 2 Server 3 CSC 340 17

Component Interaction for Broker Architecture 2020/10/3 CSC 340 18

Component Interaction for Broker Architecture 2020/10/3 CSC 340 18