May 2, 2006Shawn Mulkey - EECS Distributed Computing & Object Oriented Middleware: Part 2 Presented By Shawn Mulkey
Shawn Mulkey - EECS 8162 May 2, 2006 Agenda Microsoft.Net Web Services Grid Computing Conclusion
Shawn Mulkey - EECS 8163 May 2, 2006 Agenda Microsoft.Net Introduction Remoting Windows Communication Foundation Web Services Grid Computing Conclusion
Shawn Mulkey - EECS 8164 May 2, 2006.Net Basics Microsoft Development Platform Creates Interpreted Code MSIL Many Languages Supported C#, VB.Net are Primary Platform & Tool Support Deployment Security
Shawn Mulkey - EECS 8165 May 2, 2006 Foundation Class Libraries Built-In Functionality For.Net Available to All.Net Languages Basic to Advanced Features String Manipulation Graphics Networking Threading Encapsulated functionality for common tasks
Shawn Mulkey - EECS 8166 May 2, 2006 Attributes Meta-Data Added To.Net Constructs Assemblies, Classes, Members Provide Externally Parsed Information IDE Properties Security Assertions Web Services Interactions Example: //Method Level Attribute [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted=true)] void WriteDataToFile(string data) { … }
Shawn Mulkey - EECS 8167 May 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 8168 May 2, 2006.Net Remoting Features Seamless LPC semantics ‘Proxy’ term instead of stub Interchangeable Protocols Transport Data Representation Copy by value or reference Automatic or Declarative
Shawn Mulkey - EECS 8169 May 2, 2006 Basic.Net Remoting Architecture © Microsoft, 2006
Shawn Mulkey - EECS May 2, 2006.Net Remoting Channels Bundled configuration for RPC Transport IChannel interface can represent any transport TcpChannel and HttpChannel are commonly used implementations Channels declaratively configured with.Net configuration system
Shawn Mulkey - EECS May 2, 2006 Remoting Channel Architecture © Microsoft, 2006
Shawn Mulkey - EECS May 2, 2006.Net Remoting Code Sample public class SampleObject : MarshalByRefObject { public SampleObject() { } public string HelloWorld() { return "Hello World!"; } Object Declaration
Shawn Mulkey - EECS May 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 May 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 May 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 May 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 May 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 May 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 ContractData Contract
Shawn Mulkey - EECS May 2, 2006 WCF Architecture © Microsoft, 2006
Shawn Mulkey - EECS May 2, 2006 WCF Architecture © Microsoft, 2006
Shawn Mulkey - EECS May 2, 2006 Microsoft’s WFC Strategy Offers interoperability with other platforms Web services Extensible transport interfaces Locks developers into unified.Net framework Similar strategy to Sun’s J2EE
Shawn Mulkey - EECS May 2, 2006 Agenda Microsoft.Net Web Services Introduction Architecture Applications Grid Computing Conclusion
Shawn Mulkey - EECS May 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 May 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 May 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 May 2, 2006 Web Services Application Stack XML Data Encoding Textual format Hierarchical organization Standardized type encoding Benefits and challenges of XML Extremely interoperable Processing intensive
Shawn Mulkey - EECS May 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 May 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 May 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 May 2, 2006 Demonstration Interlude
Shawn Mulkey - EECS May 2, 2006 Web Services Extensions New standards for specialized functions WS-Trust WS-Transactions WS-Notification See Mulkey, 2006
Shawn Mulkey - EECS May 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 May 2, 2006 Agenda Microsoft.Net Web Services Grid Computing Introduction Examples Conclusion
Shawn Mulkey - EECS May 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 May 2, 2006 Grid Computing Concept Grid Interface
Shawn Mulkey - EECS May 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 May 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 May 2, 2006 Grid Frameworks Globus Framework Sponsored by IBM & others Popular in research Sun Grid Engine (N1) Built into operating system Strong commercial backing
Shawn Mulkey - EECS May 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 May 2, 2006 Conclusion Grid Computing Computer resource virtualization Dynamic use of idle hardware Standards based
Shawn Mulkey - EECS May 2, 2006 The End Distributed Computing & Object Oriented Middleware Presented By Shawn Mulkey