Chapter 15 Remoting Yingcai Xiao. ASP.NET is for building traditional thin- client applications (Web applications). Such applications rely on browsers.

Slides:



Advertisements
Similar presentations
웹 서비스 개요.
Advertisements

Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
Overview Environment for Internet database connectivity
Web Service Architecture
Siebel Web Services Siebel Web Services March, From
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
WEB SERVICES DAVIDE ZERBINO.
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.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Henrico Dolfing Business Segment Partners. Océ Document Technologies GmbH2 June, NET Framework Version 3.0.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
1 Advanced Programming Topics - II Objectives:  Background  Remoting  Types of remoting  Marshalling  Farmatters  Channels.
Distributed Systems Tutorial 2 -.NET Remoting. 2 What is Remoting?  Remoting allows you to pass objects or values across servers in different domains.
Web Service What exactly are Web Services? To put it quite simply, they are yet another distributed computing technology (like CORBA, RMI, EJB, etc.).
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
INTRODUCTION TO WEB DATABASE PROGRAMMING
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel.
.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.
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
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 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
International Telecommunication Union Geneva, 9(pm)-10 February 2009 ITU-T Security Standardization on Mobile Web Services Lee, Jae Seung Special Fellow,
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
Lecture 15 Introduction to Web Services Web Service Applications.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
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.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
Kemal Baykal Rasim Ismayilov
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
C# 1 Web services CSC 298. C# 2 Web services  A technology to make libraries available across the internet.  In Visual Studio,  can create a web service.
Introduction to Web Services. Agenda Motivation History Web service model Web service components A walkthrough examples.
1 G52IWS: Web Services Chris Greenhalgh. 2 Contents The World Wide Web Web Services example scenario Motivations Basic Operational Model Supporting standards.
Chapter 14 Advanced Architectural Styles. Objectives Describe the characteristics of a distributed system Explain how middleware supports distributed.
Web Services An Introduction Copyright © Curt Hill.
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.
Introduction to.NET FX 3.0 (+ sneak preview of.NET FX 3.5) Martin Parry Developer & Platform Group Microsoft Ltd
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
C# &.NET Review. ConceptsDescriptionReference Computer Science The science of data processing WP Overview ProgrammingData Structures & Algorithms WP Overview.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
Service Oriented Architecture (SOA) Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
.NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
Unit – 5 JAVA Web Services
Presentation 23 .NET Remoting Introduced
Introduction to Web Services and SOA
.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel
Component--based development
Distributed System using Web Services
Introduction to Web Services and SOA
Jim Fawcett CSE791 – Distributed Objects Spring 2002
WCF Data Services and Silverlight
Presentation transcript:

Chapter 15 Remoting Yingcai Xiao

ASP.NET is for building traditional thin- client applications (Web applications). Such applications rely on browsers to display HTML generated on servers. Benefits: 1.shorter development cycles 2.more scalable 3.more maintainable 4.more robust. ASP.NET

XML Web Services Proxy of Interface 2 Client 2 Application 1 UDDI Registry 1 WSDL Interface 1 UDDI Registry 2 Application 2WSDL Interface 2 SOAP WEB Proxy of Interface 1 Client 1 WS Class, Contract, Registry, Proxy. XML/HTML: inefficient communication, limited representation power.

Remoting is for closely coupled applications with a tighter coupling of client and server. Such applications have their own client programs and don’t depend on browsers to communicate with the servers. They are “rich-client” applications and distributed applications. Better suited for two-way communication between clients and servers than are conventional Web applications. Closely coupled applications utilize network bandwidth more efficiently because they can use lean binary protocols in lieu of HTTP. “Rich-clients” can use Windows forms to better overcome the limitations of HTML. Close coupling facilitates stateful connections between clients and servers, which in turn simplifies the task of building stateful applications.. Remoting

Closely coupled applications building tools: –DCOM (Distributed Component Object Model), –CORBA (Common Object Request Broker Architecture), –Java RMI (Remote Method Invocation)..NET Remoting: System.Runtime.Remoting is for building closely coupled rich-client applications without the hassles that come with COM programming—apartments, IDL (Interface Definition Language), reference counting, lack of exception handling, incompatible languages and data types, and so on..NET remoting is a better COM than COM.. Remoting

Basics  Remoting begins with the class or classes you want to remote.  A remotable class can be used by clients in other application domains, which can mean other application domains in the client’s process, application domains in other processes, or application domains on other machines.  To write a remotable class, all you have to do is derive from System.MarshalByRefObject.  Both client and server are applications in their own domains.

