DOC PREVIEW
MSU CSE 470 - 14-SystemsDesign
Course Cse 470-
Pages 9

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

114-SystemDesign1 System Design214-SystemDesignDesign:HOW to implement a system●Goals:■Satisfy the requirements■Satisfy the customer■Reduce development costs■Provide reliability■Support maintainability■Plan for future modifications314-SystemDesignDesign Issues●Architecture●User Interface●Data Types●Operations●DataRepresentations●Algorithms414-SystemDesignSystem Design●Choose high-level strategy for solvingproblem and building solution●Decide how to organize the system intosubsystems●Identify concurrency / tasks●Allocate subsystems to HW and SWcomponents514-SystemDesignStrategic vs. Local DesignDecisions●Defn: A high-level or strategic design decision is one thatinfluences the form of (a large part) of the final code●Strategic decisions have the most impact on the finalsystem●So they should be made carefully●Question: Can you think of an example of a strategicdecision?614-SystemDesignSystem Design●Defn: The high-level strategy for solving an [informationflow] problem and building a solution■Includes decisions about organization of functionality.■Allocation of functions to hardware, software and people.■Other major conceptual or policy decisions that are prior totechnical design.●Assumes and builds upon thorough requirements andanalysis.2714-SystemDesignTaxonomy of System-DesignDecisions●Devise a system architecture●Choose a data management approach●Choose an implementation of external control814-SystemDesignSystem Architecture●A collection of subsystems and interactions amongsubsystems.●Should comprise a small number (<20) of subsystems●A subsystem is a package of classes, associations, operations,events and constraints that are interrelated and that have areasonably well-defined interface with other subsystems,●Example subsystems:■Database management systems (RDBMS)■Interface (GUI) package914-SystemDesignArchitectural Design Principles●Decompose into subsystems layers and partitions.●Separate application logic from user interface●Simplify the interfaces through which parts of the systemwill connect to other systems.●In systems that use large databases:■Distinguish between operational (transactional) and inquirysystems.■Exploit features of DBMS1014-SystemDesignTaxonomy of System-DesignDecisions●Devise a system architecture●Choose a data management approach●Choose an implementation of external control1114-SystemDesignChoosing a Data ManagementApproach●Databases:■Advantages:◆ Efficient management◆ multi-user support.◆Roll-back support■Disadvantages:◆Performance overhead◆ Awkward (or more complex) programming interface◆Hard to fix corruption1214-SystemDesignChoosing a Data ManagementApproach (continued)●“Flat” files■Advantages:◆Easy and efficient to construct and use◆More readily repairable■Disadvantages:◆No rollback◆No direct complex structure support◆Complex structure requires a grammar for file format31314-SystemDesignFlat File Storage and Retrieval●Useful to define two components (or classes)■Reader reads file and instantiates internal objectstructure■Writer traverses internal data structure and writes outpresentation●Both can (should) use formal grammar■Tools support: Yacc, Lex.1414-SystemDesignJava Data Marshalling●Provides a means of “serializing” a set of objects●Requires classes to implement the “Serializable”interface.●Stream can be written/read to a file●Stream can be written/read to a network socket.1514-SystemDesignSerialization Exampleprivate void writeObject(java.io.ObjectOutputStream out) throws IOException; private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException; FileOutputStream ostream = new FileOutputStream("t.tmp"); ObjectOutputStream p = new ObjectOutputStream(ostream); p.writeInt(12345); p.writeObject("Today"); p.writeObject(new Date()); p.flush(); ostream.close(); InterfaceExample use1614-SystemDesignTaxonomy of System-DesignDecisions●Devise a system architecture●Choose a data management approach●Choose an implementation of external control1714-SystemDesignImplementation of ExternalControl●Procedure-driven:■Control = location in the source code.■ Requests block until request returns●Event-Driven: Control resides in dispatcher■Uses callback functions registered for events■Dispatcher services events by invoking callbacksFour general styles for implementing software control1814-SystemDesignImplementation of ExternalControl●Concurrent■Control resides in multiple, concurrent objects■Objects communicate by passing messages◆across busses, networks, or memory.●Transactional■Control resides in servers and saved state■Many server-side E-systems are like this41914-SystemDesignCarControlSample Concurrent Systemx1: integerx2: integertinc: integervc: integervt:integerv:integertmin: integer = 2z1: integerz2: integerxhit: integerxcoast: integersetspd: integera: integer = 15closing: booleanRadarv: integervc: integervt: integerx: integertmode: booelansetv: integerrealv: integertarget acquisitiontarget lossdistancecarspeedcarspeedthrottle control2014-SystemDesignMVC (Model/View/Controller)05101520253035401st Qtr2nd Qtr3rd Qtr4th QtrEast1st Qtr2nd Qtr3rd Qtr4th Qtr1ST52nd103rd204th 40Separates data model,data view, and behaviorinto separate componentsModel(data)Representation(view)Representation(view)∆ dataconsumerobservableController(interface fordata changes) change events2114-SystemDesignDispatcher Model(event driven)Get event, call a procedureProcessevent type 1Processevent type 2Processevent type NEventsWindow manager & NotifierApplication code2214-SystemDesignEvent-driven architecture in modern UItoolkitsGet eventsand dispatchWidget1(e.g. Button)Widget2(e.g. TextBox)Widget3(e.g. Dialog)ButtonListenerTextListenerListenerApplicationcodeEventsWindowmanagerUser-interfacecomponent2314-SystemDesignTypical Dispatcher Codewhile (!quit) { WaitEvent(timeout, id); switch (id) { case ID1: Procedure1(); break; case ID2: Procedure2(); break; …. } } StartupEvent Loop2414-SystemDesignTransactional ModelServerState managerRestore stateObject AObject BObject CDispatch based on previous stateApplication/initialSystem/networkApplication/ClassesMimics event-driven52514-SystemDesignLayered Subsystems●Set of “virtual” worlds●Each layer is defined in terms of the layer(s) below it■Knowledge is one-way:


View Full Document

MSU CSE 470 - 14-SystemsDesign

Download 14-SystemsDesign
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 14-SystemsDesign and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 14-SystemsDesign 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?