10
A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

Embed Size (px)

Citation preview

Page 1: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

A PPARC funded project

Asynchronous Activities in SOAP services

Guy RixonIVOA Interoperability MeetingCambridge MA, May 2004

Page 2: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 2

What are Async. Activities?When a service does something between WSDL operations

Client starts activity by calling an operation Operation returns when service accepts the job Activity not subject to HTTP timeout

When client can check progress/final status without staying connected to service

Service publishes progress metadata Client can poll metadata or get notification message

When the activity can restart after service interruption

Page 3: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 3

Example with client restart

ServiceService

ClientClient

OK

Start query (…)

ClientClient

Keep me posted!

OK

ClientClient

33% done

ClientClient

66% done

ClientClient

Oops, gotta close!

ClientClient Back again. Did I miss much?

All done now

Page 4: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 4

Example with service checkpointing

ClientClient

ServiceServiceStart query (…)

OK

Back again…restart jobs from checkpoints

ServiceService

Oops, gotta restart!

ServiceService

33% done. Checkpoint. ServiceService

66% done. Checkpoint.

ServiceService

All done

ServiceService

Page 5: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 5

BenefitsFlexibilityRobustnessWe already have services that do this Proven useful

Better with a standard! Documented protocol Code reuse More facilities

Page 6: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 6

ProposalUse WS-ResourceFramework (WS-RF) It’s what WS-RF is for Grid (GGF) compatible Industry support promised Many OSS implementations in progress Lightweight standards; own

implementation?

Make our own profile where WS-RF is vague E.g. Define standard metadata for progress

notification

Page 7: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 7

Factory patternAny operation can start an activity WS-RF doesn’t specify messages to set up

context. No separate “factory service”. “Resource ID” for activity returned in SOAP

header. Client quotes resource ID in subsequent

messages (in SOAP header).

Page 8: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 8

WS-ResourceLifetimeService keeps state metadata of activity + cached results (e.g. MyDB keeps DB tables) Need to free up resource when job is done

Client controls the resource using ops spec’d in WS-ResourceLifetime: Delete resource when done Negotiate timeout

Resource can time out if client abandons it Deleted by service after timeout.

Page 9: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 9

WS-ResourcePropertiesEach WSDL port-type can have “resource properties” declared in WSDL XML metadata structures, schema

controlled

Client can poll these with operations spec’d in WS-ResourceProperties.Suggest defining an IVOA-standard “state of activity” metadata-structure.Suggest associating “state of activity” structure + polling operations with an “Activity” port-type Drop-in implementation of this port-type?

Page 10: A PPARC funded project Asynchronous Activities in SOAP services Guy Rixon IVOA Interoperability Meeting Cambridge MA, May 2004

<dd-mmm-yyyy> <<title>> 10

WS-BaseNotificationService can send messages to client for significant events in activity (Provided that client is also a SOAP service) Protocol defined by WS-BaseNotification Pushes state data (WS-ResourceProperties)

to client

IVOA can define standard notifications E.g. always notify when job complete or

failed.