DOC PREVIEW
USC CSCI 578 - 16_Implementation_Techniques

This preview shows page 1-2-3-4-26-27-28-54-55-56-57 out of 57 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 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 57 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 57 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 57 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 57 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 57 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 57 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 57 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 57 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 57 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 57 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Implementation TechniquesObjectivesSlide 3Recall Pipe-and-FilterFramework #1: stdioEvaluating stdioFramework #2: java.ioEvaluating java.ioRecall the C2 StyleFramework #1: Lightweight C2 FrameworkEvaluating Lightweight C2 FrameworkFramework #2: Flexible C2 FrameworkSlide 13Evaluating Flexible C2 FrameworkSlide 15Implementing Pipe and Filter Lunar LanderSlide 17Slide 18GetBurnRate FilterSlide 20Slide 21CalcBurnRate FilterSlide 23Slide 24Slide 25Slide 26DisplayValues FilterSlide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34TakeawaysImplementing Lunar Lander in C2Implementing Lunar Lander in C2 (cont’d)Clock ComponentSlide 39Slide 40GameState ComponentSlide 42Slide 43Slide 44GameLogic ComponentSlide 46Slide 47Slide 48Slide 49GUI ComponentSlide 51Slide 52Slide 53Slide 54Main ProgramSlide 56Slide 57Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.ImplementationTechniquesSoftware ArchitectureLecture 162Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureObjectivesConceptsImplementation as a mapping problemArchitecture implementation frameworksEvaluating frameworksRelationships between middleware, frameworks, component modelsBuilding new frameworksConcurrency and generative technologiesEnsuring architecture-to-implementation consistencyExamplesDifferent frameworks for pipe-and-filterDifferent frameworks for the C2 styleApplicationImplementing Lunar Lander in different frameworks3Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureConceptsImplementation as a mapping problemArchitecture implementation frameworksEvaluating frameworksRelationships between middleware, frameworks, component modelsBuilding new frameworksConcurrency and generative technologiesEnsuring architecture-to-implementation consistencyExamplesDifferent frameworks for pipe-and-filterDifferent frameworks for the C2 styleApplicationImplementing Lunar Lander in different frameworksObjectives4Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureRecall Pipe-and-FilterComponents (‘filters’) organized linearly, communicate through character-stream ‘pipes,’ which are the connectorsFilters may run concurrently on partial dataIn general, all input comes in through the left and all output exits from the rightSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.5Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureFramework #1: stdioStandard I/O framework used in C programming languageEach process is a filterReads input from standard input (aka ‘stdin’)Writes output to standard output (aka ‘stdout’)Also a third, unbuffered output stream called standard error (‘stderr’) not considered hereLow and high level operationsgetchar(…), putchar(…) move one character at a timeprintf(…) and scanf(…) move and format entire stringsDifferent implementations may vary in details (buffering strategy, etc.)6Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureEvaluating stdioPlatform supportAvailable with most, if not all, implementations of C programming languageOperates somewhat differently on OSes with no concurrency (e.g., MS-DOS)FidelityGood support for developing P&F applications, but no restriction that apps have to use this styleMatching assumptionsFilters are processes and pipes are implicit. In-process P&F applications might require modificationsEfficiencyWhether filters make maximal use of concurrency is partially up to filter implementations and partially up to the OS7Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureFramework #2: java.ioStandard I/O framework used in Java languageObject-orientedCan be used for in-process or inter-process P&F applicationsAll stream classes derive from InputStream or OutputStreamDistinguished objects (System.in and System.out) for writing to process’ standard streamsAdditional capabilities (formatting, buffering) provided by creating composite streams (e.g., a Formatting-Buffered-InputStream)8Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureEvaluating java.ioPlatform supportAvailable with all Java implementations on many platformsPlatform-specific differences abstracted awayFidelityGood support for developing P&F applications, but no restriction that apps have to use this styleMatching assumptionsEasy to construct intra- and inter-process P&F applicationsConcurrency can be an issue; many calls are blockingEfficiencyUsers have fine-grained control over, e.g., bufferingVery high efficiency mechanisms (memory mapped I/O, channels) not available (but are in java.nio)9Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureRecall the C2 StyleLayered stylewith event-basedcommunicationover two-waybroadcastbusesStrict rules on concurrency,dependencies, and so onMany frameworks developed for different languages; focus on twoalternative Java frameworks hereSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.10Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureFramework #1: Lightweight C2 Framework16 classes, 3000 lines of codeComponents & connectors extend abstract base classesConcurrency, queuing handled at individual comp/conn levelMessages are request or notification objectsSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.11Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureEvaluating Lightweight C2 FrameworkPlatform supportAvailable with all Java implementations on many platformsFidelityAssists developers with many aspects of C2 but does not enforce these constraintsLeaves threading and queuing policies up to individual elementsMatching assumptionsComp/conn main classes must inherit from distinguished base classesAll messages must be in dictionary formEfficiencyLightweight framework; efficiency may depend


View Full Document

USC CSCI 578 - 16_Implementation_Techniques

Download 16_Implementation_Techniques
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 16_Implementation_Techniques 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 16_Implementation_Techniques 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?