applied rest - · pdf filerpc-based w eb services are mythically ... what makes soap...
TRANSCRIPT
![Page 2: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/2.jpg)
Over 13 years of software development experience
Has own software consulting company for design, mentoring, training and development
Currently working in Semantic Web, AOP, Grid Computing, P2P and security consulting
Speaker Qualifications
2
![Page 3: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/3.jpg)
Why Do We Care?REST ConceptsREST ExamplesREST MotivationBuilding RESTful InterfacesConclusion
Agenda
3
![Page 4: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/4.jpg)
Why DoWe Care?
![Page 5: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/5.jpg)
“Conventional” Web Services are often too difficult for non-trivial tasks (real complexity)
too complex for trivial tasks (artificial complexity)
RPC-based Web Services are mythically interoperable and time/process coupled in painful ways
WS-Dissatisfaction
5
![Page 6: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/6.jpg)
What Makes SOAP Difficult?
Will the real SOAP intended use please stand up?
Remote Procedure Calls
Application Protocols
Tunneling using existing Application Protocols (HTTP)
6
![Page 7: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/7.jpg)
Security Abominations
Tunneling SOAP through firewalls is a questionable practice
HTTP is not a transport protocol!
Intermediaries can only route to endpointsNo actionable semantics in RPC interactions
7
![Page 8: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/8.jpg)
SOA
Service-Oriented Architecture (SOA)An architectural style promoting loose
coupling among software participantsCompanies have rigid definitions of what
constitutes a SOAMust Publish/Find/Bind = UDDI/WSDL/SOAP?
8
![Page 9: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/9.jpg)
SOAP 1.2 and Doc Lit are improvements, but are they necessary?
What is the problem we are trying to solve?We already have an example of a scalable
software architecture for network applications
SOA What?
9
![Page 10: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/10.jpg)
Vendors are fineHowever, too many are trying to sell you the same thing repackaged without thinking about what we are trying to solve
CORBA ORB and tools ✘
EJB Container ✘
SOA-complexity managing tools ✔
Return of the Vendors
10
![Page 11: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/11.jpg)
If You Build It...
...they will use RESTAnecdotally, 85% of Amazon’s users choose REST over SOAP
11
![Page 12: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/12.jpg)
RESTConcepts
![Page 13: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/13.jpg)
What is REST?
REpresentational State Transfer (REST)An architectural style based on certain
constraints designed to elicit properties of scalability and extensibility
An idealized notion of how the early Web should work
Helped drive the way it eventually did work
More than just URLs!
13
![Page 14: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/14.jpg)
Anything that can be named/referred toFiles
Services
Concepts
What is returned can change over timeConsider the “trunk” version of a file in Subversion
Resource
14
![Page 15: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/15.jpg)
Generality by allowing different typesStatic or Dynamic
Flexibility through late binding negotiation of type
Abstract references that do not necessarily need updating when the underlying format changes
GIF->PNG
Resource Abstraction
15
![Page 16: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/16.jpg)
Means of naming a resourceStandard syntax that allows various schemesKnown as URIs (or IRIs)Orthogonal to satisfying the referenceOne of the main missing pieces of “normal”
web services
Resource Identifier
16
![Page 17: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/17.jpg)
A particular deferencing of a Resource Identifier to a Resource at a particular time
Think the file “index.html” or
“Today’s Slashdot Page”
A byte-stream tagged with metadataCould change based on request or
processing/display capabilities of clientFirefox vs. WAP
Representation
17
![Page 18: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/18.jpg)
Accompanies a RepresentationAllows intermediaries to make decisions (caching)
Helps clients know how to display the Resource
IncludesMIME Type
Last modified date
Resource/Representation Metadata
18
![Page 19: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/19.jpg)
REST Verbs
Design decision to minimize the breadth of the interface
RPC is completely open-ended from an action perspective
19
![Page 20: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/20.jpg)
GET
Retrieve a Resource
20
![Page 21: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/21.jpg)
POST
Create a Resource
21
![Page 22: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/22.jpg)
PUT
Update a Resource
22
![Page 23: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/23.jpg)
DELETE
Remove a Resource
23
![Page 24: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/24.jpg)
RESTExamples
![Page 25: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/25.jpg)
All of these web servers can certainly expose RESTful interfaces
Once you look under the hood, however, it becomes more complicated
Why Not Apache? Tomcat? IIS? Jetty?
25
![Page 26: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/26.jpg)
NetKernel
Ground up generalized architecture built around REST
Microkernel maps requests for resources into the software components that will satisfy the requests
Benefits from the architectural properties we have discussed
26
![Page 27: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/27.jpg)
RESTlet
Lightweight Java-based REST frameworkAlternative API to Servlets for cleaner match
to REST conceptsSupport for filters, authentication logging,
blocking and non-blocking IO
27
![Page 28: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/28.jpg)
RESTMotivation
![Page 29: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/29.jpg)
Concepts are based on Roy Fielding’s work- On his Ph.D. Thesis “Architectural Styles and the Design of Network-based Software Architectures”
- On HTTP 1.0/1.1 Standards
- On Apache, libwww and related projects
The REST is History
29
![Page 30: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/30.jpg)
Software Architecture
30
“A software architecture is defined by a configuration of architectural elements —
components, connectors, and data —constrained in their relationships in order to
achieve a desired set of architectural properties.”
-- R.F. Thesis
![Page 31: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/31.jpg)
Architectural Style
31
“An architectural style is a coordinated set of architectural constraints that restricts the
roles/features of architectural elements and the allowed relationships among those elements within any architecture that
conforms to that style.”
-- R.F. Thesis
![Page 32: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/32.jpg)
Architectural Effects
Choice of a particular architectural style has consequences for how components communicate
Affects overall growth potential and performance of a system
32
![Page 33: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/33.jpg)
Architectural Properties Of Interest
PerformanceScalabilityGeneralitySimplicityModifiability
33
![Page 34: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/34.jpg)
REST Goals
Provide architectural guidanceMinimize latency of network software
applicationsMaximize component independence and
scalabilitySupport extensibility through small, well-
defined abstract interfaces
34
![Page 35: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/35.jpg)
Supports Separation of Concerns (SOC)UI code can be localized in clientBackend logic can be localized in server
(reused by different clients)
Client-Server
35
![Page 36: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/36.jpg)
Client-Server
36
![Page 37: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/37.jpg)
All parameters travel with requestNo session information maintained on serverImproves scalability through load-balancingImproves visibility of intermediary processors
Stateless
37
![Page 38: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/38.jpg)
Stateless Client-Server
38
![Page 39: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/39.jpg)
Decentralization of dataCan be wholly or partially copied aroundImproves accessibility and scalabilityImproves user perception of performanceIntroduces need to keep data in synch
Replication
39
![Page 40: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/40.jpg)
Form of replication when external data set is too large to copy locally
Results of individual requests can be captured and re-served later
Cache
40
![Page 41: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/41.jpg)
Improves generality, simplicity and reusabilityCan cause performance issues when data
needs conversion to/from standard formats but REST tries to optimize for average Web data types
Uniform Interface
41
![Page 42: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/42.jpg)
Stateless Client-Server w/ Cache and Uniform Interface
42
![Page 43: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/43.jpg)
Managed dependencies between layersImproved modifiability by compartmentalizing
visibility to neighboring layers
Layered System
43
![Page 44: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/44.jpg)
Layered Stateless Client-Server w/ Cache and Uniform Interface
44
![Page 45: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/45.jpg)
REST Properties
45
Based on figure from R.F.’s thesis
![Page 46: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/46.jpg)
BuildingRESTful
Interfaces
![Page 47: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/47.jpg)
What is Controversial
47
URI OpacityHow much meaning should there be in
URIs?How do naming schemes
affect intermediary processing?make the Web brittle?differ by language context?
![Page 48: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/48.jpg)
tbl on URI Opacity
48
“When you are not dereferencing you should not look at the
contents of the URI string to gain other information.”
http://www.w3.org/DesignIssues/Axioms.html
http://www.flickr.com/photos/ajstarks/152558066/
![Page 49: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/49.jpg)
Roy on URI Opacity
49
"REST does not require that a URI be opaque. The only place where the word opaque occurs in my dissertation is where I complain about the opaqueness of cookies. In fact, RESTful applications are, at all times, encouraged to use human-meaningful, hierarchical identifiers in order to maximize the serendipitous use of the information beyond what is anticipated by the original application."
http://tech.groups.yahoo.com/group/rest-discuss/message/3232
![Page 50: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/50.jpg)
UnREST
50
REST is largely defined by a small number of semi-formal specifications, a larger number of secondary publications and writings, and the collected design notes, anecdotes, and essays of Tim Berners-Lee. Among these artifacts there are a number of contradictions, a number of ambiguities, and perhaps at least some assertions and principles which are not sufficiently supported. Where certain
principles and assertions can be formalized and their observable impact quantifiably understood, REST is solid...
My beef with the Opacity Axiom (hereafter, "the axiom") is that it (needlessly, IMHO) discards the important and useful concept of structured naming and semantically rich namespaces. In filesystems research and elsewhere over the last decade or two (described in slightly more detail in OpacityReconsidered) many researchers
have recognized the power and utility gained by enriching the structure and semantics of names and namespaces. The Web, curiously, runs absolutely counter
to this trend.
--Jeff Bone
(http://rest.blueoxen.net/cgi-bin/wiki.pl?OpacityMythsDebunked)
![Page 51: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/51.jpg)
Encoding Meaning in Structure
Which is more meaningful? (To Whom?)http://www.bosatsu.net/talks/NFJS/2006/REST
http://www.bosatsu.net/12123125231234123412
51
![Page 52: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/52.jpg)
Hierarchies
52
http://www.bosatsu.net/talks/NFJS/2006/REST
Organizational
TemporalTopical ?
![Page 53: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/53.jpg)
Hierarchical + Non-Hierchical
53
http://www.bosatsu.net/talks/NFJS/2006/REST/Reston
Organizational
TemporalTopical ?
![Page 54: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/54.jpg)
When You Aren’t Sure
54
http://www.bosatsu.net/talks/NFJS/2006?talk=REST&location=Reston
Use query strings for non hierarchically-related attributes
![Page 55: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/55.jpg)
Pragmatic REST
At a minimum, URIs must be able to be treated opaquely
Hierarchical spaces are conveniently represented through the path portion of a URI
Non-hierarchical attributes should be delegated to the query parameters
55
![Page 56: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/56.jpg)
Do not rely on sessions or other state at the application level
Use nouns, not verbsDon’t abuse GET!No side effects
Don’t abuse POST!Limit use to creation, not conversational GET
What Isn’t Controversial
56
![Page 57: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/57.jpg)
Real World Examples
57
Amazon http://www.amazon.com/gp/aws/landing.html
eBay http://developer.ebay.com/developercenter/rest
Yahoo! http://developer.yahoo.com
Bloglines http://bloglines.com/services/
Atom http://tools.ietf.org/wg/atompub/draft-ietf-atompub-protocol/
Ruby on Rails (1.2)
http://www.rubyonrails.org/
![Page 58: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/58.jpg)
Conclusion
![Page 59: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/59.jpg)
Describing RESTful services to clientsPublishing metadata about RESTful servicesTransactionsConversational State
Open Issues
59
![Page 60: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/60.jpg)
REST may not be the only answer, but it is often the more straightforward answer
REST is more than using URLs to access web services
It is the deliberate application of architectural constraints to elicit the properties of scalability, simplicity, modifiability, generality and performance
Main Points
60
![Page 61: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/61.jpg)
REST started off as the idealized notion for a scalable network software application architectural style
It has become the architectural style of the Web
Software built around REST principles demonstrates similar characteristics (NetKernel)
Nothing necessarily to buy, not a steep learning curve
Selling REST
61
![Page 62: Applied REST - · PDF fileRPC-based W eb Services are mythically ... What Makes SOAP Difficult? Will the real SOAP intended use please stand up? Remote Procedure ... scalability and](https://reader031.vdocuments.net/reader031/viewer/2022030501/5aad6c0a7f8b9a2e088e2c06/html5/thumbnails/62.jpg)
References
62
Resource Location
Roy Fielding’s Thesis http://tinyurl.com/cvamh
RESTWiki http://tinyurl.com/om38p
Paul Prescod’s REST Thoughts http://www.prescod.net/rest/
NetKernel http://www.1060.org
RESTlet http://www.restlet.org
Flickr Hammock Picture http://tinyurl.com/ehc7j