41
May 2, 2006 Shawn Mulkey - EECS 816 1 Distributed Computing & Object Oriented Middleware: Part 2 Presented By Shawn Mulkey

May 2, 2006Shawn Mulkey - EECS 816 1 Distributed Computing & Object Oriented Middleware: Part 2 Presented By Shawn Mulkey

Embed Size (px)

Citation preview

May 2, 2006 Shawn Mulkey - EECS 816 1

Distributed Computing & Object Oriented Middleware: Part 2

Presented By

Shawn Mulkey

Shawn Mulkey - EECS 816 2May 2, 2006

Agenda

Microsoft .Net Web Services Grid Computing Conclusion

Shawn Mulkey - EECS 816 3May 2, 2006

Agenda

Microsoft .Net IntroductionRemotingWindows Communication Foundation

Web Services Grid Computing Conclusion

Shawn Mulkey - EECS 816 4May 2, 2006

.Net Basics

Microsoft Development Platform Creates Interpreted Code

MSILMany Languages SupportedC#, VB.Net are Primary

Platform & Tool SupportDeploymentSecurity

Shawn Mulkey - EECS 816 5May 2, 2006

Foundation Class Libraries

Built-In Functionality For .Net Available to All .Net Languages Basic to Advanced Features

String ManipulationGraphicsNetworkingThreading

Encapsulated functionality for common tasks

Shawn Mulkey - EECS 816 6May 2, 2006

Attributes Meta-Data Added To .Net Constructs

Assemblies, Classes, Members Provide Externally Parsed Information

IDE PropertiesSecurity AssertionsWeb Services Interactions

Example://Method Level Attribute[FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted=true)]void WriteDataToFile(string data) { … }

Shawn Mulkey - EECS 816 7May 2, 2006

.Net Remoting Built in system for object based RPC

Fundamentally similar to Java RMI Requires homogenous environment

Specifically designed for inter-process as well as intra-system use

Similar to predecessor Microsoft DCOM .Net Remoting uses standardized transports

Shawn Mulkey - EECS 816 8May 2, 2006

.Net Remoting Features Seamless LPC semantics

‘Proxy’ term instead of stub

Interchangeable ProtocolsTransportData Representation

Copy by value or referenceAutomatic or Declarative

Shawn Mulkey - EECS 816 9May 2, 2006

Basic .Net Remoting Architecture

© Microsoft, 2006

Shawn Mulkey - EECS 816 10May 2, 2006

.Net Remoting Channels Bundled configuration for RPC Transport

IChannel interface can represent any transportTcpChannel and HttpChannel are commonly

used implementations

Channels declaratively configured with .Net configuration system

Shawn Mulkey - EECS 816 11May 2, 2006

Remoting Channel Architecture

© Microsoft, 2006

Shawn Mulkey - EECS 816 12May 2, 2006

.Net Remoting Code Sample

public class SampleObject : MarshalByRefObject { public SampleObject() { }

public string HelloWorld() { return "Hello World!"; }}

Object Declaration

Shawn Mulkey - EECS 816 13May 2, 2006

public class SampleServer {

public void Start()

{

// Create an instance of a channel

TcpChannel channel = new TcpChannel(8080);

ChannelServices.RegisterChannel(channel);

// Register as an available service with the name HelloWorld

RemotingConfiguration.RegisterWellKnownServiceType(

typeof(SampleObject),

"HelloWorld",

WellKnownObjectMode.SingleCall );

}

……

}

Server Code

Shawn Mulkey - EECS 816 14May 2, 2006

public class SampleClient{ public void DoSomething() { // Create a channel for communicating w/ the remote object // Notice no port is specified on the client TcpChannel chan = new TcpChannel(); ChannelServices.RegisterChannel(chan);

// Create an instance of the remote object SampleObject obj = (SampleObject) Activator.GetObject( typeof(RemotingExample.SampleObject), "tcp://localhost:8080/HelloWorld" );

Console.WriteLine(obj.HelloWorld()); } ….}

Client Code

Shawn Mulkey - EECS 816 15May 2, 2006

Windows Communication Foundation

Platform for distributed computing integration Formerly known as ‘Indigo’ Presents abstract framework for program interaction

Unifies previous Microsoft distributed APIs DCOM Microsoft Message Queues Web services .Net Remoting

Shawn Mulkey - EECS 816 16May 2, 2006

Windows Communication Foundation

Every system partitioned into ‘services’ Similar to original CORBA metaphor Directly supports Service Oriented Architecture (SOA)

Unified feature set and programming model Example: Message oriented communication with

transactional guarantees

Leverages .Net platform extensibility features Declarative run-time attributes Configuration

Shawn Mulkey - EECS 816 17May 2, 2006

WCF Basics

Three important service attributes Address Binding Contract

Service Contract Decorated with attributes to denote meta-functionality

Data Contract Explicitly declares structure and members to be exposed

Shawn Mulkey - EECS 816 18May 2, 2006

WCF Contract Examples

using System.ServiceModel;

