Transcript
  • Distributed Communication via ASP.Net Web Services and .Net RemotingBy Richard King

  • What are ASP.Net Web Services and .Net Remoting?Two new technologies provided in the .Net Framework for developing distributed applications.ASP.Net Web Services and .Net Remoting replace:Microsofts DCOM (Distributed Component Object Model)Java RMI (Remote Machine Invocation) CORBA (Common Object Request Broker Architecture)

  • DefinitionsASP.Net Web Services: provides a simple API (Application Programming Interface) for Web services based on mapping SOAP (Simple Object Access Protocol) messages to method invocations. .Net Remoting: provides an infrastructure for distributed objects. It exposes the full-object semantics of .NET to remote processes using plumbing that is both very flexible and extensible.

  • .Net RemotingA tight coupled client and server approach to distributed communication.Supports the communication of a full feature set of data types..Net Remoting has support for passing objects by value or by reference, callbacks, and multiple-object activation and lifecycle management policies. Similar to Javas RMI.

  • .Net Service Architecture

  • ASP.Net Web ServicesWorks by exposing APIs called web methods via HTTP.Web Methods provide a service to the end user. Enables cross platform integration using XML, HTTP and SOAP. Using industry standards makes Web Services independent of programming languages and platforms.

  • ASP.Net Web Services ContWSDL (Web Service Discription Language): exposes web methods, protocols supported, signatures of methods and web service location.DISCO (short for discovery): Microsoft technology for publishing and discovering web services.UDDI (Universal Description and Discovery Integration): specification for building distributed databases that provide parties a way to discover web services.

  • ASP.Net Web Services and .Net Remoting Compared.Protocol:ASP.Net Web Services only provides access via HTTP. Data is formatted in a SOAP packets. .Net Remoting provides access via TCP, HTTP and custom protocols. Data can be formatted as binary or SOAP packets.

  • ASP.Net Web Services and .Net Remoting Compared ContStates:ASP.Net Web Services is a stateless environment. .Net Remoting can be a stateful and stateless environment.Client ActivationUnder the control of lease-based lifetime manager.Lease-times ensure that the objects are garbage collected when the lease time expires. Lease-times are set by extending the MarshalByRefObject class and implementing the ILease interface inside of MarshalByRefObject .Server ActivationStateless modeSingleCall: creates a new instance of the remoting object for each request.Stateful modeSingleton: creates only one instance of an object that is used for all requests.

  • ASP.Net Web Services and .Net Remoting Compared ContInteroperability:ASP.Net Web Services works with industry standards to provide high levels of interoperability. This allows for ASP.Net Web Services to work in a heterogeneous environments..Net Remoting supplies a tightly coupled form of distributed communication. Clients must be implement with the .Net Framework. The tight coupling causes .Net Remoting to be implemented in a homogeneous environment.

  • ASP.Net Web Services and .Net Remoting Compared

  • ASP.Net Web Services and .Net Remoting within the .Net Framework

  • Sample ASP.Net Web Serviceusing System;using System.Collections;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Web;using System.Web.Services;

    namespace Example{public class Example: System.Web.Services.WebService{

    [WebMethod]public String SayHello(){return "Hello";}}}

  • Future of Distributed Computing and .Net Framework 2.0.Net Remoting will transfer to Indigo Services.Indigo services will allow for the transfer of objects without sharing .Net assemblies.


Top Related