Chapter 1: Distributed Information Systems Gustavo Alonso Computer Science Department Swiss Federal Institute of Technology (ETHZ)

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Distributed Processing, Client/Server and Clusters
ICS 434 Advanced Database Systems
Executional Architecture
COM vs. CORBA.
Chapter 13 Review Questions
Database Architectures and the Web
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
Chapter 10 Site Architecture McGraw-Hill/Irwin Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Data - Information - Knowledge
Distributed Processing, Client/Server, and Clusters
Distributed components
Technical Architectures
Chapter 1: Distributed Information Systems
1 Chapter 2 Database Environment Transparencies © Pearson Education Limited 1995, 2005.
Distributed Database Management Systems
Asper School of Business University of Manitoba Systems Analysis & Design Instructor: Bob Travica System architectures Updated: November 2014.
Chapter 7: Client/Server Computing Business Data Communications, 5e.
The Architecture of Transaction Processing Systems
Chapter 2 Database Environment Pearson Education © 2014.
Chapter 9: Moving to Design
Gustavo Alonso and Cesare Pautasso Computer Science Department
Lecture 8 Epidemic communication, Server implementation.
Distributed Systems: Client/Server Computing
Client/Server Architecture
Tiered architectures 1 to N tiers. 2 An architectural history of computing 1 tier architecture – monolithic Information Systems – Presentation / frontend,
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Web application architecture
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Chapter 2 Architectural Models. Keywords Middleware Interface vs. implementation Client-server models OOP.
Chapter 9 Moving to Design Part 2.
Chapter 9 Elements of Systems Design
Database Architectures and the Web Session 5
1 CMPT 275 High Level Design Phase Architecture. Janice Regan, Objectives of Design  The design phase takes the results of the requirements analysis.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Application Layer CHAPTER 2. Announcements and Outline  Administrative Items  Questions? Recap 1.Introduction to Networks 1.Network Type 2.N etwork.
Client presentation layer resource management layer application logic layer information system Copyright Springer Verlag Berlin Heidelberg 2004.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
Session-8 Data Management for Decision Support
Week 5 Lecture Distributed Database Management Systems Samuel ConnSamuel Conn, Asst Professor Suggestions for using the Lecture Slides.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
Kyung Hee University 1/41 Introduction Chapter 1.
9 Systems Analysis and Design in a Changing World, Fourth Edition.
Distributed Information Systems. Motivation ● To understand the problems that Web services try to solve it is helpful to understand how distributed information.
9 Systems Analysis and Design in a Changing World, Fourth Edition.
CORBA1 Distributed Software Systems Any software system can be physically distributed By distributed coupling we get the following:  Improved performance.
Bayu Adhi Tama, M.T.I 1 © Pearson Education Limited 1995, 2005.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Client/Server Computing
Chapter 2 Database Environment.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
IT 5433 LM1. Learning Objectives Understand key terms in database Explain file processing systems List parts of a database environment Explain types of.
A service Oriented Architecture & Web Service Technology.
9 Systems Analysis and Design in a Changing World, Fifth Edition.
Chapter 1: Distributed Information Systems. What is an Information System? Consists of: Hardware, Software, People, Networks, Processes, Data.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Chapter 1: Distributed Information Systems
Software Design and Architecture
The Client/Server Database Environment
#01 Client/Server Computing
Chapter 2 Database Environment Pearson Education © 2009.
Introduction to Databases Transparencies
Database Environment Transparencies
#01 Client/Server Computing
Presentation transcript:

Chapter 1: Distributed Information Systems Gustavo Alonso Computer Science Department Swiss Federal Institute of Technology (ETHZ)

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 2 Contents - Chapter 1 o Design of an information system ÞLayers and tiers ÞBottom up design ÞTop down design o Architecture of an information system ÞOne tier ÞTwo tier (client/server) ÞThree tier (middleware) ÞN-tier architectures ÞClusters and tier distribution o Communication in an information system ÞBlocking or synchronous interactions ÞNon-blocking or asynchronous interactions

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 3 Layers and tiers o Client is any user or program that wants to perform an operation over the system. Clients interact with the system through a presentation layer o The application logic determines what the system actually does. It takes care of enforcing the business rules and establish the business processes. The application logic can take many forms: programs, constraints, business processes, etc. o The resource manager deals with the organization (storage, indexing, and retrieval) of the data necessary to support the application logic. This is typically a database but it can also be a text retrieval system or any other data management system providing querying capabilities and persistence. Client Application Logic Resource Manager Presentation layer Business rules Business objects Client Server Database Client Business processes Persistent storage

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 4 A game of boxes and arrows o Each box represents a part of the system. o Each arrow represents a connection between two parts of the system. o The more boxes, the more modular the system: more opportunities for distribution and parallelism. This allows encapsulation, component based design, reuse. o The more boxes, the more arrows: more sessions (connections) need to be maintained, more coordination is necessary. The system becomes more complex to monitor and manage. o The more boxes, the greater the number of context switches and intermediate steps to go through before one gets to the data. Performance suffers considerably. o System designers try to balance the flexibility of modular design with the performance demands of real applications. Once a layer is established, it tends to migrate down and merge with lower layers. There is no problem in system design that cannot be solved by adding a level of indirection. There is no performance problem that cannot be solved by removing a level of indirection.

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 5 Top down design o The functionality of a system is divided among several modules. Modules cannot act as a separate component, their functionality depends on the functionality of other modules. o Hardware is typically homogeneous and the system is designed to be distributed from the beginning. top-down design PL-APL-B PL-C AL-A AL-B AL-D AL-C RM-1RM-2 top-down architecture RM-1RM-2 AL-A AL-D AL-C AL-B PL-A PL-B PL-C

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 6 Top down design presentation layer resource management layer application logic layer client information system 1. define access channels and client platforms 2. define presentation formats and protocols for the selected clients and protocols 3. define the functionality necessary to deliver the contents and formats needed at the presentation layer 4. define the data sources and data organization needed to implement the application logic top-down design

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 7 Bottom up design o In a bottom up design, many of the basic components already exist. These are stand alone systems which need to be integrated into new systems. o The components do not necessarily cease to work as stand alone components. Often old applications continue running at the same time as new applications. o This approach has a wide application because the underlying systems already exist and cannot be easily replaced. o Much of the work and products in this area are related to middleware, the intermediate layer used to provide a common interface, bridge heterogeneity, and cope with distribution. Legacy systems New application Legacy applicati on

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 8 Bottom up design bottom-up design PL-APL-B PL-C AL-A AL-B AL-D AL-C bottom-up architecture AL-A AL-D AL-C AL-B PL-A PL-B PL-C wrapper legacy application legacy application legacy system legacy system legacy system

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 9 Bottom up design presentation layer resource management layer application logic layer client information system 1. define access channels and client platforms 2. examine existing resources and the functionality they offer 3. wrap existing resources and integrate their functionality into a consistent interface 4. adapt the output of the application logic so that it can be used with the required access channels and client protocols bottom-up design

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 10 One tier: fully centralized o The presentation layer, application logic and resource manager are built as a monolithic entity. o Users/programs access the system through display terminals but what is displayed and how it appears is controlled by the server. (These are “dumb” terminals). o This was the typical architecture of mainframes, offering several advantages: Þno forced context switches in the control flow (everything happens within the system), Þall is centralized, managing and controlling resources is easier, Þthe design can be highly optimized by blurring the separation between layers. 1-tier architecture Server

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 11 Two tier: client/server o As computers became more powerful, it was possible to move the presentation layer to the client. This has several advantages: ÞClients are independent of each other: one could have several presentation layers depending on what each client wants to do. ÞOne can take advantage of the computing power at the client machine to have more sophisticated presentation layers. This also saves computer resources at the server machine. ÞIt introduces the concept of API (Application Program Interface). An interface to invoke the system from the outside. It also allows designers to think about federating the systems into a single system. ÞThe resource manager only sees one client: the application logic. This greatly helps with performance since there are no client connections/sessions to maintain. 2-tier architecture Server

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 12 API in client/server o Client/server systems introduced the notion of service (the client invokes a service implemented by the server) o Together with the notion of service, client/server introduced the notion of service interface (how the client can invoke a given service) o Taken all together, the interfaces to all the services provided by a server (whether there are application or system specific) define the server’s Application Program Interface (API) that describes how to interact with the server from the outside o Many standardization efforts were triggered by the need to agree to common APIs for each type of server resource management layer server service interface service interface service interface service interface server’s API service

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 13 Technical aspects of the 2 tier architecture o There are clear technical advantages when going from one tier to two tier architectures: Þtake advantage of client capacity to off-load work to the clients Þwork within the server takes place within one scope (almost as in 1 tier), Þthe server design is still tightly coupled and can be optimized by ignoring presentation issues Þstill relatively easy to manage and control from a software engineering point of view o However, two tier systems have disadvantages: ÞThe server has to deal with all possible client connections. The maximum number of clients is given by the number of connections supported by the server. ÞClients are “tied” to the system since there is no standard presentation layer. If one wants to connect to two systems, then the client needs two presentation layers. ÞThere is no failure or load encapsulation. If the server fails, nobody can work. Similarly, the load created by a client will directly affect the work of others since they are all competing for the same resources.

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 14 The main limitation of client/server ÞThe responsibility of dealing with heterogeneous systems is shifted to the client. ÞThe client becomes responsible for knowing where things are, how to get to them, and how to ensure consistency o This is tremendously inefficient from all points of view (software design, portability, code reuse, performance since the client capacity is limited, etc.). o There is very little that can be done to solve this problems if staying within the 2 tier model. Server AServer B o If clients want to access two or more servers, a 2-tier architecture causes several problems: Þthe underlying systems don’t know about each other Þthere is no common business logic Þthe client is the point of integration (increasingly fat clients)

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 15 Three tier: middleware o In a 3 tier system, the three layers are fully separated. o The layers are also typically distributed taking advantage of the complete modularity of the design (in two tier systems, the server is typically centralized) o A middleware based system is a 3 tier architecture. This is a bit oversimplified but conceptually correct since the underlying systems can be treated as black boxes. In fact, 3 tier makes only sense in the context of middleware systems (otherwise the client has the same problems as in a 2 tier system). 3-tier architecture

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 16 Middleware o Middleware is just a level of indirection between clients and other layers of the system. o It introduces an additional layer of business logic encompassing all underlying systems. o By doing this, a middleware system: Þsimplifies the design of the clients by reducing the number of interfaces, Þprovides transparent access to the underlying systems, Þacts as the platform for inter- system functionality and high level application logic, and Þtakes care of locating resources, accessing them, and gathering results. o But a middleware system is just a system like any other! It can also be 1 tier, 2 tier, 3 tier... Middleware or global application logic clients Local resource managers Local application logic Server AServer B middleware

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 17 Technical aspects of middleware o The introduction of a middleware layer helps in that: Þthe number of necessary interfaces is greatly reduced: clients see only one system (the middleware), local applications see only one system (the middleware), Þit centralizes control (middleware systems themselves are usually 2 tier), Þit makes necessary functionality widely available to all clients, Þit allows to implement functionality that otherwise would be very difficult to provide, and Þit is a first step towards dealing with application heterogeneity (some forms of it). o The middleware layer does not help in that: Þit is another indirection level, Þit is complex software, Þit is a development platform, not a complete system

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 18 A three tier middleware based system... External clients connecting logic control user logic internal clients 2 tier systems Resource managers wrappers middleware Resource manager 2 tier system middleware system External client

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 19 N-tier: connecting to the Web o N-tier architectures result from connecting several three tier systems to each other and/or by adding an additional layer to allow clients to access the system through a Web server o The Web layer was initially external to the system (a true additional layer); today, it is slowly being incorporated into a presentation layer that resides on the server side (part of the middleware infrastructure in a three tier system, or part of the server directly in a two tier system) o The addition of the Web layer led to the notion of “application servers”, which was used to refer to middleware platforms supporting access through the Web client resource management layer application logic layer information system N-tier architecture middleware presentation layer Web server Web browser HTML filter

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 20 INTERNET FIREWALL LAN Web server cluster LAN, gateways LAN internal clients LAN middleware application logic resource management layer database server LAN middleware application logic additional resource management layers LAN Wrappers and gateways file server application N-tier systems in reality

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 21 Blocking or synchronous interaction o Traditionally, information systems use blocking calls (the client sends a request to a service and waits for a response of the service to come back before continuing doing its work) o Synchronous interaction requires both parties to be “on-line”: the caller makes a request, the receiver gets the request, processes the request, sends a response, the caller receives the response. o The caller must wait until the response comes back. The receiver does not need to exist at the time of the call (TP-Monitors, CORBA or DCOM create an instance of the service/server /object when called if it does not exist already) but the interaction requires both client and server to be “alive” at the same time Call Receive Response Answer idle time o Because it synchronizes client and server, this mode of operation has several disadvantages: Þconnection overhead Þhigher probability of failures Þdifficult to identify and react to failures Þit is a one-to-one system; it is not really practical for nested calls and complex interactions (the problems becomes even more acute) clientserver

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 22 Overhead of synchronism o Synchronous invocations require to maintain a session between the caller and the receiver. o Maintaining sessions is expensive and consumes CPU resources. There is also a limit on how many sessions can be active at the same time (thus limiting the number of concurrent clients connected to a server) o For this reason, client/server systems often resort to connection pooling to optimize resource utilization Þhave a pool of open connections Þassociate a thread with each connection Þallocate connections as needed o Synchronous interaction requires a context for each call and a context management system for all incoming calls. The context needs to be passed around with each call as it identifies the session, the client, and the nature of the interaction. request() do with answer receive process return session duration request() do with answer receive process return Context is lost Needs to be restarted!!

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 23 Failures in synchronous calls o If the client or the server fail, the context is lost and resynchronization might be difficult. ÞIf the failure occurred before 1, nothing has happened ÞIf the failure occurs after 1 but before 2 (receiver crashes), then the request is lost ÞIf the failure happens after 2 but before 3, side effects may cause inconsistencies ÞIf the failure occurs after 3 but before 4, the response is lost but the action has been performed (do it again?) o Who is responsible for finding out what happened? o Finding out when the failure took place may not be easy. Worse still, if there is a chain of invocations (e.g., a client calls a server that calls another server) the failure can occur anywhere along the chain. request() do with answer receive process return request() do with answer timeout try again do with answer receive process return receive process return 2’ 3’

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 24 Two solutions ENHANCED SUPPORT o Client/Server systems and middleware platforms provide a number of mechanisms to deal with the problems created by synchronous interaction: ÞTransactional interaction: to enforce exactly once execution semantics and enable more complex interactions with some execution guarantees ÞService replication and load balancing: to prevent the service from becoming unavailable when there is a failure (however, the recovery at the client side is still a problem of the client) ASYNCHRONOUS INTERACTION o Using asynchronous interaction, the caller sends a message that gets stored somewhere until the receiver reads it and sends a response. The response is sent in a similar manner o Asynchronous interaction can take place in two forms: Þnon-blocking invocation (a service invocation but the call returns immediately without waiting for a response, similar to batch jobs) Þpersistent queues (the call and the response are actually persistently stored until they are accessed by the client and the server)

©Gustavo Alonso, ETH Zürich.Web services: Concepts, Architectures and Applications - Chapter 1 25 Message queuing o Reliable queuing turned out to be a very good idea and an excellent complement to synchronous interactions: ÞSuitable to modular design: the code for making a request can be in a different module (even a different machine!) than the code for dealing with the response ÞIt is easier to design sophisticated distribution modes (multicast, transfers, replication, coalescing messages) an it also helps to handle communication sessions in a more abstract way ÞMore natural way to implement complex interactions between heterogeneous systems do with answer request() receive process return queue