RESTfull Web Services ACS Web Services SIG Bill Donoghoe February 2004 Document-oriented distributed computing Goals Web Services and the REST architectural style Applications that span organisations and geographies Audience participation •Plenty of vendors of software development environments can tell you about “RPC via Port 80” (“OO over HTTP” or “distributed objects communicating across the WWW”) •REpresentational State Transfer – Architectural style of the Web – defined in Roy Fielding’s PhD thesis. •Building applications that cross organisational and/or geographic boundaries pose a number of significant issues (especially handling the “communication overheads”) •Please ask questions as we go What is a Web Service? A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine- processable format W3C Web Services Architecture ALMOST… •Should it cover situations where part of the interaction is conducted by a human? •Does the service consumer care how the service provider handled the request? •“machine processable format” is the key part of the definition. •There are other ways of viewing Web Serices, like … Web Service Definition (again) Three core components – The ‘service’ - the process that produces results in response to requests – The ‘document’ - the request encoded against an agreed schema (XML) – The ‘address’ - to access the service (URI) Plus – The ‘envelope’ - to separate transport information from the service payload (SOAP) Werner Vogels •Devotees of the REST architectural style contend that the envelope is unnecessary overhead •Document-oriented distributed computing is about the design of documents that you want to exchange and the protocols and addresses are just the glue to facilitate the exchange. Enter stage left ….REST REpresentational State Transfer (REST) Web Architectural style Resources (nouns) are accessed via URIs 4 methods (verbs) (GET,PUT,DELETE, POST) are used to transfer resource representations. Stateless transactions State is carried in or referenced by the messages exchanged by the provider and consumer (Web Service) •The Web came first and then Roy Fielding described the architectural style (which is significantly different to many other styles). Hyperlinks are another aspect of the Web that is different to other styles (GET URI). •HTTP only has 4 methods – GET, PUT, DELETE and POST •State is a property of a resource not a process. •State can be managed by both the service provider and the service consumer. A discussion about managing states within REST is a detailed topic in its own right. •A web service message (document -> representation of a resource) can contain references to tokens (i.e. other resources) that contain state information. Technically these could be expanded in the message each time (like an image reference in a HTML document) it is consumed by an application. Applications that span organisations and geographies Important characteristics for these applications – Loose coupling • Little or no control the service vendor • Only want to deal with “real” dependencies – Extensible • Get off the upgrade treadmill (evolution of applications and services) • Service providers can enhance service offering within existing interface • Service can “pass through” information that is irrelevant to current service. – Scalable • Service providers always want more customers •Real vs artifical dependencies •Artifical dependencies will be imposed during implementation (Eg. curreny conversion at an airport booth involves “voice”, “hand” and “legal tender” technologies. •Components should be able to evolve independently •More services using the same interface. •Current conversion applied to a contract. Loose Coupling Coupling has two parts: real coupling and artificial coupling One can never reduce real coupling One can never eliminate artificial coupling Tight coupling: high cost of artificial coupling Loose coupling: low cost of artificial coupling Tight and loose coupling are relative Dr Hao He 2003 “vendor lock-in” is an example of a tight coupling between the software vendors code and the customers application. RESTfull Web Services and Application Building Compatible with the Infrastructure of the Web – Apply Web scalability techniques, like caches, proxies and gateways. Service Oriented computing is – Relatively loosely coupled – Extensible – Document-oriented Bringing it all back to the committee. Other Web Service Acronyms SOA – Service Oriented Architecture SOAP – Simple Object Access Protocol WSDL –Web Service Description Language UDDI – Universal Description, Discovery and Integration Service (Publish, Find, Bind) SOAP – Service Oriented Architecture Protocol (hype) Resources ACS Web Services SIG Home page – http://www.acs.org.au/nsw/sigs/ws/ Yahoo Group – acswssig Should the resource page entries be moderated? – Not at all; – Autocratically, by the convener; – By rating of links by members; or – … To be completed. Thank You Questions?
Pages to are hidden for
"Rest Full web services"Please download to view full document