Ch13 Appl Architectures

Embed Size (px)

Citation preview

  • 7/29/2019 Ch13 Appl Architectures

    1/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 1

    Application architectures

  • 7/29/2019 Ch13 Appl Architectures

    2/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 2

    Objectives

    To explain the organisation of two fundamentalmodels of business systems - batchprocessing and transaction processingsystems

    To describe the abstract architecture ofresource management systems

    To explain how generic editors are event

    processing systems To describe the structure of language

    processing systems

  • 7/29/2019 Ch13 Appl Architectures

    3/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 3

    Topics covered

    Data processing systems

    Transaction processing systems

    Event processing systems

    Language processing systems

  • 7/29/2019 Ch13 Appl Architectures

    4/40Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 4

    Generic application architectures

    Application systems are designed to meet an

    organisational need.

    As businesses have much in common, their

    application systems also tend to have acommon architecture that reflects the

    application requirements.

    A generic architecture is configured and

    adapted to create a system that meets specific

    requirements.

  • 7/29/2019 Ch13 Appl Architectures

    5/40Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 5

    Use of application architectures

    As a starting point for architectural design.

    As a design checklist.

    As a way of organising the work of the

    development team. As a means of assessing components for

    reuse.

    As a vocabulary for talking about application

    types.

  • 7/29/2019 Ch13 Appl Architectures

    6/40Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 6

    Application types

    Data processing applications

    Data driven applications that process data in batcheswithout explicit user intervention during the processing.

    Transaction processing applications

    Data-centred applications that process user requestsand update information in a system database.

    Event processing systems

    Applications where system actions depend oninterpreting events from the systems environment.

    Language processing systems

    Applications where the users intentions are specified ina formal language that is processed and interpreted bythe system.

  • 7/29/2019 Ch13 Appl Architectures

    7/40Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 7

    Application type examples

    Data processing systems

    Billing systems;

    Payroll systems.

    Transaction processing systems

    E-commerce systems;

    Reservation systems.

    Event processing systems

    Word processors;

    Real-time systems. Language processing systems

    Compilers;

    Command interpreters.

  • 7/29/2019 Ch13 Appl Architectures

    8/40Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 8

    Data processing systems

    Systems that are data-centred where thedatabases used are usually orders ofmagnitude larger than the software itself.

    Data is input and output in batches Input: A set of customer numbers and associatedreadings of an electricity meter;

    Output: A corresponding set of bills, one for eachcustomer number.

    Data processing systems usually have aninput-process-output structure.

  • 7/29/2019 Ch13 Appl Architectures

    9/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 9

    Input-process-output model

    System

    Input Process Ou tputPrinter

    Database

  • 7/29/2019 Ch13 Appl Architectures

    10/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 10

    Input-process-output

    The input component reads data from a file ordatabase, checks its validity and queues thevalid data for processing.

    The process component takes a transactionfrom the queue (input), performs computationsand creates a new record with the results ofthe computation.

    The output component reads these records,formats them accordingly and writes them tothe database or sends them to a printer.

  • 7/29/2019 Ch13 Appl Architectures

    11/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 11

    Data-flow diagrams

    Show how data is processed as it moves

    through a system.

    Transformations are represented as round-

    edged rectangles, data-flows as arrowsbetween them and files/data stores as

    rectangles.

  • 7/29/2019 Ch13 Appl Architectures

    12/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 12

    Salary payment DFD

  • 7/29/2019 Ch13 Appl Architectures

    13/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 13

  • 7/29/2019 Ch13 Appl Architectures

    14/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 14

    Transaction processing systems

    Process user requests for information from adatabase or requests to update the database.

    From a user perspective a transaction is:

    Any coherent sequence of operations that satisfiesa goal;

    For example - find the times of flights from Londonto Paris.

    Users make asynchronous requests for

    service which are then processed by atransaction manager.

  • 7/29/2019 Ch13 Appl Architectures

    15/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 15

    Transaction processing

    I/Oprocessing

    Applicationlogic

    Transacti onmanager

    Database

  • 7/29/2019 Ch13 Appl Architectures

    16/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 16

  • 7/29/2019 Ch13 Appl Architectures

    17/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 17

    ATM system organisation

  • 7/29/2019 Ch13 Appl Architectures

    18/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 18

    Transaction processing middleware

    Transaction management middleware or

    teleprocessing monitors handle

    communications with different terminal types

    (e.g. ATMs and counter terminals), serialisesdata and sends it for processing.

    Query processing takes place in the system

    database and results are sent back through

    the transaction manager to the users terminal.

  • 7/29/2019 Ch13 Appl Architectures

    19/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 19

    Transaction management

  • 7/29/2019 Ch13 Appl Architectures

    20/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 20

    Information systems architecture

    Information systems have a generic

    architecture that can be organised as a

    layered architecture.

    Layers include: The user interface

    User communications

    Information retrieval

    System database

  • 7/29/2019 Ch13 Appl Architectures

    21/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 21

    Information system structure

    User inter face

    Information retrieval and modification

    Database

    Transaction management

    User communications

  • 7/29/2019 Ch13 Appl Architectures

    22/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 22

    LIBSYS architecture

    The library system LIBSYS is an example of aninformation system.

    User communications layer:

    LIBSYS login component;

    Form and query manager; Print manager;

    Information retrieval layer

    Distributed search;

    Document retrieval;

    Rights manager;

    Accounting.

  • 7/29/2019 Ch13 Appl Architectures

    23/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 23

    LIBSYS organisation

    Web browser inter face

    Distributedsearch

    Accounting

    LIBSYS

    login

    Forms and

    query manager

    Library index

    Documentretrieval

    DB1 DB2 DB3 DB4 DBn

    Rightsmanager

    Print

    manager

  • 7/29/2019 Ch13 Appl Architectures

    24/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 24

  • 7/29/2019 Ch13 Appl Architectures

    25/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 25

    Resource allocation systems

    Systems that manage a fixed amount of someresource (football game tickets, books in abookshop, etc.) and allocate this to users.

    Examples of resource allocation systems: Timetabling systems where the resource being

    allocated is a time period;

    Library systems where the resource beingmanaged is books and other items for loan;

    Air traffic control systems where the resourcebeing managed is the airspace.

  • 7/29/2019 Ch13 Appl Architectures

    26/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 26

    Resource allocation architecture

    Resource allocation systems are also layeredsystems that include: A resource database;

    A rule set describing how resources are allocated;

    A resource manager;

    A resource allocator;

    User authentication;

    Query management;

    Resource delivery component;

    User interface.

  • 7/29/2019 Ch13 Appl Architectures

    27/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 27

    Layered resource allocation

    User inter face

    Resourcemanagement

    Resource policycontrol

    Resourceallocation

    Userauthentication

    Querymanagement

    Resource database

    Resourcedelivery

    Transaction management

  • 7/29/2019 Ch13 Appl Architectures

    28/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 28

    Layered system implementation

    Each layer can be implemented as a largescale component running on a separateserver. This is the most commonly usedarchitectural model for web-based systems.

    On a single machine, the middle layers areimplemented as a separate program thatcommunicates with the database through itsAPI.

    Fine-grain components within layers can beimplemented as web services.

  • 7/29/2019 Ch13 Appl Architectures

    29/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 29

    Webbrowser

    Web serverApplication

    serverDatabase

    server

    E-commerce system architecture

    E-commerce systems are Internet-based

    resource management systems that accept

    electronic orders for goods or services.

    They are usually organised using a multi-tierarchitecture with application layers associated

    with each tier.

  • 7/29/2019 Ch13 Appl Architectures

    30/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 30

    Event processing systems

    These systems respond to events in the

    systems environment.

    Their key characteristic is that event timing is

    unpredictable so the architecture has to beorganised to handle this.

    Many common systems such as word

    processors, games, etc. are event processing

    systems.

  • 7/29/2019 Ch13 Appl Architectures

    31/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 31

    Editing systems

    Real-time systems (Chapter 15) and editing

    systems are the most common types of event

    processing system.

    Editing system characteristics: Single user systems;

    Must provide rapid feedback to user actions;

    Organised around long transactions so may

    include recovery facilities.

  • 7/29/2019 Ch13 Appl Architectures

    32/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 32

    Editing system components

    Editing systems are naturally object-oriented: Screen - monitors screen memory and detects

    events;

    Event - recognises events and passes them for

    processing; Command - executes a user command;

    Editor data - manages the editor data structure;

    Ancillary data - manages other data such as styles

    and preferences; File system - manages file I/O;

    Display - updates the screen display.

  • 7/29/2019 Ch13 Appl Architectures

    33/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 33

    Editing system architecture

    File System

    SaveOpen

    Editor data

    Editingcommands

    Ancillary data

    Ancillarycommands

    Command

    Interpret

    Screen

    Refresh

    Display

    Update

    Event

    Process

  • 7/29/2019 Ch13 Appl Architectures

    34/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 34

    Language processing systems

    Accept a natural or artificial language as input and

    generate some other representation of that language.

    May include an interpreter to act on the instructions in

    the language that is being processed.

    Used in situations where the easiest way to solve a

    problem is to describe an algorithm or describe the

    system data

    Meta-case tools process tool descriptions, method

    rules, etc and generate tools.

  • 7/29/2019 Ch13 Appl Architectures

    35/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 35

    A language processing system

    Translator

    Check syntaxCheck semanticsGenerate

    Interpreter

    FetchExecute

    Abstract m/cinstructions

    Data Results

    Instructions

  • 7/29/2019 Ch13 Appl Architectures

    36/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 36

    Language processing components

    Lexical analyser

    Symbol table

    Syntax analyser

    Syntax tree

    Semantic analyser

    Code generator

  • 7/29/2019 Ch13 Appl Architectures

    37/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 37

    Data-flow model of a compiler

  • 7/29/2019 Ch13 Appl Architectures

    38/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 38

    Repository model of a compiler

  • 7/29/2019 Ch13 Appl Architectures

    39/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 39

    Generic models of application architectures

    help us understand and compare applications.

    Important classes of application are data

    processing systems, transaction processingsystems, event processing systems and

    language processing system.

    Data processing systems operate in batch

    mode and have an input-process-outputstructure.

    Key points

  • 7/29/2019 Ch13 Appl Architectures

    40/40

    Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 13 Slide 40

    Key points

    Transaction processing systems allowinformation in a database to be remotelyaccessed and modified by multiple users.

    Event processing systems include editors andreal-time systems.

    In an editor, user interface events are detectedand an in-store data structure is modified.

    Language processing systems translate textsfrom one language to another and mayinterpret the specified instructions.