Develop Distributed Applications using.NET Remoting Kate Gregory Regional Director Gregory Consulting Limited

Slides:



Advertisements
Similar presentations
.Net Remoting by James Stone. What is.Net Remoting? RemotingRemoting is a technology that allows.NET applications to communicate. Remoting Same machine,
Advertisements

Distributed Applications By Sam Nasr, MCP
Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
General introduction to Web services and an implementation example
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.
Service Oriented Architecture (SOA) Richard Godfrey CEng MBCS CITP Architect Developer & Platform Group
Windows Communication Foundation and Web Services.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
1 Advanced Programming Topics - II Objectives:  Background  Remoting  Types of remoting  Marshalling  Farmatters  Channels.
Rheeve: A Plug-n-Play Peer- to-Peer Computing Platform Wang-kee Poon and Jiannong Cao Department of Computing, The Hong Kong Polytechnic University ICDCSW.
Distributed Systems Tutorial 2 -.NET Remoting. 2 What is Remoting?  Remoting allows you to pass objects or values across servers in different domains.
.NET Deployment Matt Smouse CSE775 – Distributed Objects Spring 2003.
Chapter 12 Extending Web Applications. ASP.NET 2.0, Third Edition2.
Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd
Getting Started with Windows Communication Foundation 4.5 Ed Jones, MCT, MCPD, MCTS Consultant RBA Inc.
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
Guide to MCSE , Second Edition, Enhanced1 Windows XP Network Overview Most versatile Windows operating system Supports local area network (LAN) connections.
.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 G52IWS: Distributed Computing Chris Greenhalgh.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Web Services & WCF ~ Ankit. Web services A web service is a collection of protocols and standards used for exchanging data between applications or systems.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
1 “Indigo”: Services And The Future Of Distributed Applications Don Box Architect Microsoft Corporation here –
Lecture 15 Introduction to Web Services Web Service Applications.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
1 Introduction to Microsoft Windows 2000 Windows 2000 Overview Windows 2000 Architecture Overview Windows 2000 Directory Services Overview Logging On to.
.Net – The First Glance What Is.Net, Why Use.Net.
Random Logic l Forum.NET l Web Services Enhancements for Microsoft.NET (WSE) Forum.NET ● October 4th, 2006.
.NET Enterprise Services COM+ 1.5 麥超俊 Bobby Mak 架構技術推廣經理開發工具暨平台推廣處台灣微軟股份有限公司.
.Net Remoting The Other RPC Architecture Doug Gregory October 27, 2003.
.NET Remoting Chandra sekhar Chandra sekhar. What is.NET Remoting? What is.NET Remoting?.NET Remoting versus Distributed COM..NET Remoting versus Distributed.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
Base Operating System Services CLR TransactionsStorage Protocols Network Services Kernel Mode Base Class Libraries Memory Manager Hosting Layer Code Execution.
Presentation 24: Windows Communication Foundation Introduced Objektorienteret Netværkskommunikation.
CORBA AND SOAP Unmesh Kulkarni i2 Group Ashish V. Tendulkar Directory Database integration group ( Persistent Systems Pvt. Ltd.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
.NET Mobile Application Development XML Web Services.
Dhananjay Kumar MVP-Connected System 1. WCF  Agenda What is WCF ? Why WCF? Address, Binding, Contract End Points Hosting Message Patterns Programming.
Introduction to.NET FX 3.0 (+ sneak preview of.NET FX 3.5) Martin Parry Developer & Platform Group Microsoft Ltd
1 Nordjyllands Erhvervakademi Net Remoting Architecture Marshalling –Marshalling By Reference(MBR) –Marshalling By Value(MBV) Activation by MBR.
.NET Remoting. Remoting Introduction The process of programs or components interacting across certain boundaries either different processes or machines.
Windows Communication Foundation and Web Services
Jim Fawcett CSE775 – Distributed Objects Spring 2003
Develop Distributed Applications using .NET Remoting
.NET Remoting Priyanka Bharatula.
WCF.
Presentation 23 .NET Remoting Introduced
Advanced .NET Programming II 10th Lecture
Matt Smouse CSE775 – Distributed Objects Spring 2003
Distribution of functionality Webservice using WCF
Microsoft .NET Remoting Essentials
Windows Communication Foundation and Web Services
The future of distributed systems architecture
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Distributed Applications on Windows Vista
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:

Develop Distributed Applications using.NET Remoting Kate Gregory Regional Director Gregory Consulting Limited

What we will cover  Introduction to.NET Remoting  Not Exhaustive  Compare to DCOM and Web Services  Configuring.NET Remote Applications  Hosting.NET Remote Applications  What about Indigo?

Who likes DCOM?  You know DCOM’s a pain if:  You've ever wanted to control the channel or format, or anything else about the DCOM messages.  You've ever wanted to trace or log DCOM messages.  You've wanted to easily use DCOM over the internet with a variety of clients.  You’ve ever wanted to quickly change configuration settings such as ports and channels.

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Architecture and Terminology Intro to Remoting  Communication between Application Domains  Usually Between Servers  Replacement for DCOM  Low Level Control

Architecture and Terminology Remoting Terminology  Application Domains  Channels  Formatters  Server Activated Objects (Wellknown)  Client Activated Objects

Architecture and Terminology Application Domains  Process Boundary  Provides Isolation  Provides Protection  Security

Architecture and Terminology Channels  Transport Data  Two Default Formats- or tcp://  - good for firewalls  Tcp:// - high speed, binary  Port Agnostic  Create Your Own

Architecture and Terminology Formatters  Turn Message Into Stream  Binary  Soap 1.1 Compliant

Architecture and Terminology.NET to Non-.NET  SOAP 1.1 Specification   Simple Datatypes  int  float  string

Architecture and Terminology.NET to.NET  Rich Functionality  Almost any CLS Object  DataSets  Hashtables  Custom Objects  Binary  Fast

Demo 1  Remoting Concepts

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Web Services   Web Services   Any Application   IIS   WinForm   Windows® Service   Console Application   Multiple Protocols     Tcp://   Custom   Binary or Soap   Only IIS   Only   WSDL   Remoting

DCOM   DCOM   Choose Protocol   Create Protocol   Firewall Friendly   Custom Ports   Define Protocol   Tighter Security   Custom   IIS   NT   RPC Protocol   Not Firewall Friendly   Pings for Lifetime   Remoting

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Server Activated Objects  Well-known  SingleCall  Singleton  Marshaling  Configuration

Server Activated Objects Well-Known  Client Must Know The Endpoint  Server Controls Object   RegisterWellKnownServiceType()

Server Activated Objects SingleCall  Object Created On Each Call  One Instance Per Client Request  No State  Server Farm Friendly  mode=“SingleCall”

Server Activated Objects Singleton  One Object On Server  Has Lifetime  Default 5 Minutes  Can Override  Shared Between Multiple Clients

Server Activated Objects Marshaling  Marshall by Value  Object Serialized  Attribute [Serializable]  Implement ISerializable  Marshall by Reference  Inherit System.MarshalByRefObject  Proxy Class

Server Activated Objects Server Configuration  Config file <wellknown mode=“SingleCall” or “Singleton” type=“type,assembly” objectUri=“myobject” />  Programmatic  Create Wellknown Type  Register

Demo 2  Single Call vs Singleton  State

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Client Activated Objects Client Activated Object (CAO)  Created by Calling Client  Client Controls Lifetime  Lease  State For Individual Client  Tracking Services

Client Activated Objects Client Activation  New()  Configuration File   Activator.CreateInstance()  Overloaded  Pass In Url, Assembly Attributes

Client Activated Objects Configuration Properties  Config file <activated type="type,assembly" />  Programmatic  UrlAttribute  Activator.CreateInstance

Client Activated Objects Lease  In DCOM – Ping  High Overhead  Not Suited for Internet  Remoting - Lease-based Mechanism  Set Default Lifetime (min, sec, etc..)  Sponsors Renew

Client Activated Objects Properties  Lease Time  Default 5 Minutes  Set 0 to Infinite  Sponsors  Listens from Server Application  GetLifeTimeService()  Renewal()

Client Activated Objects Tracking  Implement ITrackingHandler  DisconnectedObject ()  MarshaledObject ()  UnmarshaledObject ()  RegisterTrackingHandler( ITrackingHandler)

Demo 3  Client Activated Objects  Lease  State

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Configuration File Configuration  XML  Easy To Read  Easy To Modify  Simple To Code  No Need to Recompile

Configuration File Format

Configuration File - Well-known Objects <wellknown type=“Namespace.Class, Assembly” objectUri=“Data” mode=“Singleton” />

Configuration File - Client Activiated Objects

Configuration RemotingConfiguration Class  Configure(“configuration file”)  Method works for server and client configuration

Configuration Programmatic Configuration  Hide Property Information  Required Recompile  Dynamic  Easy To Deploy

Configuration Programmatic Configuration  Create Channel  Register Channel  Create Remote Object  Register Object with Remoting Configuration

Configuration Programmatic Configuration - Server ChannelServices.RegisterChannel(new HttpChannel(8080)); RemotingConfiguration. ApplicationName = "Data"; RemotingConfiguration. RegisterWellKnownServiceType( typeof(RemoteObject.DataAccess), "Data", WellKnownObjectMode.SingleCall);

Configuration Programmatic Configuration - Client ChannelServices.RegisterChannel(new TcpServerChannel( 6789 ) ); ActivatedServiceTypeEntry obj = new ActivatedServiceTypeEntry( "RemoteObject.DataAccess", "RemoteObject"); RemotingConfiguration. RegisterActivatedServiceType( obj );

Demo 4  Programmatic Configuration

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Hosting  Application  Console  Windows  Start and Stop by hand  Can display or control information  IIS  Windows Service

Demo 5  Hosting in IIS  Hosting in a Service

Agenda  Architecture and Terminology  Web Services/DCOM Comparison  Server Activated Objects (SAO)  Client Activated Objects (CAO)  Configuration  Hosting  Futures

Other Cool Remoting Tricks  Raise an event on the server  Handle it in a client  Pass a parameter to the handler by reference  Get a response from the client that the event was handled  Publish-subscribe: server does not managed list of clients

Web Services vs. Remoting  Web Services  XML (SOAP) interfaces to binary objects  Text-based; ideal for HTTP etc.  Standardized messaging protocol  Lightweight, easily deployable and accessible .NET Remoting  Binary proxy - stub model  Still SOAP 1.1 compatible  High performance  Binary streams, still configurable over HTTP channel  Proprietary .NET required at both ends for straightforward use

The (not so distant) future! Indigo

Secure, Reliable, Transacted Visual Studio.NET class HelloService { [WebMethod] public String Hello(String Greeting) { X509CertificateCollection collection = new X509CertificateCollection(); IntPtr blob = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CRYPTOAPI_BL OB))); IntPtr data = (IntPtr)((int)blob + Marshal.SizeOf(typeof(CRYPTOAPI_BLOB))); … SeqAckRange range = new SeqAcknRange(id, low, high ); SeqAckRange[] ranges = { range }; ReliableQueue.ProcessAcks( ranges ); … hr = pITxDispenser->BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } 20,379 lines for security 5,988 lines for reliable messaging 25,507 lines for transactions Total count: 56,296 4,442 lines for infrastructure

