27
10 th Lecture COP 4991 COP 4991 Component-Based Software Development Component-Based Software Development Instructor: Masoud Sadjadi http://www.cs.fiu.edu/~sadjadi/ Teaching/ WSRF.NET WSRF.NET

10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

Embed Size (px)

DESCRIPTION

10 th LectureCOP-4991: Component-Based Software Development 3 Outline  WSRF.NET Architecture  Attribute-based programming  Compatibility with GT4  WSRF Issues

Citation preview

Page 1: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture

COP 4991 COP 4991 Component-Based Software DevelopmentComponent-Based Software Development

Instructor: Masoud Sadjadihttp://www.cs.fiu.edu/~sadjadi/Teaching/

WSRF.NETWSRF.NET

Page 2: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 2COP-4991: Component-Based Software Development

AcknowledgementAcknowledgement Fernando Trigoso

Page 3: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 3COP-4991: Component-Based Software Development

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

Page 4: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 4COP-4991: Component-Based Software Development

BackgroundBackground WSRF

– WS-Resource WS-ResourceProperties WS-ResourceLifetime

WS-Notification

Page 5: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 5COP-4991: Component-Based Software Development

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

Page 6: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 6COP-4991: Component-Based Software Development

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”

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

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

Page 7: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 7COP-4991: Component-Based Software Development

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”

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 8: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 8COP-4991: Component-Based Software Development

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”

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

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

Page 9: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 9COP-4991: Component-Based Software Development

WS-ResourceWS-Resource 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

Page 10: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 10COP-4991: Component-Based Software Development

WS-ResourceWS-Resource 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

Page 11: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 11COP-4991: Component-Based Software Development

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

Page 12: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 12COP-4991: Component-Based Software Development

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

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

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

Page 13: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 13COP-4991: Component-Based Software Development

WSRF.NET Attribute UsageWSRF.NET Attribute Usage Attributes easily define:

– Resources– Resource Properties– Port Types

Aids development of grid services

Page 14: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 14COP-4991: Component-Based Software Development

Attributes for Web ServiceAttributes for Web Service

[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

Page 15: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 15COP-4991: Component-Based Software Development

Attributes for Stateful Attributes for Stateful ResourceResource

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

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

Page 16: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 16COP-4991: Component-Based Software Development

Attributes for Stateful Attributes for Stateful ResourceResource

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

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

Page 17: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 17COP-4991: Component-Based Software Development

Attributes for Stateful Attributes for Stateful ResourceResource

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

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

Page 18: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 18COP-4991: Component-Based Software Development

Attributes for Resource PropertiesAttributes 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

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

Page 19: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 19COP-4991: Component-Based Software Development

Adding Port Types to the ServiceAdding 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

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

Page 20: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 20COP-4991: Component-Based Software Development

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

Page 21: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 21COP-4991: Component-Based Software Development

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

Page 22: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 22COP-4991: Component-Based Software Development

WSRF.NET & GT4WSRF.NET & GT4

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

Page 23: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 23COP-4991: Component-Based Software Development

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

Page 24: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 24COP-4991: Component-Based Software Development

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

Page 25: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 25COP-4991: Component-Based Software Development

Complexity of Service-Side Complexity of Service-Side CodeCode

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 26: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 26COP-4991: Component-Based Software Development

ConclusionConclusion WSRF.NET architecture Complex application logic requires complex infrastructure WSRF potential is strong Decoupling will be difficult WSRF.NET helps WSRF

Page 27: 10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi

10th Lecture 27COP-4991: Component-Based Software Development

ReferencesReferences Architectural Foundations of WSRF.NET by M. Humphrey

and G. Wason. The Open Grid Services Architecture, Version 1.0. I.

Foster, H. Kishimoto, A. Savva, D. Berry, A. Djaoui, A. Grimshaw, B. Horn, F. Maciel, F. Siebenlist, R. Subramaniam, J. Treadwell, J. Von Reich. Informational Document, Global Grid Forum (GGF), January 29, 2005.