.Net Remoting Pooja Panjala 06/17/10. Agenda What is.net Remoting? Explanation of terms Architecture Implementation of Remoting Sample example.net Security.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

.Net Remoting by James Stone. What is.Net Remoting? RemotingRemoting is a technology that allows.NET applications to communicate. Remoting Same machine,
May 2, 2006Shawn Mulkey - EECS Distributed Computing & Object Oriented Middleware: Part 2 Presented By Shawn Mulkey.
Copyright © 2002 Landl Software, Inc. All Rights Reserved. Twin Cities.NET Users Group Next Meeting - Thursday, April 4, 2002 A Look Inside Reflection.
.NET Remoting in Delphi and C# Alain “Lino” Tadros President & CEO Falafel Software Inc. ComponentScience Inc. BORCON 2004.
C# and Windows Programming Application Domains and Remoting.
.NET REMOTING CertSIG Tom Perkins. FUNDAMENTALS Distributed Applications Process A Process B Process C Objects can communicate across process boundaries.
Author: Bill Buchanan. Authentication (to identify the clients of your application) Authorization (to provide access controls for those clients) Secure.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
Remote Method Invocation
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
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.
1 HANDOUT 14 Remote Method Invocation (RMI) BY GEORGE KOUTSOGIANNAKIS THIS DOCUMENT CAN NOT BE REPRODUCED OR DISTRIBUTED WITHOUT TH E WRITTEN PERMISSION.
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)
.NET Deployment Matt Smouse CSE775 – Distributed Objects Spring 2003.
Distributed Systems Tutorial 3 -.NET Remoting – Crossing Application Boundaries.
.NET Mobile Application Development Remote Procedure Call.
Chapter 15 Remoting Yingcai Xiao. ASP.NET is for building traditional thin- client applications (Web applications). Such applications rely on browsers.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 19 Microsoft’s Approach 1 –.NET Mobile Framework part 2 Rob.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
CIS NET Applications1 Chapter 10 – Remoting.
.NET Remoting Architecture. Slide 2 CITE 4420.NET Remoting Topics Remoting Boundaries Crossing the Boundaries Distributed Applications Marshalling Channels.
.Net Remoting. 2 Distributed Computing under.Net In.Net, there are three levels of access to distributed computing machinery: In.Net, there are three.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Distributed Shared Memory Using The.NET Framework Thomas Seidmann Department of Computer Science and Engineering Faculty of Electrical Engineering and.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
Presentation: Other Object Oriented Middlewares. Outline Web services Java RMI.NET Remoting WCF For each technology Compare: heterogenity (platform, OS,
15 - RMI. Java RMI Architecture Example Deployment RMI is a part of J2SE (standard edition), but is used by J2EE) A J2EE server is not nessesary for using.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Develop Distributed Applications using.NET Remoting Kate Gregory Regional Director Gregory Consulting Limited
Presentation 23.NET Remoting Introduced. Ingeniørhøjskolen i Århus Slide 2 af 20 Outline.NET Framework introduced.NET Remoting strategies Architecture.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
Serialization What is Serialization Serialization is the process of converting an object, or a connected graph of objects, stored within computer memory,
Systems Prog. & Script. - Heriot Watt Univ 1 Systems Programming & Scripting Lecture 11: The Distributed Object Model.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
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.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
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.
.NET Mobile Application Development XML Web Services.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
.NET XML Web Services by Joe Mayo Mayo Software Consulting
1 Nordjyllands Erhvervakademi Net Remoting Architecture Marshalling –Marshalling By Reference(MBR) –Marshalling By Value(MBV) Activation by MBR.
Presentation 24 Ultra Simple.NET Remoting to CORBA bridge.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
.NET Remoting. Remoting Introduction The process of programs or components interacting across certain boundaries either different processes or machines.
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Jim Fawcett CSE775 – Distributed Objects Spring 2003
Presented by: Ramaswamy Krishnan-Chittur
.NET Remoting Priyanka Bharatula.
Broker in practice: Middleware
Remote Method Invocation
Presentation 23 .NET Remoting Introduced
Advanced .NET Programming II 10th Lecture
Matt Smouse CSE775 – Distributed Objects Spring 2003
Presented by: Ramaswamy Krishnan-Chittur
Microsoft .NET Remoting Essentials
The command invocation protocol
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Distributed System using Web Services
Distributed System using Web Services
Matt Smouse CSE775 – Distributed Objects Spring 2003
Jim Fawcett Core Technologies Spring 2005
Jim Fawcett CSE791 – Distributed Objects Spring 2002
Matt Smouse CSE775 – Distributed Objects Spring 2003
Presentation transcript:

.Net Remoting Pooja Panjala 06/17/10

Agenda What is.net Remoting? Explanation of terms Architecture Implementation of Remoting Sample example.net Security

What is Remoting in.Net? It is a mechanism for communicating between objects which are not in the same process. Enables different applications located on same computer or different computer to communicate with objects. Provides a framework that allows objects to interact with each other across application domains..net Security

Remoting Components A remotable object: Which is an object that contain some properties and methods located in one application domain and you need to call its methods or properties from another application domain or process. A host application: This is the host of the remotable object also called as the server application. The main task of this host is to listen to requests for the hosted remotable object. A client application: This is the application which makes requests for the remotable object..net Security

Remote Objects It is an object outside the application domain of the caller application. Any object can be changed into a remote object by deriving it from MarshalByRefObject, or by making it serializable either by adding the [Serializable]tag or by implementing the ISerializable interface..net Security

