wsrf.net

32
WSRF.NET Presented By: Fernando Trigoso Based On: Architectural Foundations of WSRF.NET by M. Humphrey and G. Wason

Upload: keisha

Post on 26-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

WSRF.NET. Presented By: Fernando Trigoso. Based On: Architectural Foundations of WSRF.NET by M. Humphrey and G. Wason. Outline. WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues. Background. WSRF WS-Resource WS-ResourceProperties - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: WSRF.NET

WSRF.NETPresented By: Fernando Trigoso

Based On: Architectural Foundations of WSRF.NET by M. Humphrey and G. Wason

Page 2: WSRF.NET

8/9/2006

OutlineOutline

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

Page 3: WSRF.NET

8/9/2006

BackgroundBackground

WSRF WS-Resource

WS-ResourceProperties WS-ResourceLifetime

WS-Notification

WSRF WS-Resource

WS-ResourceProperties WS-ResourceLifetime

WS-Notification

Page 4: WSRF.NET

8/9/2006

WSRF.NETWSRF.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

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

Page 5: WSRF.NET

8/9/2006

WSRF.NET ArchitectureWSRF.NET Architecture

ISAPI Filter

Wrapper Web Service

Author’s Service

Imported port type functions

WS-Resource

WS-Resource

WS-Resource

WS-Resource

IIS ASP.NETWS-Resource

“Backend”

ISAPI Filter

Wrapper Web Service

Author’s Service

Imported port type functions

WS-Resource

WS-Resource

WS-Resource

WS-Resource

IIS ASP.NETWS-Resource

“Backend”

Internet Information Services (IIS) Internet Server Application Programming Interface (ISAPI)

Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.

Page 6: WSRF.NET

8/9/2006

WSRF.NET ArchitectureWSRF.NET Architecture

ISAPI Filter

Wrapper Web Service

Author’s Service

Imported port type functions

WS-Resource

WS-Resource

WS-Resource

WS-Resource

IIS ASP.NETWS-Resource

“Backend”

ISAPI Filter

Wrapper Web Service

Author’s Service

Imported port type functions

WS-Resource

WS-Resource

WS-Resource

WS-Resource

IIS ASP.NETWS-Resource

“Backend”

ASP.NET with Web Services Extensions (WSE) Wrapper Web Service automatically created by WSRF.NET

Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.

Page 7: WSRF.NET

8/9/2006

WSRF.NET ArchitectureWSRF.NET Architecture

ISAPI Filter

Wrapper Web Service

Author’s Service

Imported port type functions

WS-Resource

WS-Resource

WS-Resource

WS-Resource

IIS ASP.NETWS-Resource

“Backend”

ISAPI Filter

Wrapper Web Service

Author’s Service

Imported port type functions

WS-Resource

WS-Resource

WS-Resource

WS-Resource

IIS ASP.NETWS-Resource

“Backend”

WS-Resource implemented with ADO.NET Serialized result returned to client

Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.

Page 8: WSRF.NET

8/9/2006

WS-ResourceWS-Resource

WS-Resource implementation

Ability to query complex states

Ease to access multiple resources

Lookup based on key and state contents

WS-Resource implementation

Ability to query complex states

Ease to access multiple resources

Lookup based on key and state contents

Database

Wrapper

Author’s Web Service

State of Resource

Database

Wrapper

Author’s Web Service

State of Resource

Page 9: WSRF.NET

8/9/2006

WS-ResourceWS-Resource

Portability, scalability and flexibility

No single-point of failure

Efficient expiration check

Provides an interface for customization

Portability, scalability and flexibility

No single-point of failure

Efficient expiration check

Provides an interface for customization

Database

Wrapper

Author’s Web Service

State of Resource

Database

Wrapper

Author’s Web Service

State of Resource

Page 10: WSRF.NET

8/9/2006

OutlineOutline

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

Page 11: WSRF.NET

8/9/2006

Declarative & ImperativeDeclarative & 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 Most common Methods define behavior of programs

Declarative programming Declarations define behavior No need to write instructions Attributes are used to define behavior

Wagner, B. (2005). Effective C#.

[WebMethod]public string Hello(){return “Hello World”;}

Page 12: WSRF.NET

8/9/2006

WSRF.NET Attribute UsageWSRF.NET Attribute Usage

Attributes easily define: Resources Resource Properties Port Types

Aids development of grid services

Attributes easily define: Resources Resource Properties Port Types

Aids development of grid services

Page 13: WSRF.NET

8/9/2006

Attributes for Web ServiceAttributes for Web Service

[WebMethod]

public string Hello()

{

return “Hello World”;

}

[WebMethod]

public DateTime GetDate()

