Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services Introduction Research Centre Jülich Big contributors to the Grid system A-WARE : An Easy Way to Access Grid Resources.

Similar presentations

Presentation on theme: "Web Services Introduction Research Centre Jülich Big contributors to the Grid system A-WARE : An Easy Way to Access Grid Resources."— Presentation transcript:

1 Web Services

2 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

3 Outline Motivation & History SOA Web services SOAP & WSDL Standardisation, WS-* Utopia ? Toolkits

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

5 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, [1] 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.

6 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

7 Loose Coupling "the state in which the impact of change (change in consumers, providers, or cross-cutting policies) is minimized across dependencies. [1] … like pornography ? [2] API vs. Service [3] 1. 2. 3.

8 Web Services A manifestation of a SOA … or a grounding of the SOA principals A world of (loosely coupled) Web services

9 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. * [1]

10 Source: Divide large-scale architectures into flexible services that can be combined, configured, and reused -> service components

11 Example use-case : Pizza … … 243432

12 ….. …

13 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 [1] for example) 1. ll=/msdnmag/issues/06/08/servicestation/default.aspx XML-Schema

14 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 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

15 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

16 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. l11.html

17 Orchestration Multiple invocations of services This composition of services can then also be published as a service see, BPEL [1] 1.

18 Security Either at the transport-level - SSL, etc Or, at the message level- WS-Security, etc Signing, Encryption all inside the SOAP message

19 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 …)

20 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

21 Microsoft picture WS-* covers Web services discovery, eventing, attachments, security, reliable messaging, transactions, and management. 1. * taken from [1] 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

22 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.

23 Toolkits Java Axis (1 & 2) [1] Also, ActiveSOAP [2], XFire [3,] Windows Communication Foundation (formally Indigo) [4] Lots of others, in other languages … 1. 2. 3. 4.

24 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

25 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. [1] Have Web services made it ? – they have had long enough … 1.

26 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 …


28 Web Services Resource Framework … create, address, inspect, discover, and manage stateful resources.

29 Outline State Factories Publishing state as XML WSRF Specifications UniGrids Outlook

30 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

31 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

32 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...

33 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.

34 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

35 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)

36 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

37 Back to pizzas … … 45345345345 p:status COOKING + Lifetime management of Pizza order + Subscription to status RP -> Notifications when it changes

38 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

39 GetResourceProperty Simple single resource property element getter May return multiple instances of the named RP. job:handle 1577

40 GetMultipleResourceProperties More sophisticated multiple property value retrieval job:handle job:executionState job:JobName 2824 Submitted xclock

41 QueryResourceProperties Execute an expression against the resource properties document xsd:any QueryExpression defines dialect by URI XPath 1.0, 2.0, XQuery, SQL, SPARQL

42 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.

43 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.

44 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

45 Resource Lifetime Operations Immediate Destruction Scheduled Termination xsd:dateTime xsd:duration

46 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.

47 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

48 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

49 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. 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)

50 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.

51 WSRF Future 1.2 Oasis Specification Good to use for next 2-3 years WSRF 2.0 ? Maybe WS-Transfer based [1] 1.

52 Summary Web services are great ! Thanks … to F.Wolf (FZJ), D. Snelling (FLE) For some of the slide material

Download ppt "Web Services Introduction Research Centre Jülich Big contributors to the Grid system A-WARE : An Easy Way to Access Grid Resources."

Similar presentations

Ads by Google