Types of.NET Remotable Objects  Single Call object: Service one and only one request coming in.  Singleton Call object : Service multiple clients and is useful when data needs to be shared explicitly between several clients.  Client-Activated object : Richer than singleton in many aspects as they can store the state information between method calls for its specific client..net Security

Proxy object A proxy object is an object that acts in place of some other object. Created when client activates a remote object. It is an instance of the TransparentProxy class, directly available to the client to communicate with the remote object..net Security

Marshalling Specifies how a remote object is exposed to the client application. It is the process of packaging an object access request in one application domain and passing that request to another domain..net Security

Two methods Marshalling objects by value ▫analogous to having a copy of the server object at the client. ▫Marshal by value classes must either be marked with the [Serilaizable] attribute in order to use the default serialization, or must implement the ISerializable interface. Marshalling objects by reference ▫analogous to having a pointer to the object. ▫Marshal by reference classes must inherit from System.MarshalByRefObject..net Security

Channels It is a mechanism by which a stream of bytes is sent from one point to the other. Two pre-defined.NET Remoting channels existing in System.Runtime.Remoting.Channels are TCPChannel and the HTTPChannel..net Security

Serialization formatters.NET Remoting uses serialization to copy marshal-by-value objects, and to send reference of objects which are marshal-by-reference, between application domains. Formatters are used for encoding and decoding the messages before they are transported by the channel..net Security

Two types of formatters binary(System.Runtime.Serialization.Formatters.Binary) ▫Use binary encoding where performance is critical ▫Small size SOAP (System.Runtime.Serialization.Formatters.Soap) ▫Use XML encoding where interoperability with other remoting frameworks is essential..net Security

Architecture Client’s call proxy to remote object method invocation on remote object Message encoded Call sent to the server using channel.net Security

Implementation of Remoting Create a Remotable Object MyRemotableObject.cs namespace RemotableObjects { public class MyRemotableObject : MarshalByRefObject { public MyRemotableObject() { } public void SetMessage(string message) { Cache.GetInstance().MessageString = message; }.net Security

Create a Server to Expose the Remotable Object namespace RemotableObjects { public class frmRServer : System.Windows.Forms.Form, IObserver { private System.Windows.Forms.TextBox textBox1; private MyRemotableObject remotableObject; private System.ComponentModel.Container components = null; public frmRServer() { InitializeComponent(); remotableObject = new MyRemotableObject(); // using TCP protocol TcpChannel channel = new TcpChannel(8080); ChannelServices.RegisterChannel(channel); RemotingConfiguration.RegisterWellKnownServiceType( typeof(MyRemotableObject),"HelloWorld", WellKnownObjectMode.Singleton); RemotableObjects.Cache.Attach(this); }

.net Security Create a Client to Use the Remotable Object namespace RemotableObjects { public class frmRCleint : System.Windows.Forms.Form { private System.Windows.Forms.TextBox textBox1; MyRemotableObject remoteObject; private System.ComponentModel.Container components = null; public frmRCleint() { InitializeComponent(); // using TCP protocol // running both client and server on same machines TcpChannel chan = new TcpChannel(); ChannelServices.RegisterChannel(chan); // Create an instance of the remote object remoteObject = (MyRemotableObject) Activator.GetObject( typeof(MyRemotableObject),"tcp://localhost:8080/HelloWorld"); } private void textBox1_TextChanged(object sender, System.EventArgs e) { remoteObject.SetMessage(textBox1.Text); }

.net Security Step 1: Creating the Server Server.cs using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels.HTTP; namespace Server { public class ServiceClass : MarshalByRefObject { public void AddMessage (String msg) { Console.WriteLine (msg); } } public class ServerClass { public static void Main () { HTTPChannel c = new HTTPChannel (1095); ChannelServices.RegisterChannel (c); RemotingServices.RegisterWellKnownType ("Server","Server.ServiceClass","ServiceClass",Server WellKnownObjectMode.Singleton); Console.WriteLine ("Server ON at 1095"); Console.WriteLine ("Press enter to stop the server..."); Console.ReadLine (); } } }

.net Security Compile this file using csc /r:system.runtime.remoting.dll /r:system.dll Server.cs This will generate a executable Server.exe, run this file and on the console u should see Server ON at 1095 Press enter to stop the server...

.net Security Step 2: a) Creating Client Proxy soapsuds -url: :1095/ServiceClass -oa:Server.dll This will create a proxy called Server.dll which will be used to access the remote object

.net Security Step 2: b) Creating Client Code TheClient.cs using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels.HTTP; using Server; public class TheClient { public static void Main (string[] args) { HTTPChannel c = new HTTPChannel (1077); ChannelServices.RegisterChannel (c); ServiceClass sc = (ServiceClass) Activator.GetObject (typeof (ServiceClass), :1095/ServiceClass); sc.AddMessage ("Hello From Client"); } }Service

.net Security Compile it using csc /r:system.runtime.remoting.dll /r:system.dll /r:Server.dll TheClient.cs The output will be TheClient.exe, run it and check the server console on Machine 1, you will see "Hello From Client".

References us/library/2e7z38xb(v=VS.71).aspxhttp://msdn.microsoft.com/en- us/library/2e7z38xb(v=VS.71).aspx ting.aspxhttp:// ting.aspx.net Security

Thank you!.net Security