[ServiceContract]public interface ICalculate{ [OperationContract] double Add( double a, double b); [OperationContract] double Subtract( double a, double b);}

using System.ServiceModel;

[DataContract]public class Person{ [DataMember] public int Id; [DataMember] public string FirstName; [DataMember] public string LastName;}

Service Contract Data Contract

Shawn Mulkey - EECS 816 19May 2, 2006

WCF Architecture

© Microsoft, 2006

Shawn Mulkey - EECS 816 20May 2, 2006

WCF Architecture

© Microsoft, 2006

Shawn Mulkey - EECS 816 21May 2, 2006

Microsoft’s WFC Strategy Offers interoperability with other platforms

Web servicesExtensible transport interfaces

Locks developers into unified .Net framework

Similar strategy to Sun’s J2EE

Shawn Mulkey - EECS 816 22May 2, 2006

Agenda

Microsoft .Net Web Services

IntroductionArchitectureApplications

Grid Computing Conclusion

Shawn Mulkey - EECS 816 23May 2, 2006

Web Services Introduction

Web Service Definition:

A distributed computing system in which standardized network protocols are used to connect clients with services capable of providing data in a common textual format.

Shawn Mulkey - EECS 816 24May 2, 2006

Web Services Introduction

Common Practical Definition:

A distributed computing system in which web-based network protocols such as HTTP are used to connect clients with services providing XML based data via the SOAP messaging standard.

Shawn Mulkey - EECS 816 25May 2, 2006

Web Services Application Stack

HTTP Client Custom code or generated middleware Leverages HTTP error semantics TCP underlying socket transport

SOAP messages Simple Object Access Protocols XML based messaging standard Wraps data in common envelope

Shawn Mulkey - EECS 816 26May 2, 2006

Web Services Application Stack XML Data Encoding

Textual formatHierarchical organizationStandardized type encoding

Benefits and challenges of XMLExtremely interoperableProcessing intensive

Shawn Mulkey - EECS 816 27May 2, 2006

Simple Object Access Protocol

Header Block

SOAP Envelope

Header 1

…..

Header N

Message Body

Data Block 3

Data Block 1

Data Block 2

Application level message packet

Brackets message content

Provides header inclusion Contextual information Standardized behavior

Contains versioning information

Shawn Mulkey - EECS 816 28May 2, 2006

Web Services Data Encoding

Structured XML text Simple to parse Expensive in time and space

Standardized types Simple types in W3C DTD Complex types in WS-* standards

Lingua Franca in enterprise computing

Shawn Mulkey - EECS 816 29May 2, 2006

Web Services Middleware

Many development platforms .Net J2EE Allows interaction using familiar language constructs

Web Services Description Language Standardized way to represent web service Similar to CORBA IDL Used to generate stubs and skeletons

Shawn Mulkey - EECS 816 30May 2, 2006

Demonstration Interlude

Shawn Mulkey - EECS 816 31May 2, 2006

Web Services Extensions

New standards for specialized functions

WS-Trust

WS-Transactions

WS-Notification See Mulkey, 2006

Shawn Mulkey - EECS 816 32May 2, 2006

Web Services Evolution Popular means to connect enterprise systems

Legacy databases Web-centric applications

Extensibility provides for standardization Header types Data types Meta-data

Competing visions going forward

Shawn Mulkey - EECS 816 33May 2, 2006

Agenda

Microsoft .Net Web Services Grid Computing

IntroductionExamples

Conclusion

Shawn Mulkey - EECS 816 34May 2, 2006

Grid Computing Introduction

Grid Computing Definition:

A virtualization of computing resources which abstract a network of interoperating nodes into a single computer system.

Shawn Mulkey - EECS 816 35May 2, 2006

Grid Computing Concept

Grid Interface

Shawn Mulkey - EECS 816 36May 2, 2006

Grid Computing Highlights Designed for heterogeneous computing

environments

Standards based Web Services specs used extensively

Exploits underutilized resources Uses idle cycles Job load balancing

Shawn Mulkey - EECS 816 37May 2, 2006

Grid Computing Applications Must access grid framework

Two or more non-client machines Non-trivial administration Fast network

Application must run in grid environment Remote job Parallel partition and processing

Local overhead must be significantly more than grid overhead Long jobs Complex parallel jobs

Shawn Mulkey - EECS 816 38May 2, 2006

Grid Frameworks Globus Framework

http://www.globus.org/ Sponsored by IBM & others Popular in research

Sun Grid Engine (N1) http://www.sun.com/software/grid/ Built into operating system Strong commercial backing

Shawn Mulkey - EECS 816 39May 2, 2006

Conclusion Microsoft’s distributed computing

.Net Remoting Web Services Window Communication Foundation

Web Services Open standards based

HTTP, SOAP, XML Highly interoperable Wide middleware tool support

Shawn Mulkey - EECS 816 40May 2, 2006

Conclusion

Grid ComputingComputer resource virtualizationDynamic use of idle hardwareStandards based

Shawn Mulkey - EECS 816 41May 2, 2006

The End

Distributed Computing & Object Oriented Middleware

Presented By

Shawn Mulkey