Distributed Systems Tutorial 3 -.NET Remoting – Crossing Application Boundaries.

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
Advertisements

C# and Windows Programming Application Domains and Remoting.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
Remote Method Invocation
1 Advanced Programming Topics - II Objectives:  Background  Remoting  Types of remoting  Marshalling  Farmatters  Channels.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Distributed Systems Tutorial 2 -.NET Remoting. 2 What is Remoting?  Remoting allows you to pass objects or values across servers in different domains.
Introduction to Remote Method Invocation (RMI)
Brief Overview of.NET Remoting.NET Remoting is a Java RMI-like remote method invocation mechanism Infrastructure of.NET Remoting is highly customizable.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
ASP.NET Programming with C# and SQL Server First Edition
Chapter 22 Object-Oriented Design
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
Chapter 2 Network Models.
C++ fundamentals.
The OSI Model A layered framework for the design of network systems that allows communication across all types of computer systems regardless of their.
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
1 Review of Important Networking Concepts Introductory material. This slide uses the example from the previous module to review important networking concepts:
CCSDS Message Bus Comparison Shames, Barkley, Burleigh, Cooper, Haddow 28 Oct 2010.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
1 3 Web Proxies Web Protocols and Practice. 2 Topics Web Protocols and Practice WEB PROXIES  Web Proxy Definition  Three of the Most Common Intermediaries.
.Net Remoting. 2 Distributed Computing under.Net In.Net, there are three levels of access to distributed computing machinery: In.Net, there are three.
Presentation on Osi & TCP/IP MODEL
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
THE OSI MODEL AND THE TCP/IP PROTOCOL SUITE CS 1202 Lectur3 part2.
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
Lector: Aliyev H.U. Lecture №6 Design of client-server communication software. TCP-based network programming TASHKENT UNIVERSITY OF INFORMATION TECHNOLOGIES.
Remote Procedure Call Andrew Whitaker CSE451. Remote Procedure Call RPC exposes a programming interface across machines: interface PriceService { Price.
The OSI Model and the TCP/IP Protocol Suite Outline: 1.Protocol Layers 2.OSI Model 3.TCP/IP Model 4.Addressing 1.
Lecture 15 Introduction to Web Services Web Service Applications.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
(Business) Process Centric Exchanges
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
Copyright © 2003, developerLabs Extending.NET Distributed Applications Stephen Fulcher developerLabs.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Java Remote Method Invocation RMI. Idea If objects communicate with each other on one JVM why not do the same on several JVM’s? If objects communicate.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
CH 25-Remote Login (TELNET,Rlogin)
Enterprise Integration Patterns CS3300 Fall 2015.
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
.Net Remoting The Other RPC Architecture Doug Gregory October 27, 2003.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
Eric Tryon Brian Clark Christopher McKeowen. System Architecture The architecture can be broken down to three different basic layers Stub/skeleton layer.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
.NET Remoting. Remoting Introduction The process of programs or components interacting across certain boundaries either different processes or machines.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
OSI Model OSI MODEL. Communication Architecture Strategy for connecting host computers and other communicating equipment. Defines necessary elements for.
OSI Model OSI MODEL.
Presented by: Ramaswamy Krishnan-Chittur
.NET Remoting Priyanka Bharatula.
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Programming the Web Using Visual Studio .NET
Module 4 Remote Login.
Object Oriented Concepts -I
Presented by: Ramaswamy Krishnan-Chittur
Programming Models for Distributed Application
OSI Model OSI MODEL.
Distribution Infrastructures
WEB SERVICES From Chapter 19, Distributed Systems
J2EE Lecture 13: JMS and WebSocket
Jim Fawcett CSE791 – Distributed Objects Spring 2002
Presentation transcript:

Distributed Systems Tutorial 3 -.NET Remoting – Crossing Application Boundaries

2  In this tutorial, we will look at the overall sequence of events that occurs when a client of a remote object activates the object and then calls a method on that object.  Reminder: To enable objects in other application domains to use an instance of the class, the class must inherit from MarshalByRefObjet  How does.NET Remoting enable objects to communicate across.NET Remoting boundaries?  Answer: The client uses a proxy object to interact with the remote object by using some means of inter process communication.

3 Transparent Proxy  The transparent proxy is the one that the client directly accesses.  Transparent Proxy instance has an interface identical to the interface of the remote object.  When a client makes a method call on the transparent proxy, the proxy simply forwards the message to the second proxy type, RealProxy.

4 Real Proxy  The real proxy takes the message created by the transparent proxy and sends it to the.NET Remoting infrastructure for eventual delivery to the remote object.  The System.Runtime.Remoting.Proxies.RealProxy type is an abstract class .NET Remoting infrastructure defines a RemotingProxy class that extends RealProxy.  You can derive your own custom proxy type from RealProxy and use it in place of the one provided by the runtime.

5

6 Messages  Encapsulating the information about the method call in a message object abstracts and models the method−call in an object−oriented way. .NET Remoting uses messages to enable distributed objects to interact with one another.  Message objects encapsulate all method calls, input arguments, method return values, output arguments, exceptions, and so on.  The message conveys all this information from the caller to the callee.

7 .NET Remoting message object types implement the System.Runtime.Remoting.Messages.IMessage interface and are serializable.  Only instances of serializable types can cross.NET Remoting boundaries.  This means that any object placed in the message must be serializable if you want it to flow across the.NET Remoting boundary with the message.

8 Channels .NET Remoting transports serialized message objects across.NET Remoting boundaries through channels.  The.NET Remoting infrastructure provides two types of channels you can use to provide a transport mechanism for your distributed applications: TCP and HTTP.  The channel architecture provides flexibility by employing a series of channel sink objects linked together into a sink chain.

9  Each channel sink in the chain has a clearly defined role in the processing of the message.  Each channel sink performs the following tasks: Accepts the message and a stream from the previous sink in the chain Performs some action based on the message or stream Passes the message and stream to the next sink in the chain

10 Client−side channel architecture

11  In the previous slide, the client object makes calls on a transparent proxy, which in turn converts the method call into a message object and passes that object to the RealProxy—actually a RemotingProxy derived from RealProxy.  The RemotingProxy passes the message object to a set of specialized sink chains within the context (not shown in the slide).  The message object makes its way through the context sink chains until it reaches the first sink in the channel's sink chain: a formatter sink  Formatter Sink is responsible for serializing the message object to a byte stream by using a particular wire format.  The formatter sink then passes the stream to the next sink in the chain for further processing.  The last sink in the channel sink chain is responsible for transporting the stream over the wire by using a specific transport protocol.

12 Transport sink  A transport sink terminates the client−side channel sink chain.  When this sink receives the message stream, it first writes transport protocol header information to the wire and then copies the message stream to the wire, which transports the stream across the.NET Remoting boundary to the server−side.

13 Server−side channel architecture

14  The first sink on the server−side channel sink chain that the serialized message stream encounters is a transport sink that reads the transport protocol headers and the serialized message data from the stream.  After pulling this data off the wire, the transport sink passes this information to the next sink in the server−side sink chain.  Sinks in the chain perform their processing and pass the resulting message stream and headers up the channel sink chain until they reach the formatter sink.  The formatter sink deserializes the message stream and headers into an IMessage object and passes the message object to the.NET Remoting infrastructure's StackBuilderSink  StackBuilderSink actually makes the method call on the remote object.  StackBuilderSink converts the message into a stack based method call to the target object.

15  When the method call returns, the StackBuilderSink packages the return result and any output arguments into a message object of type System.Runtime.Remoting.Messaging.ReturnMessage, and then passes back it down the sink chain for eventual delivery to the proxy in the caller's.NET Remoting subdivision.

16 Server & Client architecture

17 Custom Sink  As shown in the previous slide, it is possible to add custom sinks to the chain, both on the client side and server side.  So when do we decide to develop our own custom sink?  Answer: We usually do it when we want to inspect or modify the data sent from the proxy to the remote object and / or the data returned from the remote object back to the proxy. For example: You want to encrypt the information sent over the wire between the client and the server.  Custom sinks can be placed either before or after the formatter sink, depending on whether they are designed to manipulate the message or the serialized stream.

18  Where should we locate a custom sink that responsible for encryption of the data ?  Answer: The encryption custom sink would want to work on the stream (it doesn’t care about the logical meaning of the message; it just needs to scramble it). Therefore the client-side custom sink should be situated after the formatter sink (after the message is serialized to a stream) while the server-side custom sink should be situated before the formatter sink (before the stream is diserialized back to a message).

19  What should you do if you want the client to send username and password information and the server, which should examine them before allowing access to the target object ?  Answer: you can create a client-side custom sink that adds the username and password to every outgoing message and a server-side custom sink that retrieves this information and throws an exception (which will be propagated back to the client) if the username and / or password are invalid. Since these custom sinks work on the message, rather than on the serialized stream, the client-side custom sink should be placed before the formatter sink (before the message is serialized to a stream) and the server-side custom sink should be placed after the formatter sink (after the stream is desterilized back to a message).