360 likes | 426 Views
An overview of the MS.NET Grid Project integrating e-Science applications with OGSI on Microsoft .NET platform. Explore project goals, parties involved, implementations, and design dimensions. Enhance your knowledge on Grid Service development.
E N D
e-Science, the Grid and Microsoft .NETDaragh Byrne, Neil Chue Hong, Ally Hume, Mike JacksonEPCC – University of Edinburghhttp://www.epcc.ed.ac.uk/~ogsanetogsanet-queries@epcc.ed.ac.ukGlobusWorld 2004, San Francisco – January 20th-23rd 2004Microsoft is a trademark of Microsoft Corporation.
Overview • The MS.NETGrid Project • OGSI on Microsoft .NET – MS.NETGrid-OGSI • Grid Service Demonstrators • Training Courses
OGSA-DAI e-Science Application e-Science Application OGSI and Microsoft .NET Course … … … … … OGSI and Microsoft .NET Course … … … … … OGSI and Microsoft .NET Course … … … … … OGSI and Microsoft .NET Course … … … … … Project Goals OGSI Microsoft .NET
Project Parties • EPCC – University of Edinburgh: • Project management • Design, development and implementation • Authoring training materials • Delivering training courses • e-Science Grid Core Program: • UK Department of Trade and Industry • Funding Grid research and development projects • Microsoft Research Limited (Cambridge): • Technical consultancy and expertise • Provision of training materials • NeSC – UK National e-Science Centre: • Production and negotiation of collaboration agreement • Hosting training courses
OGSI Implementations • Microsoft .NET: • University of Virginia: OGSI.NET Release 2.0 • Java: • Globus: Globus Toolkit 3 Release 1.0 • Unicore • Perl: • University of Manchester: OGSI::Lite • Python: • Lawrence Berkley National Labs: pyGlobus
So Why Yet Another? • Facilitate uptake of OGSI: • Implementations on different platforms • Go to our target users • Do not expect them to come to us • Research: • Exploit unused features and functionality of Microsoft .NET • Exploit used features and functionality in a different way • Competition
Microsoft .NET In One (Just in case…) • Develop stand-alone or Internet-enabled applications: • Microsoft Intermediate Language (MSIL) – platform-independent • Compilers for C#, C++, Visual Basic … • Common Language Runtime (CLR) –MSILexecution • Distributed computing – ASP.NET, remote method invocation, XML • Internet Information Services – Web application hosting: • Active Server Pages • SOAP / WSDL-based Web services • ASP.NET: • Active Server Pages and Web service development • Mapping SOAP request/response onto C# method call/return • Tooling to generate client-side stub code from WSDL • Automated generation of WSDL descriptions of services
MS.NETGrid-OGSI Design Dimensions • Use IIS and ASP.NET: • Industry-standard Web services programming model • Maintain integration with existing technology • Facilitate speed of development • Exploit existing knowledge of developers • Utilise .NET class library: • Rich framework for XML programming, serialization etc. • Use an object instance to represent a service instance: • Creating service object and loading state every request is too costly: • Performance-wise • Development time-wise • Provide a “representative implementation” of the core aspects of OGSI
MS.NETGrid-OGSI • Architecture based upon GT3-Core • Exploits ASP.NET functionality • Provides support for: • Grid service hosting in ASP.NET Web services container • Functionality relating to: • GridService • Factory • NotificationSource, NotificationSubscription, NotificationSink • Service data management • Management of persistent and transient services
8. C# method return C# Implementation 1. C# method call 7. SOAP response 2. SOAP request 6. Operation Return 4. Grid Service Object Reference 3. Grid Service ID 5. Operation Call C# Implementation Client-Service Interaction Client Proxy (from WSDL) HTTP ASP.NET Web Service Proxy (.asmx) OGSI Container Grid Service Grid Service Grid Service
Service Access and Naming • Persistent services: • Server-managed services • Necessary for factories, permanent services • Naming: • http://host/ogsa/services/persistent/SomeServiceFactory.asmx • Transient services: • Client-managed services • Naming: • http://host/ogsa/services/transient/SomeService.asmx?instanceID=someService1
Web Service Proxy Model • Service proxy is standard ASP.NET Web service: • Created => processes request => dies • Communications layer between client and Grid services: • One proxy type (.asmx) corresponds to one or more Grid services • One instance of a proxy created per service request to .asmx file • GSH is used by proxy to find Grid service object • Reflection allows invocation of a service method on that object • SOAP communication and WSDL description for free • Familiar model to ASP.NET users • Potential for auto-generation of proxy code from WSDL
Grid Service Components SomeGridService.asmx compiled into SomeGridServiceProxy delegates to Service Implementation SomeGridServiceImpl ServiceDataSet SomePortTypeProvider SomeOtherPortTypeProvider
Grid Service Design • What services will your Grid service provide? • What operations will it support? • How are these operations aggregated into portTypes? • What existing and new portTypes will your service implement? • No need to write WSDL!
Implement the Service • Analogous development models to those of GT3 / OGSI.NET: • Extend a class implementing the GridService portType with additional operations from other portTypes • Provide classes implementing the operations of a specific portType – PortType Providers • GridServiceSkeleton and PersistentGridServiceSkeleton classes: • Implement the GridService portType • Contain a service data set • Record a list of other service properties • ServiceData APIs • Notification APIs
Implement the Service – Inheritance public class HelloServiceImpl : PersistentGridServiceSkeleton { int i = 0; // sayHello is an operation of a HelloWorld // portType public string sayHello(string name) { return “Hello, “ + name + “ “ + (++i); } }
Implement the Service - PortType Providers (1) public class HelloWorldPt : PortTypeProviderBase { int i = 0;public string sayHello(string name){ return “Hello, “ + name + “ “ + (++i);} public override void Initialise() { } } // Declare service and attach portType using attribute [OgsiPortType(typeof(HelloWorldPt), “http://www.example.org/hello”, “HelloWorld”] public class HelloServiceImpl : PersistentGridServiceSkeleton { }
Implement the Service - PortType Providers (2) • ASP.NET attributes and reflection: • OGSI.NET exploits this technology also and in a similar way • On instantiation of GridServiceSkeleton: • Object reflects upon self to get OgsiPortType attributes • Uses the information in the attributes to instantiate implementation classes • These are stored – indexed by portType name • IPortTypeProvider interface: • Can be implemented by any PortType Provider class • Provides methods for initialisation and setting a reference to the main service class • PortTypeProviderBase class: • Implements IPortTypeProvider interface
Implement the Service Proxy • Communications layer between clients and Grid service objects • Proxies are Web services • Represents the most-derived portType: • Provides methods corresponding to all the operations of all the portTypes implemented by a service • GridServiceInstanceAspProxy and PersistentGridServiceInstanceAspProxy: • Corresponding to GridServiceSkeleton and PersistentGridServiceSkeleton classes respectively
Implement the Service Proxy - Inheritance // HelloService.cspublic class HelloService : PersistentGridServiceInstanceAspProxy{[WebMethod] // Any other ASP.NET attributes public string SayHello(string name) { object [] args = { name }; return (string) CallMethod(“SayHello”, args); }}
Implement the Service Proxy - PortType Providers // HelloService.cspublic class HelloService : PersistentGridServiceInstanceAspProxy {[WebMethod] // Any other ASP.NET attributes public string SayHello(string name) { object [] args = { name }; return (string) CallMethodOnProvider(“HelloWorldPt”, “SayHello”, args); } }
Implement the Service Proxy - Complete the Proxy • Write .asmx file which references the proxy class <%@ WebService Class=“HelloService"%>
Deploy the Service (1) • Approach is analogous to GT3 and AXIS/Tomcat • ASP.NET Web.config file – analogous to server-config.wsdd file <gridContainer> . . . <gridServiceDeploymentDescriptor asmxFileName=“HelloService.asmx” serviceClass=“HelloServiceImpl” assembly=“HelloAssembly” persistence=“persistent”> <serviceParameter name=“dbConnect” value=“someDB:location”/> <serviceParameter name=“key” value=“value”/> </gridServiceDeploymentDescriptor> <gridContainer>
Deploy the Service (2) • Copy assemblies to Ogsi.Container/bin/ • Copy .asmx file to: • Ogsi.Container/services/persistent/ • OR • Ogsi.Container/services/transient/ • IIS maps http://host/ogsa/ virtual directory to Ogsi.Container • http://host/ogsa/services/transient/HelloWorld.asmx • => • Ogsi.Container/services/transient/HelloWorld.asmx
Design Limitations • No rich client-side support: • No Grid service-specific support • But Grid services ARE Web services • GSH naming is restrictive • No support for GSR • No support for GWSDL • No ServiceGroup-related portTypes • No HandleResolver portType • No security support
Grid Service Demonstrators • Basic GridService: • Implements GridService portType • Persistent and transient services available, with factory • Counter Service: • A simple transient counter service which maintains state • An associated persistent factory service • A client with a graphical user-interface
SQL Server ADO.NET OGSA-DAI Grid Data Service Client • Open Grid Services Architecture – Data Access and Integration • http://www.ogsadai.org.uk • Stripped down from full OGSA-DAI functionality Response (GDS-Response document) (WebRowSet) Request (GDS-Perform document) Grid Data Service
Training Courses • “OGSI on Microsoft .NET” • Designed for UK e-Scientists • Four courses each for 25 attendees: • September 9th-10th 2003 - Edinburgh • November 4th-5th 2003 - Edinburgh • January 14th-15th 2004 - London • February 24th-25th 2004 - Edinburgh • UK e-Science Institute: • http://www.nesc.ac.uk/esi
Course Goals • Introduce / review: • Grid services, OGSA and OGSI • Microsoft .NET • Introduce OGSI on Microsoft .NET: • MS.NETGrid-OGSI • Use MS.NETGrid-OGSI to: • Develop Grid services • Develop clients
Course Experiences • Attendees from UK involved in Grid research, astronomy, particle physics, chemistry, informatics • Majority stated worthwhile attending • Likes: • Practical hands-on use of MS.NETGrid-OGSI was especially popular • Concise introduction lectures and a .NET overview • MS.NETGrid-OGSI was reasonably straightforward to use • Dislikes: • Not enough diagrams and too much detail in text • Not enough time spent on MS.NETGrid-OGSI itself • Majority stated intent to use MS.NETGrid-OGSI for applications including: • Particle physics, inter-operability testing, benchmarking, .NET familiarisation