Architectural aspects

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Introduction to JAVA Vijayan Sugumaran School of Business Administration Oakland University Rochester, MI
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Establishing the overall structure of a software system
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 Chapter 5: Names, Bindings and Scopes Lionel Williams Jr. and Victoria Yan CSci 210, Advanced Software Paradigms September 26, 2010.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 10 Architectural Design.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
SE: CHAPTER 7 Writing The Program
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
Object Oriented Software Development
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Thread basics. A computer process Every time a program is executed a process is created It is managed via a data structure that keeps all things memory.
Chapter – 8 Software Tools.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Architectural Mismatch: Why reuse is so hard? Garlan, Allen, Ockerbloom; 1994.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Functional Programming
Applications Active Web Documents Active Web Documents.
Component Object Model(COM)
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Software architecture
Chapter 1 Introduction.
Distributed Shared Memory
Introduction and Principles
SOFTWARE DESIGN AND ARCHITECTURE
Behavioral Design Patterns
MVC and other n-tier Architectures
Event driven architectures
Chapter 1 Introduction.
Part 3 Design What does design mean in different fields?
Out-of-Process Components
Programming Models for Distributed Application
Data, Databases, and DBMSs
Interpreter Style Examples
Ada – 1983 History’s largest design effort
© Ian Davis Winter 2016 (c) Ian Davis.
Lecture 1: Multi-tier Architecture Overview
Layered Style Examples
Software Architecture
Architectural Design.
Software models - Software Architecture Design Patterns
Units with – James tedder
Units with – James tedder
JAsCo an Aspect-Oriented approach tailored for
An Introduction to Software Architecture
Lecture 5: Functions and Parameters
Tonga Institute of Higher Education IT 141: Information Systems
Out-of-Process Components
Programming Languages and Paradigms
Tonga Institute of Higher Education IT 141: Information Systems
Java Remote Method Invocation
Architectural Mismatch: Why reuse is so hard?
From Use Cases to Implementation
Presentation transcript:

Architectural aspects Bootstrapped Object-oriented Multi-threaded Re-entrant Distributed / Duplicated Mobile Homogeneous/Heterogeneous Interruptable Real time / limited memory / etc. Winter 2016 (c) Ian Davis

Bootstrap examples Parsers accept as input a document whose syntax conforms to the parsers meta language. Therefore parsers must themselves contain parsers. Java engine written in C++, and then in interpreted Java, and then in compiled Java. (c) Ian Davis Winter 2016

Bootstrap pros/cons Avoids need to design good solution when a bad solution leads directly to a better one. Can’t recreate the tool if you loose the tool. Have to be very careful when changing bootstrapped code not to destroy ability to produce tool from source code. (c) Ian Davis Winter 2016

Object-Oriented Style Suitable for applications in which a central issue is identifying and protecting related bodies of information (data). Data representations and their associated operations are encapsulated in an abstract data type. Components: are objects or interfaces. Connectors: are function and procedure invocations (methods). (c) Ian Davis Winter 2016

Object-Oriented Style Subtle shift in programming style. Not all parameters are equally significant. Procedure invocation is determined by object, rather than by case statements. Restrictions on how information within objects can be used (encapsulation). Usefulness determines life time of data. Reuse achieved through inheritance. (c) Ian Davis Winter 2016

Object-Oriented Style (Cont’d) (c) Ian Davis Winter 2016

Object-Oriented Invariants Objects are responsible for preserving the integrity (e.g., some invariant) of the data representation. The data representation is hidden from other objects. (c) Ian Davis Winter 2016

Object-Oriented Specializations Distributed Objects Objects with Multiple Interfaces Multiple inheritance Multiple supported interfaces COM (c) Ian Davis Winter 2016

Object-Oriented Advantages Because an object hides its data representation from its clients, it is possible to change the implementation without affecting those clients. Can design systems as collections of autonomous interacting agents. Intuitive mapping from real world objects, to implementation in software. (c) Ian Davis Winter 2016

Object-Oriented Advantages Good ability to manage construction and destruction of objects, centralizing these operations in one place. Relatively easy to distribute objects. Shifts focus towards object interfaces, and away from arbitrary procedure interfaces. Moves away from the “any procedure can call any procedure paradigm”. (c) Ian Davis Winter 2016

Object-Oriented Disadvantages In order for one object to interact with another object (via a method invocation) the first object must know the identity of the second object. Contrast with Pipe and Filter Style. When the identity of an object changes it is necessary to modify all objects that invoke it. Partially resolved by using conventions such as COM. (c) Ian Davis Winter 2016

