Download presentation
Presentation is loading. Please wait.
Published byJeffery Day Modified over 9 years ago
1
Categorization of Software Architectures A Dataflow architectures Pipes and Filters Batch sequential B Independent components Client-server systems Parallel communicating processes Event systems Service-oriented (added) C Virtual machines Interpreters Rule-based systems D Repository architectures Databases Hypertext systems Blackboards E Layered architectures 1
2
A -Data Flow Architecture Each processing unit of the Data Flow Diagram is designed INDEPENDENTLY of the others Data arises from sources, such as the users and flows back to users or collapse such as account databases. The functions of data flow diagram may reside on more than one physical diagram 2
3
account # & deposit balance query account # & deposit account # User Make inquiry account database deposit transaction account data Get deposit Get inquiry Validate inquiry Do deposit transaction Create account summary Validate deposit error Printer member banks bank name Display account account # account data account display Data Flow Diagram for ATM Application 3
4
Data Flow Architecture I: Pipe and Filter Architectures filter pipe < stream stream > pipe
5
Pipe and Filter Architecture Processing elements (filters) accept streams as input (sequences of a uniform data elements) at any time, and produce output streams Each filter must be designed to be implemented of the other filters. The advantage is modularity.
6
Example of Pipe & Filter Data Flow Architecture Maintain financial transactions Bank data Requirement: record Log transaction analyze deposit deposit data withdraw withdrawal account data bank address transaction result transaction account data Comm account data
7
Data Flow Architecture II : Batch Sequential Data Flow Architecture Manage bank funds available for mortgages & unsecured lending. Collect mortgage funds Account balances Mortgage pool Unsecured pool Architecture: Collect unsecured funds Requirement: Processing elements are only given batches of data, the result is a batch sequential form of data flow.
8
For decades, data flow has been the most common way of expressing architectures. Disadvantages of the data flow diagrams include the fact that they don’t map cleanly to code, whether object oriented or not. Disadvantage of Data Flow Architecture
9
B - Independent Components Architecture Independent components are operated in parallel and communicated with each other from time to time. This can be found on the WWW, where millions of servers and browsers continuously in parallel and periodically communicate each other Components are portions of software that do not change and that do not require knowledge of the software using them.
10
B- Independent Component Examples .NET assemblies and Java NetBeans are example component technologies Eclipse is a development platform designed to accommodate plug-ins These are independent components They can be created by developers for various purposes They are added to the platform without affecting existing functionality
11
Independent Components I : Tiered and Client Server Architectures The server component serves the needs of the client upon requests low coupling Client server architectures have the advantage of low coupling between the components. When more than one person performs implementation, developers’ packages are often related as client and server It is naturel to tie up a package of classes to each developer and developers require the services of classes for which others are responsible
12
Independent Components I : (cont’d) Tiered and Client- Server Architectures A server component acts more effectively when its interface is Narrow. Narrow means that the interface (a collection of functions) contains only necessary parts is collected in one place is clearly defined If a third tier lies between client and server, three-tiered architecture is constituted.
13
Client-Server Architecture The computer runs software called the client The computer interacts with another software known as the server located at a remote computer. The client is usually a browser such as Internet Explorer, Netscape Navigator or Mozilla. protocols Browsers interact with the server using a set of instructions called protocols. requests browserresponsesserver These protocols help in the accurate transfer of data through requests from a browser and responses from the server. There are many protocols available on the Internet. The World Wide Web, which is a part of the Internet, brings all these protocols. We can use HTTP, FTP, Telnet, email etc. from one platform (web browser.)
14
Example I : Two –Tiered Client-Server Architecture Static HTML pages The client (browser) requests for an HTML file stored on the remote machine through the server software. The server locates this file and passes it to the client. The client then displays this file on machine. In this case, the HTML page is static. Static pages do not change until the developer modifies them.
15
Example II: CGI Scripts server machine's processing power. The server has to do more work since CGI programs consume the server machine's processing power. Suppose a searchable form on a web page that runs a CGI program and browser sends the request to the server. The server checks the headers and locates the necessary CGI program and passes it the data from the request The CGI program processes this data and returns the results to the server. The server then sends this formatted in HTML to the browser which in turn displays the HTML page. CGI program generates a dynamic HTML page. Thus the CGI program generates a dynamic HTML page. The contents of the dynamic page depend on the query passed to the CGI program.
16
Example III: Client-Server Architecture Server Side Scripting Technologies This case also involves dynamic response generated by the use of server side technologies. There are many server side technologies Active Server Pages (ASP): A Microsoft technology (the extension.asp). PHP: Hypertext Preprocessor (PHP): An open source technology. PHP (.php,.phtml or.php3 ) Java Server Pages:.jsp pages contain Java code. Server Side Includes (SSI): Involves the embedding of small code snippets inside the HTML page.(.shtml as its file extension ).
17
Independent Components II: Parallel Communication Processes Architecture Several processes or threads are executed at the same time A process as the combination of parallel parts can simplify the design (Disjkstra) An example of this is a simulation of bank customers Many simulations were designed without parallelism by storing and handling the events Such design can sometimes be simplified, if the movement of each customer is a separate process (a thread object in Java) Such a parallel communicated process matches more closely to the activities that it simulates.
18
Platforms for Communicating Processors Platform 1Platform 2Platform 3 execution comunication Parallel processes may run on separate platforms similar to the process on a single platform
19
Example I Parallel Communicating Processes Architecture Manage ATM traffic. Architecture beginning with first session: Requirement: deposit create retrieve* 1 2 3 4 ‡ Customer_ n :Customer: session_ m :Session customer_ n_ checking :Account deposit* 5 (more work) (thread detail omitted)* Customer n creates session m Session m retrieves an Account object such as customer n checking. The retrieval is performed asynchronously. A thread (parallel process) is created
20
(1)An object for customer is created (2)Customer n creates session m. (3)Session m retrieves an Account object customer n checking The retrieval is performed asynchronously. A thread (parallel process) is created because it may take time. This allows the customer to carry out other business in the same time. (4)The customer object immediately performs a deposit transaction by sending a message to the Session object (5) The session object executes the deposit transaction by sending a message to the session object, producing a new thread Other work can go on while deposit is processed Processing of the Parallel Architecture step by step
21
Example II: Parallel Communicating Processes Architecture Manage ATM traffic. Architecture: Requirement: withdraw deposit create retrieve* 1 2 3 4 Customer_n :Customer: customer s :Customer session_k :Session session_m :Session customer_ s_ saving : Account customer_n _ checking :Account deposit* 5 (thread detail omitted)* withdraw* 21
22
Class Model For Parallel Processing Example * Sessions Session Customer Customers Account deposit() withdraw() retrieve() * Example of parallel communicating processor architecture –manage ATM traffic class model
23
Independent Components III: Event System Architectures and Design Patterns Many set of components are viewed. Each of them waits until an event occurs that effect it. A word processor waits for the user to click on an icon. It then reacts. state transaction systems. Event systems are achieved as state transaction systems. state pattern The state pattern solves the problem how to use an object without having to know its state.
24
RolePlayingGame State Design Pattern Applied to Encounter RPGame handleEvent() GameState handleEvent() state { state.handleEvent(); } EncounterGame State design pattern can be used to handle the states and actions of Encounter. The framework class RPGame (role-playing game) has an attribute called state, which is of type GameState. The subtype of state (which class of GameState it belong to) determines what happens when handleEvent() is called on an RPGameObject. The code for handleEvent() in RPGame passes control to the handleEvent() function of state.
25
Virtual Machine Architectures Application 1 Interpreter Program 1 written in language understood by interpreter Application 2 Interpreter Program 2 written in language understood by interpreter Leveraging Interpreter to Facilitate Creation of Applications This architecture threats an application as a program written in a specific-purpose language. Since an interpreter for such a language has to be built, this architecture is effective only if several programs are to be written in the language, generating several applications Advantages: If the application consists of processing of complex entities, and if these entities (such as the orders) are readily describable by a grammar.
26
Example An example requiring a virtual machine is an application that provides simple user-level programming of a special purpose language. A nonpogrammer user is capable of writing a script.
27
Layered Architecture Used to model the interfacing of sub-systems. Organises the system into a set of layers (or abstract machines) each of which provide a set of services. Supports the incremental development of sub-systems in different layers. When a layer interface changes, only the adjacent layer is affected. 27
28
Layered Architectures Layering reflects a division of the software into units The Units are layers Each layer represents a virtual machine. Virtual machines are created to interact with each other according to a strict ordering relation. If (A,B) is in this relation, we say “Layer B is beneath layer A”, and that means either, or both, of the following: “The implementation of layer A is allowed to use any of the public facilities of the virtual machine provided by layer B.” “The public facilities in layer B are allowed to be used by the software in layer A.”
29
Layered Architectures* An architectural layer is a coherent collection of software artifacts (like a package of classes) A layer uses at most one other layer and is used by at most one other layer Building application layer by layer can simplify the process Some layers, such as frameworks can serve several applications. *layer - A virtual machine with a set of capabilities/services. These services can only be accessed through a layer’s interface.
30
Layered Architectures
31
Segmented Layers Sometimes layers are divided into segments denoting some finer grained decomposition of the software. This occurs when there is some pre-existing set of units such as imported components Components from separate teams that share the same allowed-to-use relation.
32
Segmented Layers
33
Advantages Layered Architecture allows replacement of entire layers so long as the interface is maintained. Redundant facilities (authentication) can be provided in each layer to increase the dependability of the system
34
Disadvantages In practice, providing a clean separation between layers is often difficult A high-level layer may have to interact directly with lower layers rather than through the layer immediately below it. Performance can be a problem because of multipnle levels of interpretation of a service request as it is processed at each level
35
A Generic Layered Architecture
36
Role-playing game layer Another Layered Architecture Characters LayoutRolePlayingGame Encounter Characters Encounter Environment Encounter Game Application layer 3D engine layer «uses»
37
The Architecture of the iLearn system
38
Application Architectures Transaction Processing Systems are interactive systems that allow information in a database to be remotely accessed and modified by a number of users. Interactive banking system, e-commerce system, booking system Language Processing Systems are systems in which the user’s intentions are expressed in a formal language (such as Java ) Compilers
39
Layered Information Systems All systems that involve interaction with a standard database can be considered to be transaction-based information systems. Layers include: – The user interface – User communications – Information retrieval
40
The Architecture of the Mentcare System The top layer is responsible for implementing the user interface. The UI has been implemented using a web browser. The second layer provides the used interface functionality. It includes components to allow users to log in to the system and checking components. The third layer implements the functionality of the system and provides components that implements system security, patent information creation and update,…… The lowest layer, which is built using the commercial database management system, provides transaction management and persistent data storage.
41
Web-based Information Systems Information and resource management systems are now usually web-based systems where the user interfaces are implemented using a web browser. For example, e-commerce systems are Internet-based resource management systems Accept electronic orders for goods or services Arrange delivery of these goods or services to the customer. In an e-commerce system The application-specific layer includes additional functionality supporting a ‘shopping cart’ users can place a number of items in separate transactions and pay for them all together in a single transaction.
42
Server Implementation These systems are often implemented as multi- tier client server/architectures The web server is responsible for all user communications, with the user interface implemented using a web browser The application server is responsible for implementing application-specific logic as well as information storage and retrieval requests The database server moves information to and from the database and handles transaction management.
43
Layered Architecture Example Using Aggregation Architecture: Class model: (relationships within packages not shown) Ajax bank printing Layer Accounts Layer Ajax bank common library Layer Ajax bank printing PrinterPageFormatter AjaxLogoAjaxDisclaimerRegulations Accounts AccountCustomer Vendor-supplied Layer Ajax bank common library “uses” Vendor-supplied layer not shown Ajax common library contains classes throughout Ajax applications and addresses
44
Ajax Bank Printing Applications The application layer, Ajax bank printing, has to do with printing and formatting. It is built upon (uses) the Accounts and the Aja Bank Common Class Layers. The latter are built upon a vendor-supplied layer It contains general utilities such as sorting and searching In this example, a layer is realized as a package of classes. Ajax common library comprises classes used throughout Ajax applications, and addresses such issues as banks’ logo and its regulations.
45
Air Traffic control system Subsystems Layers cross conceptual paths with the concept of subsystem The problem may be divided into several areas of capability: interpreting radar data to display aircraft positions on screens detecting aircraft that are about to violate separation constraints running simulations for training recording and playback for after-situation analysis and training monitoring its own health and status
46
Air Traffic Control System A subsystem consists of a segment from the top layer, plus any segments of any lower layers it’s allowed to use. A subset of the system, when shown in a layer diagram is called a slice or vertical slice
47
Confusions About Layered Architecture Layer diagrams are often confused with other architectural views i)Work assignments. There is a tendency to regard layers as identical to work assignments. A layer may in fact be assigned as a unit of work, but it is not necessarily always so. Segmented layers are often introduced to show work assignments. If a work assignment spans layers, colors or fill patterns are often used
48
Confusions About Layered Architecture ii) Tiers. Layers are very often confused with the tiers in an n-tier client-server architecture, Layers are not tiers. However, tiers do resemble layers. Each obeys an allowed-to-use relation The presentation layer is implemented in terms of the virtual machine provided by the business logic It can use the data server.
49
Confusions iii)Logical view. Layers are often confused with modules in the logical view They have much in common. Both are collections of usable software services. Both have interfaces through which they require their clients to make use of their provided services. Both have private parts Are they not the same? They may be the same, but do not have to be
50
Architectural Views A logical view shows the key abstractions in the system as objects or object classes. A process view shows how ( at run-time) the system is composed of interacting processes. A development view shows how the software is decomposed for development. A physical view shows the system hardware and how software components are distributed across the processors in the system
51
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.
52
Language Processing Systems Other language processing systems may translate an XML data description into commands to query a database or to an alternative XML representation Natural processing systems may translate one natural language to another.
53
The Architecture of a Language Processing System
54
Compiler components A lexical analyzer, which takes input language tokens and converts them to an internal form. A symbol table, which holds information about the names of entities (variables, class names, object names, etc.) used in the text that is being translated. A syntax analyzer, which checks the syntax of the language being translated. A syntax tree, which is an internal structure representing the program being compiled.
55
Compiler components A semantic analyzer that uses information from the syntax tree and the symbol table to check the semantic correctness of the input language text. A code generator that ‘walks’ the syntax tree and generates abstract machine code.
56
A Repository Architecture for a Language Processing System
57
A Pipe and Filter Compiler Architecture The pipe and filter model of language compilation is effective in batch environments where programs are compiled and executes without user interactions For example in the translation of one XML document into another.
58
Repository Architectures An architecture built primary around data is called a repository architecture. These systems are designed to perform transactions against a database For example, an electric company maintains a data base customers that includes details about them. Other examples are IDEs (ınteractive development Environment IDEs apply processes such as editing and compiling to a database of source and object files.
59
Repository Architecture Sub-systems must exchange data. This may be done in two ways: – Shared data is held in a central database or repository and may be accessed by all sub- systems; – Each sub-system maintains its own database and passes data explicitly to other sub-systems. When large amounts of data are to be shared, the repository model of sharing is most commonly used a this is an efficient data sharing mechanism. 59
60
A Repository Architecture for an IDE
61
More Repository Architectures Blackboard architectures developed for artificial intelligence applications are repositories that behave in accordance with posting rules Hypertext architecture The most common use of hypertext is on the Web. An application that manages the artifacts of a software engineering application not just one The word repository used in industry to denote a application that provides a unified view of a collection of databases (not just one) – Data Warehouses Repositoriesdon’t change the structure of databases Repositories don’t change the structure of databases, but they allow uniform access to them.
62
When is Repository Architecture Preferred? Many applications make their databases their core, therefore repository architectures occupy significant part of applications. When the processing is negligible compared to the formatting of data from the database, repository architectures are appropriate. 62
63
Architectural Patterns Patterns are a means of representing, sharing and reusing knowledge. An architectural pattern is a stylized description of good design practice, which has been tried and tested in different environments. Patterns should include information about when they are and when the are not useful. Patterns may be represented using tabular and graphical descriptions.
64
MVC (Model-View-Controller) The model component manages the system data and associated operations on that data The View component defines and manages how the data is presented to the user. The Controller Component manages user interactions (key presses, mouse clicks…) and passes these interactions to the View and the Model MVC (Model-View_Controller) separates presentation and interaction from the system data The system is structured into three logical components that interact with each other
65
Web application architecture using the MVC pattern
66
Service-Oriented Architectures(SOAs) as a component based architecture A means of developing distributed systems where the components are stand-alone services Services may execute on different computers from different service providers Standard protocols have been developed to support service communication and information exchange
67
Service-Oriented Architecture (SOA) Services are platform and implementation – language independent Software systems are constructed using services from different providers with continuous interaction between services. SOA is recognized as a significant development, particularly for business application systems
68
Summary I: Service-Oriented Architecture – SOA Based on components as a combination of services that provide functionality according to an interface specification Principally via Web services that describe a set of interoperable components rather than to create a single application In the character of facade objects ( A segment of the client community needs a simplified interface to the overall functionality of a complex subsystem). They aren’t necessarily object oriented. orders Example : An application concerning orders. Order – Wouldn’t assume an Order class known to all – Instead: Define an order schema; reference when Web services involve orders
69
Facade Object Facade discusses encapsulating a complex subsystem within a single interface object. This reduces the learning curve necessary to successfully leverage the subsystem. It also promotes decoupling the subsystem from its potentially many clients On the other hand, if the Facade is the only access point for the subsystem, it will limit the features and flexibility that “power users” may need.
70
Example SOAs allow dynamic linking of services We want to write an application that orders stationary for a company. We want the application to identify all qualified vendors, check prices availability, call for bids and terms, select a vendor, and place the order To do this, the application can’t be permanently bounded a set of vendors. For this reason, SOAs are built around a registration system
71
Summary II: Service-Oriented Architecture – SOA “Fire and forget” – Stateless as much as possible Extensible – Additional functionality easily added Discoverable Account for Quality of Service – E.g., security
72
Layering for Service-Oriented Architectures SOAs frequently use a business process layer. This defines the components of the business such as the customer database and business Service interface layer defines the services available that are based upon the business process It specifies functionality such as listing all customers in the database and checking a transaction for conformance to business rules The application layer consists of application built using the service interface layer.
73
Layering for Service-Oriented Architectures Business Process Layer Service Interface Layer «uses» Appplication A (.NET) Appplication C (Legacy) Application B (JEE)
74
Trading off Architecture Alternatives Creating and comparing two architectures Let separate the application into three major parts: The back-end database, The middle part which contains the business logic, and The GUIs This is a three-tier architecture. It is often an appropriate choice when some or all of the tiers reside on physically separate platforms.
75
3-Tier Architecture Alternative VSGUIsVSDataVSOperations Presentation tier Middle tier Data tier Video store application
76
Trading off Architecture Alternatives In particular, if the GUIs are all on PCs, the middle layer on a server, and the databases controlled by a database management system, then three-tier architectures map to separate hardware and software units. There is no necessity that hardware be the same as software architectures. We may want a logical (conceptual) view of an application to be entirely independent of hardware platforms hosting it. (These are the physical view vs. the logical view).
77
Alternative Architecture for a Video Store Application DVRentals VSCustomers DVDs Rentals The Rentals package contains classes that relate videos and customers Customer The Customer package contains classes corresponding to the customers, including associated GUIs The third option would be to group all displays in a package.
78
The Strength of three-tiered architecture Since the GUI part is separate from the rental operations it can be changed without disturbing latter.
79
The weakness of three-tiered architecture One weakness is the coupling between GUIs package and the VSO operations package; There may be several GUI classes corresponding to the Customer class. VSData VSOperations There is also coupling between the classes in the VSData package and the classes VSOperations
80
Comparing Architectures Three-tierAlternative Understandable? Yes Flexible? Yes: GUI easy to changeYes: Basic building blocks easy to identify. Reusable? Not very: Each layer is special to Video Store rentals. Yes: Easy to generalize to generic rentals Easy to construct? PerhapsYes: Clear potential to use Façade.
81
Tools for Architectures Various CASE tools are used to facilitate a software engineering process Some tools represent classes and relationships, such as Rational Rose. Some tools facilitate the drafting of object models, linking them with the corresponding source code and sequence diagrams In selecting a modeling tool, a list of requirements for the tools is drawn up.
82
Some Requirements for Modeling Tools Essential: Essential: Facilitate drawing object models and sequence diagrams Essential: Essential: Create classes quickly Essential: Essential: Edit classes easily Essential: Essential: Should cost no more than …$per user Essential: Essential: Zoom into parts of the model Essential: Essential: Possible to jump directly from the object to the source code Essential: Essential: Reverse engineering available ( means create objects from source code) Essential Essential: Use color coding for status of class implementation
83
Tool Packages Implementation-oriented Implementation-oriented tools such as JavaDoc can be useful to supplement the design process. JavaDoc ( a tool for generating API documentation in HTML format from doc comments in source code) is useful for navigating packages because it provides an alphabetical listing of classes and the parent hierarchy of classes Interactive development Environments Interactive development Environments (IDEs) are delivered with compilers and widely used as partial modeling tools. Object-oriented IDEs Object-oriented IDEs show inheritance in graphical forms These IDEs are close to the compilation and debugging process
84
Tool Packages Component assembly tools Component assembly tools create applications by dragging and dropping icons that represent processing elements For example: JavaBeans environments Beans can be obtained from libraries, customized, and related to each other by means of events The JavaBeans standard was created with the express purpose of facilitating such simple assemlies by means of graphical tools. Question: What is the disadvantage of using modeling tools?
85
Architecture of Eclipse : Java Development Tools Platform Adapted from “Contributing to Eclipse” p5 Plug-In Development Environment depends on platform The platform is a infrastructure od Eclipse and is independent of languages with which Eclipse can be used and independent of all plug-ins. Java development tools The Java development tools utilize the platform and is class model for a Java interactive development environment Plug-In Development Environment The Plug-In Development Environment allows developers to create and add plug-ins. It uses Java development tool
86
Architecture of Eclipse : The Platform Java Development Tools Platform [Adapted from “Contributing to Eclipse” p283] Plug-In Development Environment UI Core JFace Standard Widget Toolset Workbench Workspace Runtime depends on 86 UI Core Platform decomposes as UI and Core Runtime Runtime handles the available plug-ins at runtime Workspace Workspace manage projects, which consist of files and folders Standard Widget Toolset Standard Widget Toolset (SWT) provides graphics elements JFace JFace is a set of UI framework using SWT, used for common UIs. Workbenc Workbench defines the Eclipse UI paradigm. This involves editors, views and perspectives
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.