{

return DateTime.Now;

}

[WebMethod]

public string Hello()

{

return “Hello World”;

}

[WebMethod]

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

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

Page 14: WSRF.NET

8/9/2006

Attributes for Stateful Resource

Attributes for Stateful Resource

class PackageService{

[Resource]Package pkg;

[Resource]PkgRoute route;

[Resource]PkgLocation location;

class PackageService{

[Resource]Package pkg;

[Resource]PkgRoute route;

[Resource]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

WS-Resource is an abstraction for a collection of state

WS-Resource addressed by EPR

Resource is the collection of members with [Resource] attribute

Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.

Page 15: WSRF.NET

8/9/2006

Attributes for Stateful Resource

Attributes for Stateful Resource

class PackageService{

[Resource]Package pkg;

[Resource]PkgRoute route;

[Resource]PkgLocation location;

class PackageService{

[Resource]Package pkg;

[Resource]PkgRoute route;

[Resource]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

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

Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.

Page 16: WSRF.NET

8/9/2006

Attributes for Stateful Resource

Attributes for Stateful Resource

class PackageService{

[Resource]Package pkg;

[Resource]PkgRoute route;

[Resource]PkgLocation location;

class PackageService{

[Resource]Package pkg;

[Resource]PkgRoute route;

[Resource]PkgLocation location;

WSRF.NET allows customization

Just implement IResource

Not all web methods require all values

WSRF.NET allows customization

Just implement IResource

Not all web methods require all values

Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.

Page 17: WSRF.NET

8/9/2006

Attributes for Resource Properties

Attributes for Resource Properties

class PackageService{

[Resource]Package pkg;

[ResourceProperty]public string Sender{ get {

return pkg.Sender; }}

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

Resources described in Resource Property Document (RPD)

RPD is composed of ResourceProperties

All members with [ResourceProperty] define RPD

Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.

Page 18: WSRF.NET

8/9/2006

Adding Port Types to the ServiceAdding Port Types to the Service

[WSRFPortType(typeof(GetResourcePropertyPortType))]

[WSRFPortType(typeof(ImmediateResourceTerminationPortType))]

public class PackageService

{

[Resource]

Package pkg;

[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

Wasson, G. (2006). WSRF.NET 3.0 Programmer’s Reference.

Page 19: WSRF.NET

8/9/2006

OutlineOutline

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

Page 20: WSRF.NET

8/9/2006

Compatibility with GT4Compatibility 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

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

Page 21: WSRF.NET

8/9/2006

WSRF.NET & GT4WSRF.NET & GT4

B. Sotomayor and L. Childers. Globus Toolkit 4, Programming Java Services. 2006.

Page 22: WSRF.NET

8/9/2006

OutlineOutline

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

WSRF.NET Architecture Attribute-based programming Compatibility with GT4 WSRF Issues

Page 23: WSRF.NET

8/9/2006

Stateful vs. StatelessStateful 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

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

Page 24: WSRF.NET

8/9/2006

Complexity of Service-Side Code

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:

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)

Humphrey, M., & Wasson, G. (2004). Architectural Foundation of WSRF.NET.

Page 25: WSRF.NET

8/9/2006

ConclusionConclusion

WSRF.NET architecture Complex application logic requires

complex infrastructure WSRF potential is strong Decoupling will be difficult WSRF.NET helps WSRF

WSRF.NET architecture Complex application logic requires

complex infrastructure WSRF potential is strong Decoupling will be difficult WSRF.NET helps WSRF

Page 26: WSRF.NET

8/9/2006

Agnostic 1Agnostic 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

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

Page 27: WSRF.NET

8/9/2006

Agnostic 2Agnostic 2

Why .NET? Java platform was already taken .NET aids in rapid development Windows OS is extremely popular Multi-language support

Why .NET? Java platform was already taken .NET aids in rapid development Windows OS is extremely popular Multi-language support

Page 28: WSRF.NET

8/9/2006

Agnostic 3Agnostic 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

What is “projection of state”? View of the state of a Resource State is handled internally Promotes encapsulation Similar to properties in a class

Page 29: WSRF.NET

8/9/2006

Agnostic 4Agnostic 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

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

Page 30: WSRF.NET

8/9/2006

Agnostic 5Agnostic 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

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

Page 31: WSRF.NET

8/9/2006

Agnostic 6Agnostic 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

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

Page 32: WSRF.NET

8/9/2006

Agnostic 7Agnostic 7

Is the identity of a WS-Resource exposed? Identity is not exposed Means for the service to load WS-

Resource Client provides EPR

Is the identity of a WS-Resource exposed? Identity is not exposed Means for the service to load WS-

Resource Client provides EPR