Object-Oriented Disadvantages The distinction between an object changing its content, and becoming a new object are too harsh. Objects cause side effect problems: E.g., A and B both use object C, then B's affect on C look like unexpected side effects to A. Essentially the problem here is that objects have persistent state. Managing object destruction is hard. (c) Ian Davis Winter 2016

Microsoft’s COM Architecture “Component Object Model”. A collection of rules and restrictions on how objects may be both used and managed. An interface is a “named” collection of methods having a predefined purpose and call/return protocol. An object has one or more interfaces. It can be manipulated only through it’s interfaces. (c) Ian Davis Winter 2016

Microsoft’s COM Architecture Each interface name is identified by a globally unique id (GUID). Every COM object has Iunknown interface. QueryInterface(REFIID riid, void **vPP) AddRef(void) Release(void) Other interfaces are accessed via a pointer to the interface returned by QueryInterface if the object supports the specified interface. (c) Ian Davis Winter 2016

COM advantages Methods supported by an object can be determined at runtime. Reduces risk of performing illegal operations on an object as a result of recasting it incorrectly. Reference counting simplifies management of object’s lifetime. Objects may incrementally be assigned new interfaces cleanly. (c) Ian Davis Winter 2016

COM advantages cont. Makes distribution of objects easier. Interfaces can be implemented in C++, by merely arranging for an object class to multiply inherit from each of its supported interfaces. Avoids the problem of trying to change an existing interface definition. You don’t. (c) Ian Davis Winter 2016

COM advantages cont. Objects can be registered in the NT registry. The software needed to support objects can be dynamically loaded from DLL’s upon demand. The software needed to support an object need only be loaded once.. not once per program. Common interfaces are shared by all objects that support them. (c) Ian Davis Winter 2016

COM disadvantages Tedium and overhead associated with obtaining and freeing interface pointers. All methods are called indirectly via the interface pointer, which is inefficient. Defined interfaces may not be changed. Need to dynamically create all COM objects. Can’t delete static objects. (c) Ian Davis Winter 2016

COM disadvantages Some difficulty aggregating COM objects into larger objects because of the shared IUnknown interface. Risk of loading a “Trojan horse”. (c) Ian Davis Winter 2016

Self Modifying Architecture LISP Javascript Systems that learn Driven by modifying data COBOL Alter goto Winter 2016 (c) Ian Davis

Multi-threaded Architecture Efficient service in parallel Distributed computation in parallel Example Apache Hybrid Query Processor Uses little global state Must lock global state when used Winter 2016 (c) Ian Davis

Re-entrant Architecture Functionality can be re-entered safely Don’t use static flags to alter control flow Don’t assume what is entered will exit Winter 2016 (c) Ian Davis

Distributed Architecture X Window System is a distributed windowed user interface architecture based on event triggering and callbacks. Winter 2016 (c) Ian Davis

Duplicated Architecture Components are duplicated Improves robustness Improves performance Components can’t save state Winter 2016 (c) Ian Davis

Mobile Architecture Code shipped on demand to the hardware Javascript in HTML page Java Applet (code on server) An app in the cloud uploaded on use Performance: code can migrate to data Code doesn’t have to be saved by client Infinite accessible code on finite machine Software upgrade easier (push .v. pull) Issues with TRUST Winter 2016 (c) Ian Davis

Homogeneous/Heterogeneous Architecture employs one/many languages Javascript / PhP / HTML / MySQL / Dynamic HTML Architecture employs one /many styles Architecture runs on one / many platforms Architecture offers one / many deliverables Winter 2016 (c) Ian Davis

Interruptable Architecture Driven by input commands Can interrupt any command Jump’s up to start of read next command In C implemented by a setjmp In C++ could also be done as throw exception Code must be re-entrant and actions atomic Must delay interrupt if code not re-entrant or within a transaction Winter 2016 (c) Ian Davis

Cross Cutting Concerns Runtime assertions Tracing (event logging) Profiling (performance issues) Error handling (reporting where errors occur) Testing Debugging Reliability (buffer overflow etc) Encryption mechanisms Locking Marshalling Winter 2016 (c) Ian Davis

Implementation Extend the language to specify aspects So: no need to embed code everywhere Can be implemented statically during compilation And/or dynamically at runtime via request Consider debugging C++ The –g option statically introduces symbol tables The break command in GDB dynamically alters code so that it is interrupted The watch command dynamically watches variables Winter 2016 (c) Ian Davis