Download presentation
Presentation is loading. Please wait.
1
Presented By: Fernando Trigoso
WSRF.NET Presented By: Fernando Trigoso Based On: Architectural Foundations of WSRF.NET by M. Humphrey and G. Wason
2
Outline WSRF.NET Architecture Attribute-based programming
Compatibility with GT4 WSRF Issues 8/9/2006
3
Background WSRF WS-Notification WS-Resource WS-ResourceProperties
WS-ResourceLifetime WS-Notification T h e fo u r W S R F s p e c ific a tio n s d e fin e h o w to re p re s e n t, a c c e s s , m a n a g e , a n d g ro u p W S -R e s o u rc e s WS-Resource: composition of a Web Service and a stateful resource. WSRF and WS-Notifications go hand by hand, if you implement one, you will need the other to make any implementation non-trivial. 8/9/2006
4
WSRF.NET Open source implementation of WSRF and WS-Notification
Implements full set of specifications Useful to evaluate the WSRF approach To make programming WSRF.NET services as easy as programming Web Services WSRF.NET is an implementation of the WSRF specifications and WS- Notification on the Microsoft .NET platform. Useful to evaluate the WSRF approach, more implementations will help us improve our current proposed standards. To make programming WSRF.NET services as easy as programming Web Services through the use of tools and libraries. 8/9/2006
5
WSRF.NET Architecture Internet Information Services (IIS)
IIS: Internet Information Services, provides a set of services through the web, it acts as a web server. Tightly integrated with the OS. Second to Apache. ISAPI Filter: Internet Server API, in ASP.NET is a filter of web requests, in our case, web services requests, which are then passed to ASP.NET. Internet Information Services (IIS) Internet Server Application Programming Interface (ISAPI) 8/9/2006 Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.
6
WSRF.NET Architecture ASP.NET with Web Services Extensions (WSE)
ASP.NET: Set of Microsoft technologies for web development built on top of the .NET Framework and the CLR. Allows for development in several languages: C#, VB, Jscript.NET, even Perl and Python. The .NET Framework exposes a number of useful class libraries and tools for rapid software development. Wrapper Web Service automatically generated by WSRF.NET based on the author’s service, encapsulates the service providing a friendly interface to ASP.NET. ASP.NET with Web Services Extensions (WSE) Wrapper Web Service automatically created by WSRF.NET 8/9/2006 Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.
7
WSRF.NET Architecture WS-Resource implemented with ADO.NET
WS-Resource: implemented using database support of ADO.NET The result is serialized by ASP.NET and sent back to the client. WS-Resource implemented with ADO.NET Serialized result returned to client 8/9/2006 Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.
8
WS-Resource WS-Resource implementation Ability to query complex states
Ease to access multiple resources Lookup based on key and state contents Web services are in nature stateless. You could keep track of state at a session level but that is very limited for long running processes and other type of applications. As mentioned before, WSRF is a standard for stateful web services. There are many ways of implementing a WS-Resource. WSRF.NET uses the database support of ADO.NET to implement this specification. Before execution of a method, the wrapper retrieves an object from the database using the EPR provided by the client. This object is then loaded as a data member into the Web Service. The Web Service executes the method, after completion, the new state is stored into the database for future use. Ability to query complex objects (states): if using XML databases, where objects can have an arbitrary schema. If using relational database, objects (or states) can be stored as raw binary. Ease to access multiple resources: give me all the resources assigned to client X. Lookup based on key and state contents: update all expired resources. 8/9/2006
9
WS-Resource Portability, scalability and flexibility
No single-point of failure Efficient expiration check Provides an interface for customization More functionality that we have found a use for. If the states are kept in memory and if web server fails, states in memory are lost, clients have to restart. With this approach, as soon as the web server restarts, the client can continue working seamlessly. The expiration of resources can be efficiently accomplished using a simple update statement. No need to load objects into memory to check if they are expired. Customization will be explained later. 8/9/2006
10
Outline WSRF.NET Architecture Attribute-based programming
Compatibility with GT4 WSRF Issues 8/9/2006
11
Declarative & Imperative
Imperative programming Most common Methods define behavior of programs Declarative programming Declarations define behavior No need to write instructions Attributes are used to define behavior Imperative programming is what we are used to, we provide instructions for the computer to execute. When writing imperative programs, we make the algorithm explicit and leave the goal implicit. On the other hand, declarative programs make the goal explicit and leave the algorithm implicit (Wikipedia). We can label a method or class with some functionality, we define how the class is going to behave but we don’t provide the algorithm, we don’t care about the algorithm. [WebMethod] public string Hello() {return “Hello World”;} 8/9/2006 Wagner, B. (2005). Effective C#.
12
WSRF.NET Attribute Usage
Attributes easily define: Resources Resource Properties Port Types Aids development of grid services In the upcoming slides we will see how we can use attributes to define resources, RPs and Port Types. WSRF.NET has a great collection of attributes. It has attributes not only for development but also for the deployment of grid services. I will cover the most important ones. Aids the development of web services by complying with specifications. 8/9/2006
13
Attributes for Web Service
[WebMethod] public string Hello() { return “Hello World”; } public DateTime GetDate() return DateTime.Now; Used to create the service logic ASP.NET creates: WSDL document Support to route SOAP requests HTML pages to test web service Security provided by WSE The first thing the author of a service should do is to implement the service logic or business logic of the service as if it were a normal class. By adding the WebMethod attribute we get … no need to use a separate tool to create WSDL. Also since WSRF.NET services are web services we inherit the WS-Security provided by WSE, which provides great flexibility, you can use kerberos tickets, certificates, username/password or any other customization you would like. 8/9/2006
14
Attributes for Stateful Resource
class PackageService { [Resource] Package pkg; PkgRoute route; PkgLocation location; … WS-Resource is an abstraction for a collection of state WS-Resource addressed by EPR Resource is the collection of members with [Resource] attribute A WS-Resource is a “composition of a web service and a stateful resource” [1]. In effect, a WS-Resource is an abstraction for a collection of (possibly dynamically varying) state that is manipulated by a particular web service. The values of the fields … at a given point in time establish the state of the package service. This WS-Resource abstraction is retrieved by an EPR, which is unique for each resource. The physical resource is the collection of members with the [Resource] attribute. 8/9/2006 Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.
15
Attributes for Stateful Resource
class PackageService { [Resource] Package pkg; PkgRoute route; PkgLocation location; … Resource stored in the database with key: URL + Resource Unique ID EPR in SOAP message contains: <Address> + <ReferenceProperties> Resource loaded from database Values placed in web service’s members URL of the service + Resource UID <Address> + <ReferenceProperties> If those two match, the resource is loaded from DB 8/9/2006 Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.
16
Attributes for Stateful Resource
class PackageService { [Resource] Package pkg; PkgRoute route; PkgLocation location; … WSRF.NET allows customization Just implement IResource Not all web methods require all values The IResource interface is a powerful mechanism for incorporating existing or highly customized resources into WSRF.NET. For example, it is not necessary to load all data that might be considered part of a Resource on every web method invocation. 8/9/2006 Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.
17
Attributes for Resource Properties
class PackageService { [Resource] Package pkg; [ResourceProperty] public string Sender get return pkg.Sender; } … Resources described in Resource Property Document (RPD) RPD is composed of ResourceProperties All members with [ResourceProperty] define RPD RP is the reflection of the state of a Resource. 8/9/2006 Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.
18
Adding Port Types to the Service
[WSRFPortType(typeof(GetResourcePropertyPortType))] [WSRFPortType(typeof(ImmediateResourceTerminationPortType))] public class PackageService { [Resource] Package pkg; … WSRF defines functions that may be supported WSRF.NET implements all current specifications Author’s can reuse them by declaring attributes If we want our service to respond to the GetResourceProperty method and the Destroy method, something that all services should implement, we would add attributes on the service class. Service authors can create their own port types to import into services as well. Parameters in attributes to further customization of its behavior. 8/9/2006 Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.
19
Outline WSRF.NET Architecture Attribute-based programming
Compatibility with GT4 WSRF Issues 8/9/2006
20
Compatibility with GT4 GT4 uses a different version of WS-Addressing than WSE 3.0 WSRF.NET makes process transparent GT4 clients can interact with WSRF.NET services and vice versa (being tested) WSRF.NET cannot send Notifications to both GT4 and WSE 3 services at the same time The WSA Namespace is not compatible among WSE 3 and GT4 (it was compatible in WSE 2). GT4 clients can interact with WSRF.NET services and vice versa by changing a setting in a configuration file. WSRF.NET cannot send Notifications to both GT4 and WSE 3 services at the same time. 8/9/2006
21
WSRF.NET & GT4 One of the issues with GT4 is that not everything is a service. Some are just components. If GT4 implements all its modules (i.e. Discovery) as a service then WSRF.NET can benefit from it. We are not there yet, but that is one of the goals. Obstacle, GT4 is not a set of services, but components. When Globus Toolkit and WSRF.NET interoperate seamlessly, WSRF.NET will be able to use all the High-level services adequate for Grid applications. Programmer’s will be able to benefit on having yet another option on which to implement their grid services. Say that WSRF.NET can benefit from it and vice versa. B. Sotomayor and L. Childers. Globus Toolkit 4, Programming Java Services 8/9/2006
22
Outline WSRF.NET Architecture Attribute-based programming
Compatibility with GT4 WSRF Issues Paper questions the WSRF standard which is good to develop better standards. 8/9/2006
23
Stateful vs. Stateless Service Oriented Architecture
Combines loosely coupled and interoperable services State clashes with Services Architecture Bond between client and service Loose coupling with stateless services Tighter coupling with stateful services Proxies mask services as objects SOA: encapsulation, loose coupling, contract, statelessness, discoverability State clashes with Services Architecture: Bond between client and service: WSRF makes the bond between client and services tighter than regular web services, clients are responsible for creation, destruction and maintenance (via Resource Properties) of the WS-Resources. Major vendors provide an object-oriented model for programming Web Services using proxies. They fit nicely on current programming model but they force us to treat them as distributed objects. This style of architecture promotes reuse at the macro (service) level rather than micro levels (eg. Objects). 8/9/2006
24
Complexity of Service-Side Code
Importing port types may raise issues Port types have their own resources The state and its Resource Property If one changes the other one has to change Unintuitive interface: // No WSRF: CheckPackageIn(Package pkg, string location) // WSRF: CheckPackageIn(string location) Not clear how much knowledge of the hosting environment the author must have. The timing for loading WS-Resource will impact the service. The state and its Resource Property: we don’t like to do two things in a programming language, it is error-prone. Need for a programming model that links Resources and Resource Properties. It can be argued that no link is good also. Unintuitive interface: In WSRF, the package is not an explicit parameter because it would be part of the resource. The “package” is referenced in the SOAP message via EPR. 8/9/2006 Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.
25
Conclusion WSRF.NET architecture
Complex application logic requires complex infrastructure WSRF potential is strong Decoupling will be difficult WSRF.NET helps WSRF Things to remember: WSRF.NET architecture, usage of database as Resource storage seems like a good idea Grid infrastructure will not be simple Decoupling of client and service will be difficult to achieve, the service not only exposes an interface but also, its state WSRF.NET helps improve WSRF. Main role player to achieve interoperability. Two major OS are Unix-based and Windows. 8/9/2006
26
Agnostic 1 OGSI and WSRF:
WSRF introduced to comply with new extensions to Web Services From WSE 2 to WSE 3 OGSI based on Web Services standards that changed WSRF emerged as the new standard 8/9/2006
27
Agnostic 2 Why .NET? Java platform was already taken
.NET aids in rapid development Windows OS is extremely popular Multi-language support 8/9/2006
28
Agnostic 3 What is “projection of state”?
View of the state of a Resource State is handled internally Promotes encapsulation Similar to properties in a class 8/9/2006
29
Agnostic 4 Compatibility with Globus? WSRF.NET can interact with GT4
They both expose grid services University of Virginia is establishing a Campus Grid with both GT4 and WSRF.NET 8/9/2006
30
Agnostic 5 WSRF.NET WS-Addressing (WSA)? Uses WSA form WSE 3.0
Uses the namespace of the request in a response Setting needs to be changed to send requests to non-WSE 3.0 services 8/9/2006
31
Agnostic 6 Concurrency issues in database?
Different services have different URLs WSRF.NET uses the URL as part of the key to store a resource Client is responsible for managing EPRs Databases can handle concurrency issues 8/9/2006
32
Agnostic 7 Is the identity of a WS-Resource exposed?
Identity is not exposed Means for the service to load WS-Resource Client provides EPR 8/9/2006
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.