.NET Remoting - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

.NET Remoting

Description:

What does a Remoting Application look like? Very Practical Software, Inc. What Is Remoting? ... Console Application. Very Practical Software, Inc. Remoting ... – PowerPoint PPT presentation

Number of Views:521
Avg rating:3.0/5.0
Slides: 23
Provided by: deanf5
Category:
Tags: net | remoting

less

Transcript and Presenter's Notes

Title: .NET Remoting


1
.NET Remoting
  • Adventures Among the App Domains

Dean Fiala
2
Overview
  • What is Remoting?
  • How is it different from Web Services DCOM?
  • What are the Use Cases for Remoting?
  • How does Remoting work?
  • What does a Remoting Application look like?

3
What Is Remoting?
  • Remoting allows a client application to reference
    and use objects
  • In another AppDomain
  • In another process
  • On a remote machine
  • In short, it is the basis for a distributed
    architecture

4
Distributed Architecture Use Cases
  • Physical Tier Separation
  • Centralize Business Logic
  • Load Balancing
  • Disconnected Use

5
DCOM vs Remoting
Remoting
DCOM
  • Requires TCP
  • Object Lifetime requires pinging and reference
    counting
  • Configuration Registry Fun
  • TCP HTTP channels
  • Leases and sponsors manage object Lifetime
  • Configuration uses .config files

6
Web Services vs Remoting
Remoting
Web Services
  • HTTP only
  • Text Formatting
  • IIS Host
  • Leverages IIS Authentication/Encryption
  • WSDL
  • TCP HTTP channels
  • Text or Binary Formatting
  • IIS or Custom Host (Windows Service, WinForm,
    Console)
  • More Complex Object support

7
Remoting Use Cases
8
Marshalling Choices
  • Marshall By Value Server object is serialized,
    returned to the client and runs within the client
    process. Class must use Serializable attribute.
  • Marshall By Reference Server object is
    instantiated and run in the server process and is
    referenced by the client. Class must inherit
    MarshalByRefObject.

9
Activation Choices
  • Server Activated Object (SAO) Singleton all
    clients access the same object
  • SAO Single Call object is created, used for
    one method call and then disposed
  • Client Activated Object (CAO) Explicitly
    created by the client on the server, maintains
    state between method calls

10
Remoting Architecture Choices
  • Shared Assembly Server objects exist in an
    assembly on both client and server, runtime
    determination is made which to invoke good for
    occasionally disconnected apps
  • Shared Interface Client and server refer to the
    same Interface assembly, but only server objects
    implement the methods
  • Generated MetaData Extract metadata
    (interfaces, objects, etc.) from the Server
    assembly and build client assembly

11
How Does Remoting Work?
12
Local Proxy Object
  • Has same method signatures as the Server Object
  • Is created transparently when a call to a
    Server Object method is made
  • Creates a Channel object to route the request
    to the server

13
Formatter Sink
  • First Sink in the Client Channel objects sink
    chain
  • Serializes the method call to the Server Object
    into the appropriate format for the Channel
  • Two standard Formatters are Binary and SOAP

14
Transport Sink
  • Last sink in the Client Channel object chain
  • Transports the method call to the destination
    port on the Server

15
Transport Sink - Server
  • First sink in the Server Channel object chain
  • Receives the request from the client

16
Formatter Sink - Server
  • Last Sink in the Server Channel objects sink
    chain
  • Deserializes the method call into its original
    format

17
Dispatcher
  • Locates the proper assembly in the server
    application
  • Instantiates the object
  • Invokes the method

18
Remoting Server
  • The following can all act as Remoting Servers..
  • IIS
  • Windows Service
  • WinForms App
  • Console Application

19
Remoting Client
  • WinForm App
  • Web App
  • Web Service
  • Console App
  • Windows Service

20
Sample Application
  • Demonstrate
  • WinForms Client
  • Web Client
  • Remote Server (Windows Service)
  • Interface Assembly

21
More Information
  • IngoRammer.com http//www.ingorammer.com/Remotin
    gFAQ/
  • Develop Distributed Applications using Microsoft
    .NET Remoting (Online Seminar)http//www.microsof
    t.com/seminar/shared/asp/view.asp?url/Seminar/en/
    20020531devt1-54/manifest.xml
  • Design and Develop Seamless Distributed
    Applications for the Common Language Runtime
    http//msdn.microsoft.com/library/default.asp?url
    /msdnmag/issues/02/10/netremoting/toc.asp
  • ASP.NET Web Services or .NET Remoting How to
    Choose http//msdn.microsoft.com/library/default.a
    sp?url/library/en-us/dnbda/html/bdadotnetarch16.a
    sp
  • Advanced .NET Remoting (Book)http//www.amazon.c
    om/exec/obidos/tg/detail/-/1590590252/qid10830813
    59/sr8-1/refpd_ka_1/102-6505139-8209727?vglance
    sbooksn507846

22
Very Practical Software, Inc.
  • Rockville, Maryland
  • http//www.vpsw.com
Write a Comment
User Comments (0)
About PowerShow.com