Smart Reference Proxy Provides additional actions whenever an object is referenced (e.g., counting the number of references to the object) Firewall Proxy.

Slides:



Advertisements
Similar presentations
Systems Architecture Use Case Diagram, System Overview, Class Diagram Design Patterns (weve used) Refactorings (weve used) Table of Contents.
Advertisements

Enabling Secure Internet Access with ISA Server
Firewalls By Tahaei Fall What is a firewall? a choke point of control and monitoring interconnects networks with differing trust imposes restrictions.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 44 How Firewalls Work How Firewalls Work.
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
CS682 Session 6 Prof. Katz. Firewalls An intelligent router? Used as a traffic control mechanism Based on information in the Layer 3 and 4 headers Administrator.
Design Patterns: Proxy Jason Jacob. What is a Proxy? A Proxy is basically a representative between the Client and the Component. It gives the Client a.
Design Patterns Part IV (TIC++V2:C10) Yingcai Xiao 10/01/08.
Algorithm Programming Structural Design Patterns Bar-Ilan University תשס " ו by Moshe Fresko.
The Composite Pattern.. Composite Pattern Intent –Compose objects into tree structures to represent part-whole hierarchies. –Composite lets clients treat.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
PRASHANTHI NARAYAN NETTEM.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Proxy Design Pattern (1) –A structural design pattern.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Web Proxy Server Anagh Pathak Jesus Cervantes Henry Tjhen Luis Luna.
Web Cache. Introduction what is web cache?  Introducing proxy servers at certain points in the network that serve in caching Web documents for faster.
1 Enabling Secure Internet Access with ISA Server.
Proxy Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
Multithreading.
Client/Server Software Architectures Yonglei Tao.
A Brief Taxonomy of Firewalls
CECS 5460 – Assignment 3 Stacey VanderHeiden Güney.
Implementing ISA Server Publishing. Introduction What Are Web Publishing Rules? ISA Server uses Web publishing rules to make Web sites on protected networks.
A Web Crawler Design for Data Mining
1 The Proxy Design Pattern Problem: Defer the cost of object creation and init. until actually used Applicability (possible contexts): – Virtual Proxy:
Team 5: The Infinite Loops Gloria Berumen Patricia Martinez Jose Roberto Salcido Michelle Soto Jose Luis Yanez Omar Zorrilla Design Pattern.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Design Patterns: Structural Design Patterns
Scalable Web Server on Heterogeneous Cluster CHEN Ge.
Hour 7 The Application Layer 1. What Is the Application Layer? The Application layer is the top layer in TCP/IP's protocol suite Some of the components.
In the name of Allah The Proxy Pattern Elham moazzen.
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Structural Design Patterns
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns V More Structural Patterns.
02 - Structural Design Patterns – 2 Moshe Fresko Bar-Ilan University תשס"ח 2008.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
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.
Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.
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.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
Design Patterns: Structural Design Patterns General and reusable solutions to common problems in software design Software University
The Proxy Pattern (Structural) ©SoftMoore ConsultingSlide 1.
Behavioral Pattern: Mediator C h a p t e r 5 – P a g e 169 When a program is made up of several classes, the logic and computation is divided among these.
Proxy. PBA WEB – BEWP 2 The Proxy pattern What is a Proxy? A Proxy is a ”placeholder” for a different object, to which we will not allow direct access.
Structural Patterns C h a p t e r 4 – P a g e 55 StructuralPatterns Design patterns that describe how classes and objects can be combined to form larger.
Week 9, Day 1 Proxy SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
Software Design and Architecture Muhammad Nasir Structural Design Patterns
SSH. 2 SSH – Secure Shell SSH is a cryptographic protocol – Implemented in software originally for remote login applications – One most popular software.
NAT、DHCP、Firewall、FTP、Proxy
Creational Pattern: Prototype
Network Load Balancing
File System Implementation
Web Caching? Web Caching:.
Introducing To Networking
Unit 27: Network Operating Systems
Dynamic Memory Allocation Reference Variables
Page Replacement.
Software Design Lecture : 38.
15. Proxy SE2811 Software Component Design
Proxy Pattern Definition of “Proxy”: Authority or power to act for another Original Gang of Four pattern, much used Stands in for a “real object” (similar.
Presentation transcript:

Smart Reference Proxy Provides additional actions whenever an object is referenced (e.g., counting the number of references to the object) Firewall Proxy Protects targets from bad clients (and vice versa) Synchronization Proxy Provides multiple accesses to a target object Structural Pattern: Proxy At times, a client needs to interact with an object without accessing it directly. C h a p t e r 4 – P a g e 117 The Proxy Pattern creates a surrogate object, which serves as an intermediary between the client and the target object. Remote Proxy Provides a reference to an object that is located in a different address space Virtual Proxy Delays the creation of a memory-intensive object until it is absolutely necessary Protection Proxy Provides different clients with different levels of access to a target object Cache Proxy Provides temporary storage of expensive target operations so multiple clients can share the results

The Proxy Pattern C h a p t e r 4 – P a g e 118 The Subject defines the common interface for RealSubject and Proxy so that a Proxy can be used anywhere a RealSubject is expected. The RealSubject defines the real object that the proxy represents. The Proxy maintains a reference that allows it to access the RealSubject, with an interface identical to the RealSubject’s so the Proxy can, in fact, be substituted for the RealSubject. The Proxy controls access to the RealSubject and may be responsible for creating and deleting it.

Proxy Examples C h a p t e r 4 – P a g e 119 Firewall Proxy While primitive firewalls protect internal networks from external networks by merely inspecting addresses and port numbers, more thorough traffic inspection might be needed to guard against such violations as improper commands. Remote Proxy A machine has several utility services running as daemons on well-known ports, but various client machines need to be able to access these services as if they were local objects. Virtual Proxy A large collection object (e.g., a hash table) needs to be accessed concurrently by multiple clients, and one client wants to perform several consecutive fetch operations without letting any other client add or remove objects. Cache Proxy An Internet Service Provider notices that many of its clients are frequently accessing the same web pages, resulting in multiple copies of the web documents being transmitted through its server. Solution: Use a lock object for the collection; have the client implement a method which obtains the lock, performs its fetches and then releases the lock. Solution: The ISP's server can cache recently accessed pages and when a client request arrives, the server can check to see if the document is already in the cache and then return the cached copy. The ISP's server accesses the target web server only if the requested document is not in the cache or is out of date. Solution: Translate the client’s queries into remote calls, receive the results of the query from the remote object, and forward them to the client. Solution: Firewall proxy servers force both ends of a connection to conduct the session through the proxy by creating and running a process on the firewall that mirrors a service as if it were running on the end host.

C++ Example – No Proxy Pattern C h a p t e r 4 – P a g e 120 #include using namespace std; class Image { int imageID; static int nextID; public: Image() { imageID = nextID++; cout << " constructing image " << imageID << endl; } ~Image() { cout << " destroying image " << imageID << endl; } void draw() { cout << " drawing image " << imageID << endl; } }; int Image::nextID = 1; void main() { Image images[5]; int index; cout << "Enter 0 for Exit, 1-5 for Image: "; cin >> index; while (index != 0) { images[index - 1].draw(); cout << "Enter 0 for Exit, 1-5 for Image: "; cin >> index; } Note the start-up and shut-down overhead, even for images that were never accessed.

C++ Example – w/Proxy Pattern C h a p t e r 4 – P a g e 121 #include using namespace std; class RealImage { int imageID; public: RealImage(int index) { imageID = index; cout << " constructing image " << imageID << endl; } ~RealImage() { cout << " destroying image " << imageID << endl; } void draw() { cout << " drawing image " << imageID << endl; } }; // Design an "extra level of indirection" wrapper class class Image { // The wrapper class holds a pointer to the real class RealImage *theRealImage; int imageID; static int nextID; public: Image() { imageID = nextID++; // Initialized to null theRealImage = 0; } ~Image() { delete theRealImage; }

C h a p t e r 4 – P a g e 122 void draw() { // When a request comes in, the real // object is created "on first use" if (!theRealImage) theRealImage = new RealImage(imageID); // The request is always delegated theRealImage->draw(); } }; int Image::nextID = 1; void main() { Image images[5]; int index; cout << "Enter 0 for Exit, 1-5 for Image: "; cin >> index; while (index != 0) { images[index - 1].draw(); cout << "Enter 0 for Exit, 1-5 for Image: "; cin >> index; }

Proxy Pattern Advantages C h a p t e r 4 – P a g e 123 The Proxy Pattern provides an additional level of indirection to support distributed, controlled, or intelligent access to the target object, protecting the target from undue complexity. While the Adapter Pattern provides a different interface to its subject and the Decorator Pattern provides an enhanced interface to its subject, the Proxy Pattern provides the same interface that is normally used by the subject. Proxies are useful whenever there is a need for a more sophisticated reference to an object than can be provided by a simple pointer.