Client/Server Software Architectures Yonglei Tao.

Slides:



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

2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
Client/Server Databases and the Oracle 10g Relational Database
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Design Patterns Part IV (TIC++V2:C10) Yingcai Xiao 10/01/08.
Façade Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Proxy Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Enterprise Resource Planning
Chapter 2 Architectural Models. Keywords Middleware Interface vs. implementation Client-server models OOP.
The Design Discipline.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
Introduction to distributed systems Dr. S. Indran 23 January 2004.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Smart Reference Proxy Provides additional actions whenever an object is referenced (e.g., counting the number of references to the object) Firewall Proxy.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
Addressing design Goals  We decompose the system to address complexity  Assigning each subsystem to team to work on  But we also need to address system.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Design Patterns: Structural Design Patterns
Architectures of distributed systems Fundamental Models
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
In the name of Allah The Proxy Pattern Elham moazzen.
Chapter 2: System Models. Objectives To provide students with conceptual models to support their study of distributed systems. To motivate the study of.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
Integrating Digital Libraries by CORBA, XML and Servlet Integrating Digital Libraries by CORBA, XML and Servlet Wing Hang Cheung, Michael R. Lyu and Kam.
Lecture 22: Client-Server Software Engineering
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
Structural Design Patterns
Enterprise Integration Patterns CS3300 Fall 2015.
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
Design Patterns Structural Patterns. Adapter Convert the interface of a class into another interface clients expect Adapter lets classes work together.
The Proxy Pattern SE-2811 Dr. Mark L. Hornick 1. The Proxy Pattern has many variations, but in general: The Proxy Pattern uses an proxy object as a surrogate.
Database Design Some of these slides are derived from IBM/Rational slides from courses on UML and object-oriented design and analysis. Copyright to the.
Chapter 36 More Object Design with GoF Patterns 1CS6359 Fall 2011 John Cole.
Proxy, Observer, Symbolic Links Rebecca Chernoff.
08 - StructuralCSC4071 Structural Patterns concerned with how classes and objects are composed to form larger structures –Adapter interface converter Bridge.
Structural Patterns1 Nour El Kadri SEG 3202 Software Design and Architecture Notes based on U of T Design Patterns class.
Proxy.
Proxy Design Pattern By:Diksha Agarwal.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Seminar on Service Oriented Architecture Distributed Systems Architectural Models From Coulouris, 5 th Ed. SOA Seminar Coulouris 5Ed.1.
Secure middleware patterns E.B.Fernandez. Middleware security Architectures have been studied and several patterns exist Security aspects have not been.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
CS 5150 Software Engineering Lecture 16 Program Design 3.
Design Patterns: Structural Design Patterns General and reusable solutions to common problems in software design Software University
The Proxy Pattern (Structural) ©SoftMoore ConsultingSlide 1.
Software Design and Architecture Muhammad Nasir Structural Design Patterns
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Client/Server Databases and the Oracle 10g Relational Database
GoF Patterns (GoF) popo.
Decorator Design Pattern
Ch > 28.4.
Object Oriented Design Patterns - Structural Patterns
Chapter 40 Remote Method Invocation
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
Software Design Lecture : 38.
15. Proxy SE2811 Software Component Design
GoF Patterns Ch. 26.
Presentation transcript:

Client/Server Software Architectures Yonglei Tao

Overview

Multi-Client/Multi-Service

Design Issues 1. Support communication between clients and servers 2. Hide details of the communication mechanism The proxy pattern 3. Manage various service requests The façade pattern 4. Support services that need access to databases Wrapper classes (the Adapter pattern)

1. Support Communication  Synchronous message communication with reply  Asynchronous message communication with callback

2. Hide Communication Mechanism  Problem  Direct access to a real subject is not desirable or possible  The proxy pattern  Provides a local representative for an object in a different address space  Hides details of accessing the real object (used in Java RMI)

The Proxy Pattern

 Adding a level of indirection with a surrogate for the real subject to control access to it  A proxy is an object with the same interface as the real object it represents  A client object interacts with the proxy even it intends to talk to the real object  The proxy forwards a request from a client object to the real object to fulfill the request

Proxy - Applicability  Protection proxy  Provide different objects with different level of access to the original object  Protect local clients from outside world as a firewall  Virtual proxy  Create/access expensive objects on demand

Middleware as Proxy  Provides standard services to software applications such as RPC, RMI, COM, CORBA, etc.

3. Manage Service Requests  Problem  How to provide a unified interface to a set of interfaces within a subsystem  Using the Façade pattern  Define a single entry point to the subsystem (a facade object that wraps the subsystem)  Let it be responsible for coordinating subsystem components  Clients interface the facade class to deal with the subsystem

The Façade Pattern

Façade – an Example

Façade - Consequences  A high-level interface that makes subsystem easy to use and more independent  Hide implementation of the subsystem from clients  It reduces coupling between a subsystem and its clients  A Façade class does not add new functionality to the subsystem

Manage Service Requests (1) Sequential Service  Using a single object to handle various requests from clients  A coordinator object or façade  Processing client requests one by one  Client uses synchronous message communication with reply to raise a request

Manage Service Requests (2) Concurrent Service  Sharing service functionality among several concurrent objects  Processing multiple client requests concurrently  Client uses asynchronous message communication with callback to raise a request  On completion, the responsible object remotely invokes the callback  Used where client demand for services is high  Improve throughput

4. Needs for Database Services  Query  View data  Perform computations on the data  Send data from one place to another  Manipulation  Add, modify, and delete data  Logging  Activities on the server  Interactions with the database

From a Static Model to a Relational Database  Mapping an entity class to a relational table  Relate attributes to columns, objects to rows  Identify primary key  Mapping associations to foreign keys  One-to-one, zero-to-one, and one-to-many  Mapping association classes  Mapping a whole/part relationship  Composite and aggregate  Mapping a generalization/specialization relationship  Superclass and Subclasses together  Subclasses Only  Superclass Only

Database Wrapper Classes  Entity classes  Likely to be designed on the client side  Occasionally used to temporarily store data on the server side  Database wrapper classes  Manage the data that is stored in a database  Primarily designed on the server side  Provides object-oriented interface to the database  Hides how the data is accessed and maintained

The Adapter Pattern  Problem  How to resolve incompatible interfaces or provide a stable interface to similar components with different interfaces  Solution  Convert the original interface of a component into another interface, through an intermediate adapter object  Also known as Wrapper

Motivation  Sometimes a toolkit or third party system cannot be used because its interface is incompatible with the interface required by an application  We cannot change the system  Even if we can we probably should not do for each domain-specific application

Structure

Example of Using Adapter  In the original CGI web server programs CGIVariables ref = …; ref.get(x); ref.get(y);  A new version of the web server supports servlets, which provide similar functionality but are more efficient HttpServletRequest ref = …; ref.getX(); ref.getY();  Should we rewrite all of the existing CGI programs in order to use servlets?  Want to minimize rewriting

Example (Cont.)  Design a CGIAdapter class  Has the same interface as the original CGIVariables class  Serves a wrapper around the HttpServletRequest class  Allow to use servlets with a CGI like interface  Modify code CGIVariables ref = …; ref.get(x); ref.get(y); CGIAdapter

Consequences  Provide a consistent interface within an application  Allow to change external components without affecting the clients  Introduce a level of indirection – extra overhead