Basics  When a client creates a remote instance of RemotableClass, the.NET Framework creates a proxy in the client’s application domain.  The proxy looks and feels like the real object. Calls received by the proxy, however, are transmitted to the remote object through a channel connecting the two application domains.  We say that an object served by a proxy has been marshaled by reference because the object isn’t copied to the client’s application domain; the client merely holds a reference to the object. That reference is the proxy.  A remote object needs a server process register the remotable class so that it can be activated from another application domain.

Remoting Architecture

Example A simple remote class. ClockServer.cs using System; public class Clock : MarshalByRefObject { public string GetCurrentTime () { return DateTime.Now.ToLongTimeString (); }

Communication  Client and server communicate usually through a TCP channel.  Each TCP channel is identified by an IP address and a port number. winserv1.cs.uakron.edu:1234  Each open channel needs to be registered on the server to accept port calls.  Binding also needs to be registered to specify which program to on the server handles the calls.  Binary communication, more efficient than HTTP.  The communicate channel can be HTTP too.  The other possible type of channel is named pipes.

Example A simple remoting server: TimeServer.cs using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; class MyApp { static void Main () { //Create and register a channel TcpServerChannel channel = new TcpServerChannel (1234); ChannelServices.RegisterChannel (channel);

Example //Set the “Clock” class to be used remotely RemotingConfiguration.RegisterWellKnownServiceType (typeof (Clock), "Clock", WellKnownObjectMode.SingleCall); Console.WriteLine ("Press Enter to terminate..."); Console.ReadLine (); }

Example A simple client: TimeClient.cs using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; class MyApp { static void Main () { //Create a channel to connect to the server TcpClientChannel channel = new TcpClientChannel (); ChannelServices.RegisterChannel (channel);

Example //Get the “Clock” class to be used. RemotingConfiguration.RegisterWellKnownClientType (typeof (Clock), "tcp:/winserv1.cs.uakron.edu:1234/Clock"); //Create and use a “Clock” object as if it was local. Clock clock = new Clock (); Console.WriteLine (clock.GetCurrentTime ()); }

Example Build and run the example. csc /t:library clockserver.cs csc /r:clockserver.dll timeserver.cs csc /r:clockserver.dll timeclient.cs Start TimeServer first (in a console window) Run TimeClient (in another console window).

.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel

Windows Communication Foundation (WCF)

WCF: Windows Communication Foundation For distributed applications. Using service oriented architecture (SOA). Clients can consume multiple services; Services can be consumed by multiple clients. (M:M) Services have WSDL interface. WCF examples: WSS (Web Services Security, extension to SOAP to apply security to web services), WS-Discovery (Web Services Dynamic Discovery, a multicast discovery protocol to locate services),

WCF: Windows Communication Foundation Endpoints: client connects to a WCF service at an Endpoint, each service exposes its contract via endpoints. End point ABC: address, binding, contract WCF endpoints use SOAP envelope to communicate with clients (for platform independence). Behaviors allow the developer to customize how the messages are handled.

Windows Presentation Foundation (WPF)

WCF: Windows Presentation Foundation Graphical subsystem. Based on DirectX 2D and 3D graphics, vector graphics and animation Remote or standalone Safe remote view with IE. Uses XAML to define UI elements. XAML: eXtensible Application Markup Language

Windows Workflow Foundation (WF)

WF: Windows Workflow Foundation Workflow: a series of distinct programming steps. An activity at each step. Workflow Designer in Visual Studio. Workflow engine: scheduling, managing, tracking workflows. To create applications that execute an ordered business process (UA curriculum proposal approval system).

Windows CardSpace

Identification metasystem. Resistance to phishing attacks Follow the “7 laws of identity” (User Control and Consent, Minimal Disclosure for a Constrained Use, Justifiable Parties, Directed Identity, Pluralism of Operators and Technologies, Human Integration, Consistent Experience Across Contexts) To be replaced by U-Prove.

LINQ Language Integrated Query

Embedded SQL in C# as strings StringBuilder builder = new StringBuilder (); builder.Append ("select count(*) from users " + "where username = \'"); builder.Append (username); builder.Append ("\' and pwd = \'"); builder.Append (password); builder.Append ("\';"); MySqlCommand command = new MySqlCommand (builder.ToString (), connection); Int64 count = (Int64) command.ExecuteScalar ();

LINQ: Language Integrated Query var results = from c in SomeCollection where c.SomeProperty < 10 select new {c.SomeProperty}; foreach (var result in results) Console.WriteLine(result);

Task Parallel

Parallel Extensions Managed concurrency library TPL: Task Parallel Library PLINQ: Parallel LINQ Multithreading based. Take advantages of muti-core (Intel) and many core (Nvidia GPU)

That’s all. Folks.