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.

Slides:



Advertisements
Similar presentations
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Advertisements

CS 210 Proxy Pattern Nov 14 th, Revisit the Gumball machine example The same example covered in the State pattern Now we want to add some monitor.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Remote Method Invocation
Remote Object Invocation
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
EEC-681/781 Distributed Computing Systems Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Apache Axis: A Set of Java Tools for SOAP Web Services.
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
Integration case study Week 8 – Lecture 1. Enrolment request (Workstation) Application server Database server Database New University Student Record System.
Design Patterns Part IV (TIC++V2:C10) Yingcai Xiao 10/01/08.
Communication in Distributed Systems –Part 2
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Proxy Design Pattern (1) –A structural design pattern.
Client/Server Software Architectures Yonglei Tao.
Distributed Systems CS Project 1: File Storage and Access Kit (FileStack) Recitation 1, Aug 29, 2013 Dania Abed Rabbou and Mohammad Hammoud.
1 The SpaceWire Internet Tunnel and the Advantages It Provides For Spacecraft Integration Stuart Mills, Steve Parkes Space Technology Centre University.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Week 5, Day 3: Observer Today Reducing coupling with the Observer The Observer pattern in Java APIs Posting events to a UI worker thread SE-2811 Slide.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
Smart Reference Proxy Provides additional actions whenever an object is referenced (e.g., counting the number of references to the object) Firewall Proxy.
Jaeki Song ISQS6337 JAVA Lecture 16 Other Issues in Java.
Presentation 8: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
CSCI 6962: Server-side Design and Programming Web Services.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 4 Communication.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
In the name of Allah The Proxy Pattern Elham moazzen.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
RMI RMI is the java API that facilitate distributed computing by allowing remote method calls. A remote method call represents a method invocation between.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
The Factory Patterns SE-2811 Dr. Mark L. Hornick 1.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Week 2, Day 2: The Factory Method Pattern Other good design principles Cohesion vs. Coupling Implementing the Strategy Pattern Changing strategies (behaviors)
Proxy.
Proxy Design Pattern By:Diksha Agarwal.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Overview of Grid Webservices in Distributed Scientific Applications Dennis Gannon Aleksander Slominski Indiana University Extreme! Lab.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Proxy Pattern. What’s a Proxy? A remote proxy acts as a local representative of a remote object Remote Object: instantiated in a different JVM heap (a.
The Proxy Pattern (Structural) ©SoftMoore ConsultingSlide 1.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Java RMI. RMI Any object whose methods can be invoked from another Java VM is called a remote object.
CSC 480 Software Engineering Lab 6 – RMI Nov 8, 2002.
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
Topic 5: CORBA RMI Dr. Ayman Srour
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
RMI (Java RMI) P 460 in text UUIDs / system wide references Transparent: all objects either by ref. or by value. Not efficient, especially int, bool, etc.
Distributed Computing
Week 2, Day 1: The Factory Method Pattern
MCA – 405 Elective –I (A) Java Programming & Technology
Dynamic Proxy Proxy: Addition to the Java 1.3 reflection package:
Remote Method Invocation
What is RMI? Remote Method Invocation
Extending Java RMI for Dynamic Reconfiguration
Model-View-Controller
Bond-Jini Interoperability
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.
Java Socket Programming and Java RMI CSE 291
Presentation transcript:

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 (aka stand-in or placeholder) that acts like another object SE-2811 Dr. Mark L. Hornick 2

Generic Proxy Pattern: A Client programs to a Subject, which may be a RealSubject or a Proxy SE-2811 Dr. Mark L. Hornick 3

The Stub Proxy is a (temporary) placeholder for the Real Subject Sometimes the Real Subject is not available For example: still under development The Stub Proxy can provide implementation of the Subject interface to varying degrees: 1. Just enough to compile without error 2. To allow rudimentary Subject functionality 3. To provide a complete emulation of the RealSubject 4

Stub Proxy – the Real Subject emulator SE-2811 Dr. Mark L. Hornick 5

The Protection Proxy controls access to a resource (the Real Subject) that is restricted by access rights The Protection Proxy provides predefined access to certain functionality implemented by the Real Subject, but Purposely limited by the access rights built into the Protection Proxy For example, the ability to query (but not modify) a protected database 6

The Protection Proxy limits access to the Real Subject SE-2811 Dr. Mark L. Hornick 7 ProtectionProxy

The Virtual Proxy controls access to a resource (the Real Subject) that is expensive to create or use The Virtual Proxy provides access to all of the functionality implemented by the Real Subject, but More quicky/cheaply Acts as a surrogate until the Real Subject becomes available 8

The Virtual Proxy provides all functionality of the Real Subject SE-2811 Dr. Mark L. Hornick 9 The Virtual Proxy controls access to the Real Subject, and is often responsible for creation of the Real Subject

The Remote Proxy provides local access to a remote resource (the Real Subject) The Remote Proxy handles the details of accessing a remote resource Remote Access can be implemented in many different ways, using different communication protocols Simple sockets Remote Method Invocation HTTP-based (e.g. web-services) … 10

The Remote Proxy allows the Client to think it is accessing a local resource SE-2811 Dr. Mark L. Hornick 11

Lab 9 Approach : RemoteProxy SE-2811 Dr. Mark L. Hornick 12

Java Remote Method Invocation is a framework with tools that auto-generate the Remote Proxy and Skeleton Invocation Handler SE-2811 Dr. Mark L. Hornick 13 Java RMI requires several dedicated ports, which may be blocked by firewalls

Web Services involve plugins and scripts running on a web server to invoke remote methods SE-2811 Dr. Mark L. Hornick 14 There are many different varieties of web service-based remoting. A primary advantage is that port 80 (the HTTP port) can be used.