Introduction Research Centre Jülich Big contributors to the Grid system A-WARE : An Easy Way to Access Grid Resources 20082007200620052004 2009 UniGrids NextGRID DGI VIOLA OMII-Europe EGEE-II A-WARE CoreGRID Chemomentum LUCIFER eDEISA DEISA
Outline Motivation & History SOA Web services SOAP & WSDL Standardisation, WS-* Utopia ? Toolkits
Motivation Lots of different computers, different platforms, all around the world, all wanting to communicate … One could try with Java RMI … this might be ok in a tightly controlled (and java only!) world but take it further and interoperability, robustness, scalability, etc, would all be problems.
History Other technologies existed before Web services doing similar things (RPC, CORBRA, DCOM, Java RMI) SOAP first emerged in 1999 XML as the on-the-wire encoding for remote procedure calls,  Initially expanded to : Simple Object Access Protocol Which was quite accurate at the time Since then things have moved, and now SOAP is SOAP … 1.http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=396
Service Oriented Architecture Self-contained, self-describing, modular applications Published, located, and invoked across the internet Loosely coupled Well-defined external contracts Combination of services make up an SOA - Composable Independent development and management of client and provider
Loose Coupling "the state in which the impact of change (change in consumers, providers, or cross-cutting policies) is minimized across dependencies.  … like pornography ?  API vs. Service  1.http://www.soa-zone.com/index.php?/archives/16-Defining-loose-coupling.html 2.http://www.rds.com/doug/weblogs/webServicesStrategies/2002/11/18.html 3.http://www.itworld.com/nl/xml_prac/04182002/pf_index.html
Web Services A manifestation of a SOA … or a grounding of the SOA principals A world of (loosely coupled) Web services
Triangle Sending XML messages between services over the internet SOAP used to package and send an XML messages to a service WSDL used to describe the service UUDI used to find a service (although UDDI hasnt really taken off …) FIND PUBLISH BIND 1.http://www-306.ibm.com/software/solutions/webservices/pdf/WSCA.pdf * 
Source: http://www-128.ibm.com/developerworks/autonomic/library/ac-mgmtsoa// Divide large-scale architectures into flexible services that can be combined, configured, and reused -> service components
XML 125 (Actually, XML infoset is the data model, of which there are a number of representions, via encodings. The example above is an the most common encoding. Others are possible, see  for example) 1.http://msdn.microsoft.com/winfx/technologies/communication/default.aspx?pu ll=/msdnmag/issues/06/08/servicestation/default.aspx XML-Schema
SOAP Protocol for packaging and exchanging messages Familiar terms from the postal service : Envelope, Header, Body … Transport independent (which unfortunately doesnt seem to be exploited enough, although see http://msdn.microsoft.com/winfx/technologies/communication/default.aspx) Commonly uses HTTP POST, although could use sockets, Email, etc (although its not really how HTTP POST should be used) Protocol allows passage through multiple intermediaries on its route between Requester and Receiver (again similarities with the postal service can be noted) SOAP Header control information (e.g., address, transaction ID, security) SOAP Body Payload (e.g., pizza order) SOAP Envelope
WS-Addressing Transport-independent way of describing addresses and addressing messages. Endpoint Reference (EPR) Can be used to send indicate replies go to a different endpoint http://www.abc.com/service/pizza
WSDL – Web Service Description Language Machine readable contract for a web service Defines message syntax for messages sent to a service Used by tools, IDEs, etc types schema for the types which make up the messages message the input /output /fault messages for the operations defined in the portTypes portType consisting of a number of operations binding how to talk to the portTypes at the service endpoint service describes the endpoint where the service lives 1.http://www.intertwingly.net/stories/2002/02/15/aBusyDevelopersGuideToWsd l11.html
Orchestration Multiple invocations of services This composition of services can then also be published as a service see, BPEL  1.http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel
Security Either at the transport-level - SSL, etc Or, at the message level- WS-Security, etc Signing, Encryption all inside the SOAP message
Lots of standards (some not fully standardised – others competing) XML, XML Schema, SOAP, WSDL, MTOM, UDDI, BPEL, XKMS, WS-Policy, WS- MetaDataExchange, WS-SecurityPolicy, WS-Addressing, WS-Trust, WS-Federation, WS-Secure Conversation, WS-SecureExchange, WS-Privacy, WS-Authorization, WS-Transfer, WS-Addressing, WS-Reliability, WS-ReliableMessaging, WS- ReliableExchange, WS-Notification, WS-BaseNotification, WS- BrokeredNotification, WS-Topic, WS-Eventing, WS-Enumeration, MTOM, WS- AtomicTransactions, WS-BusinessActivity, WS-Coordination, WS-Composite Application Framework, WS-Coordination Framework, WS-Transaction Management, WS-Context, WS-Remote Portal, WS-Resource Framework, WS- Resource Properties, WS-Resource Lifetime, WS-BaseFault, WS-ServiceGroups, WS-Inspection, WS-Discovery, WS-PolicyAttachment, WS-PolicyAssertions, WS- Provisioning, WS-Manageability, WS-Distributed Management, WS-Choreography, WS-Choreography Description Language, WS-I, phew … (It seems that which ever way you want to use Web services, theres a standard out there for you …)
Standardisation W3C - XML Infoset, XML, XML Schema, SOAP, WSDL WS-I- WS-Security, other WS-*, WSRF OASIS - WS-I Base Profiles GGF- Grid specifics, OGSA profile of WSRF, WS-Naming, etc
Microsoft picture WS-* covers Web services discovery, eventing, attachments, security, reliable messaging, transactions, and management. 1.http://msdn.microsoft.com/library/en-us/dnwebsrv/html/wsmsplatform.asp * taken from  Messaging - XML, SOAP, WS-Addressing, MTOM Metadata - WSDL, WS-MetadataExchange, WS-Policy Security - WS-Security, WS-Trust, WS-SecureConversation Reliability - WS-ReliableMessaging Transactions - WS-Coordination, WS-AtomicTransction
Web Services Utopia *everything* is (or can be) in the message – addressing, security, reliability, etc. Such information is added into the SOAP header. So, for example, if datagram transport is used, it is still possible to ensure once-only reliable delivery, which is authenticated and protected. (fully transport independent – you could even print the SOAP message on to a piece of paper, and send it using the normal snail-mail) Everything the service requires in able to communicate with it published (WSDL, WS-Policy, etc). With good tool support the relevent WS-* specification is switched-on. -> no longer simple, requires tools, but the result is powerful.
Toolkits Java Axis (1 & 2)  Also, ActiveSOAP , XFire [3,] GLUE.net Windows Communication Foundation (formally Indigo)  Lots of others, in other languages … 1.http://ws.apache.org/axis/ 2.http://activesoap.codehaus.org/ 3.http://xfire.codehaus.org/ 4.http://msdn.microsoft.com/winfx/technologies/communication/default.aspx
The Web in Web services … ? Somewhat misleading (there is a movement called REST putting the Web back into Web services …) Internet Services is more accurate
Pessimists I Still Dont Buy It · No matter how hard I try, I still think the WS-* stack is bloated, opaque, and insanely complex. I think its going to be hard to understand, hard to implement, hard to interoperate, and hard to secure.  Have Web services made it ? – they have had long enough … 1.http://www.tbray.org/ongoing/When/200x/2004/09/18/WS-Oppo
The Web services architecture is sufficiently generic that lots of different types of systems/philosophies/approaches can be implemented/mapped/re-engineered using XML, SOAP, etc. One community is the Grid community. Their Web services specification family is called the Web Services Resource Framework (WSRF), and thats next …
Web Services Resource Framework … create, address, inspect, discover, and manage stateful resources.
Outline State Factories Publishing state as XML WSRF Specifications UniGrids Outlook
State Stateful Entities Exist, particularly on the Grid But no Web service standards for State Management Each system does it in an idiosyncratic way Integration impediment OGSA Needs to Formalize a mechanism to represent state WSRF specifications provide this A special kind of Web service –> a Grid Service
In regular Web services : Service defined in terms of the operations it implements Operation execution available at an endpoint address Lifecycle of a Web service is described in terms of deployment It is there or it isnt. No factory pattern, only discovery The Web Service itself is typically Stateless BUT Grids Need Access to Stateful Resources
Factory Pattern OGSA provides for dynamic creation of resources. Find it or Create it? The difference is moot: FindMeAThing (Description) -> HandleToThing or MakeMeAThing (Description) -> HandleToThing Creates a Resource when you need it Start a Job to do this... Pizza shop (factory) creates a pizza order resource Get me management interface for this experiment...
A Resource … A specific set of state data expressible as an XML document This is not typically all of the resources state! Has a well-defined identity and lifecycle Known to, and acted upon, by one or more Web services. It has many possible instances Files, database tables, EJB entities, XML documents, compositions of multiple data sources, virtualized executions of applications, etc.
A WS-Resource … Combination of a Web service and a Resource IdentityCan be uniquely identified/referenced LifetimeOften created & destroyed by clients StatePart of the state can be projected as XML TypeIts Web service interface
Resource Properties Use XML to model elements of resource state Associate state with a WSDL portType Use standard operations for getting, setting, querying Use standard mechanisms to subscribe to state changes (notification)
Why ? Basis for standard resource inspection, monitoring, and state management Intuition: Think of Resource Properties as an XML projection of the actual state of the resource WS-Resource has a ResourceProperties document attached to it XML of the RPD reflects the state of the underlying resource Elements of the state modelled as child elements of the RPD root Schema type of the RPD found in the WSDL
Back to pizzas … … http://www.pizaaworld.com 45345345345 p:status COOKING + Lifetime management of Pizza order + Subscription to status RP -> Notifications when it changes
WSRF Specifications WS-Resourcedefines a WS-Resource as a combination of a Resource and a Web service through which the resource can be accessed WS-ResourcePropertiesresource state as XML with standard operations for getting, setting, querying WS-ResourceLifetimelifetime management of a WS-Resource WS-ServiceGroupaggregations information about multiple WS-Resources or Web services WS-BaseFaultsstandisation of information contained in fault message WS-Notificationmechanism for publishing events to interested parties
GetResourceProperty Simple single resource property element getter May return multiple instances of the named RP. job:handle 1577
GetMultipleResourceProperties More sophisticated multiple property value retrieval job:handle job:executionState job:JobName 2824 Submitted xclock
QueryResourceProperties Execute an expression against the resource properties document xsd:any QueryExpression defines dialect by URI XPath 1.0, 2.0, XQuery, SQL, SPARQL
SetResourceProperties Three modes can be applied many times in any order in a single message. InsertAdd a new resource property UpdateReplace all properties with a given name. DeleteRemove all properties with a given name. However they must appear to happen in order. The final version of the RPD must validate.
Whole Document Operations GetResourcePropertyDocument Get the entire resource property document PutResourcePropertyDocument Replace the entire RPD with a new one The semantics are service specific, and very loose (could be quite dangerous. PutResourcePropertyDocument arbitrarily adjusts the projected state of the resource – quite possibly putting the resource into an confused/incoherent state) If the resulting document is different than the provided document, the resulting document is returned.
Resource Lifetime Immediate, synchronous destruction operation Time-based, scheduled destruction operation Resource properties: CurrentTimeCan be used to determine clock skew TerminationTimeCurrent scheduled termination time Notification of resource termination Define clear means by which resources can be destroyed Allow the Grid to Garbage Collect itself automatically
Notification Publish / Subscribe pattern Interest in some events – Subscription Events sent from Producer to Consumer(s) Example events : Changes to RP values WS-Resource lifetime events Addition or removal of entries from ServiceGroup 1.http://www.oasis-open.org/committees/wsn
ServiceGroup A general purpose WS-Resource which aggregates information from about multiple WS-Resources or Web services A SG entry includes member EPR + associated content (abstract) WSRF-RP used for representing the entries Members may be homogenous or heterogeneous Can have rules constraining membership and content Has a registration interface for adding entries WSRF-RL used for removing entries Can be used by registries, collective operations, etc
BaseFaults Set of common properties of a fault Convention for specializing common fault How common fault type is used in WSDL Why? Increases the likelihood that service requestors to automatically (without human intervention) understand and/or adapt to faults requires interface designers to define rich, structured fault messages Standard fault messages encourage tooling that can assist interface designers, service implementers, and client implementers
UniGrids Atomic Services Apart from the TSF everything is stateful Target Systems, Jobs, Transfers, etc, have a lifetime Lots of factories – TSS factory for JMS, SMS factory for FTS State published as RPs Notification messages Real world usage ! 1.http://www.unigrids.org Unicore/GS Hosting Environment Target System Factory TSF Target System Service TSS Job Mgmt Service JMS Storage Mgmt Service SMS Service Registry Resource Broker BPEL Workflow Service Globus Toolkit 4 Hosting Environment Higher- level Services File Transfer Service FTS Target System Factory TSF Target System Service TSS Job Mgmt Service JMS Storage Mgmt Service SMS File Transfer Service FTS UniGrids Atomic Service Interfaces (WP1&WP2)
Doubters Kind of like a XML version of CORBA A distributed objects system is too fine-grained Service-oriented systems are more course-grained 1.http://www.neresc.ac.uk/ws-gaf/
WSRF Future 1.2 Oasis Specification Good to use for next 2-3 years WSRF 2.0 ? Maybe WS-Transfer based  1.http://devresource.hp.com/drc/specifications/wsm/index.jsp
Summary Web services are great ! Thanks … to F.Wolf (FZJ), D. Snelling (FLE) For some of the slide material