class HelloService { [WebMethod] public String Hello(String Greeting) { foreach ( SecurityToken tok in requestContext.Security.Tokens { X509SecurityToken token = tok as X509SecurityToken } … SeqAckRange range = new SeqAcknRange(id, low, high ); SeqAckRange[] ranges = { range }; ReliableQueue.ProcessAcks( ranges ); … hr = pITxDispenser->BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } Secure, Reliable, Transacted Web Service Enhancements 10 lines of security code 1,804 lines of reliable messaging code 25,507 lines of transaction code Total count: 27,321

[Confidentiality] [Reliability(Guarantees.ExactlyOnce | Guarantees.InOrder)] [Service] class HelloService { [TransactionCoupling( TransactionCouplingOptions.Required)] [ServiceMethod] String Hello(String Greeting) { return Greeting; } Secure, Reliable, Transacted Indigo 1 line of security code 1 line of reliable messaging code 1 line of transaction code Total count: 3

  Advanced web services   Secure, reliable, transacted   Heterogeneous interoperability   Powerful messaging capabilities   Programming model extends existing capabilities   Simplifies building services   Advanced web services   Secure, reliable, transacted   Heterogeneous interoperability   Powerful messaging capabilities   Programming model extends existing capabilities   Simplifies building services Windows Communication Code Named “Indigo” Network Class Library Internet Connection Firewall Demand Activation and Process Health - IIS PNRP Native WiFi TCP Listener SIP UDP Listener IPC Listener Network Services CLR Serialization Kernel Mode Framework Protocols Filter Engine TCP, UDP IPV4, IPV6 QOS IPSEC HTTP Listener IO Manager Device and File System Drivers … … … … Connector Communications Manager (Port) Transport Channels (IPC, HTTP, TCP…) Transport Channels (IPC, HTTP, TCP…) Channels (Datagram, Reliable, Peer, …) Policy Engine Message Encoder Channel Security Hosting Environments ASP.NET.container.exe NT Service DllHost Router Topic … … Transactions Federation … … Service Model Instance Manager Context Manager Type Integration Service Methods Declarative Behaviors Transacted Methods Queue Identity and Security System Identity and Security System Transactions Messaging Services System Services