resource-oriented architecture (roa) and rest

41
Resource-Oriented Architecture (ROA) and REST <div id=”author”>Scott Davis</div> 1

Upload: iasa

Post on 24-Jun-2015

5.799 views

Category:

Technology


2 download

DESCRIPTION

Scott Davis presented on Resource-Oriented Architecture (ROA) and REST on August 17th at IASA Denver.Google quietly deprecated their SOAP search API at the end of 2006. While this doesn't mean that you should abandon SOAP, it does reflect a growing trend towards simpler dialects of web services. Google joins a number of popular websites (Yahoo!, Amazon, eBay, and others) that offer all of the benefits of web services without all of the complexity of SOAP.In this talk, we look at the semantic differences between a Service-Oriented Architecture and a Resource-Oriented Architecture. We contrast RPC-centric interfaces with object-oriented interfaces. We discuss HTTP-RPC services that call themselves RESTful, and compare them to fully RESTful web services that leverage HTTP verbs like GET, POST, PUT, and DELETE. We look at RESTful implementations using Java Servlets and exploit Grails' native REST support.

TRANSCRIPT

Page 1: Resource-Oriented Architecture (ROA) and REST

Resource-Oriented Architecture (ROA) and REST

<div id=”author”>Scott Davis</div>1

Page 2: Resource-Oriented Architecture (ROA) and REST

2

Page 3: Resource-Oriented Architecture (ROA) and REST

Scott Davis

3

Page 4: Resource-Oriented Architecture (ROA) and REST

Web Services

4

Page 5: Resource-Oriented Architecture (ROA) and REST

5

Page 6: Resource-Oriented Architecture (ROA) and REST

6

Page 7: Resource-Oriented Architecture (ROA) and REST

WebServices

7

Page 8: Resource-Oriented Architecture (ROA) and REST

8

Page 9: Resource-Oriented Architecture (ROA) and REST

9

Dave Winer, co-creator of XML-RPC, SOAP, and RSS:

I love SOAP. SOAP was the lawyer of the family. It was the one that had the potential to bring everyone together.

But you’d have to say at this point that SOAP is a failure. How long are we supposed to wait for the magic of SOAP to happen?

9

Page 10: Resource-Oriented Architecture (ROA) and REST

“[With SOAP] we tried really hard to create a level playing field for small developers and

large developers.”

10

Page 11: Resource-Oriented Architecture (ROA) and REST

I was recently talking with Jeff Barr, Amazon's chief web services evangelist.

Amazon has both SOAP and REST interfaces to their web services, and 85% of their usage is of the REST interface.

11

Page 12: Resource-Oriented Architecture (ROA) and REST

Despite all of the corporate hype over the SOAP stack, this is pretty compelling evidence that developers like the simpler

REST approach.

I've always liked technologies that have low barriers to entry and grassroots adoption, and simple XML over HTTP approach seems to have that winning

combination.

12

Page 13: Resource-Oriented Architecture (ROA) and REST

RESTA set of architectural principles

SOAPA specification

13

Page 14: Resource-Oriented Architecture (ROA) and REST

REST is...

REpresentational State Transfer

14

Page 15: Resource-Oriented Architecture (ROA) and REST

Representational State Transfer (REST) is a software architectural style for distributed hypermedia systems like the world wide web. The term originated in a 2000 doctoral dissertation about the web written by Roy Fielding, one of the principal authors of the HTTP protocol specification, and has quickly passed into widespread use in the networking community.

Systems that follow Fielding's REST principles are often referred to as RESTful; REST's most zealous advocates call themselves RESTafarians.

(Source: http://en.wikipedia.org/wiki/Representational_State_Transfer)

15

Page 16: Resource-Oriented Architecture (ROA) and REST

Resource-Oriented Architecture

(noun-oriented)

Service-Oriented Architecture(RPC, verb-oriented)

16

Page 17: Resource-Oriented Architecture (ROA) and REST

17

Page 18: Resource-Oriented Architecture (ROA) and REST

18

Page 19: Resource-Oriented Architecture (ROA) and REST

???A ROA implementation

SOAPA SOA implementation

19

Page 20: Resource-Oriented Architecture (ROA) and REST

Syndication

20

Page 21: Resource-Oriented Architecture (ROA) and REST

21

Page 22: Resource-Oriented Architecture (ROA) and REST

Three things draw you in:

chronology (newest first)

syndication (it comes to you)

permalink (pass it on)

22

Page 23: Resource-Oriented Architecture (ROA) and REST

23

Page 24: Resource-Oriented Architecture (ROA) and REST

24

24

Page 25: Resource-Oriented Architecture (ROA) and REST

25

Page 26: Resource-Oriented Architecture (ROA) and REST

What is RSS?

• RDF Site Summary

• Rich Site Summary

• Really Simple Syndication

• Nothing: just three plain old letters

It’s a pity nobody used an ‘S’ for “Standardization” …

26

Page 27: Resource-Oriented Architecture (ROA) and REST

When? Who?RSS 0.9 Jan 1999 NetscapeRSS 0.91 Jul 1999 NetscapeRSS 0.91 Jun 2000 Dave WinerRSS 1.0 Dec 2000 RSS-DEVRSS 0.92 Dec 2000 Dave WinerRSS 0.93 Apr 2001 Dave WinerRSS 0.94 Jun 2002 Dave WinerRSS 2.0 Aug 2002 Dave Winer

RSS 2.0.1 Jul 2003 HarvardSource: RSS and Atom in Action

?!

RSS’ Troubled Childhood

27

Page 28: Resource-Oriented Architecture (ROA) and REST

When Atom emerged as a format intended to rival or replace RSS, CNET described the motivation of its creators as follows: "Winer's opponents are seeking a new format that would clarify RSS ambiguities, consolidate its multiple versions, expand its capabilities, and fall under the auspices of a traditional standards organization."

A brief description of some of the ways Atom 1.0 differs from RSS 2.0 has been given by Tim Bray, who played a major role in the creation of Atom:

28

Page 29: Resource-Oriented Architecture (ROA) and REST

The Atom syndication format was published as an IETF proposed standard in RFC 4287

The Atom Publishing Protocol was published as RFC 5023.

29

Page 30: Resource-Oriented Architecture (ROA) and REST

AtomA ROA implementation

SOAPA SOA implementation

30

Page 31: Resource-Oriented Architecture (ROA) and REST

The Atom Publishing Protocol uses HTTP to edit and author webresources. The Atom Protocol uses the following HTTP methods:

GET is used to retrieve a representation of a resource or perform a query.POST is used to create a new, dynamically-named resource.PUT is used to update a known resource.DELETE is used to remove a resource.

(Source: http://ietfreport.isoc.org/idref/draft-ietf-atompub-protocol/)

31

Page 32: Resource-Oriented Architecture (ROA) and REST

32

Page 33: Resource-Oriented Architecture (ROA) and REST

Who is using Atom?

33

Page 34: Resource-Oriented Architecture (ROA) and REST

34

Page 35: Resource-Oriented Architecture (ROA) and REST

35

Page 36: Resource-Oriented Architecture (ROA) and REST

36

Page 37: Resource-Oriented Architecture (ROA) and REST

37

Page 38: Resource-Oriented Architecture (ROA) and REST

Atom is...

An IETF Standard

RESTful

A syndication format

38

Page 39: Resource-Oriented Architecture (ROA) and REST

Resource-Oriented Architecture (ROA) and REST

<div id=”author”>Scott Davis</div>39

Page 40: Resource-Oriented Architecture (ROA) and REST

Scott Davis

Questions?Thanks for your time.

[email protected]

40

Page 41: Resource-Oriented Architecture (ROA) and REST

Photo Credits

http://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Atom_of_Atheism-Zanaq.svg/709px-Atom_of_Atheism-Zanaq.svg.pnghttp://www.flickr.com/photos/bmcirillo/422538824/http://www.flickr.com/photos/jrnoded/179322085/http://www.flickr.com/photos/adders/2961984289/http://www.flickr.com/photos/weaselmcfee/2858311819/http://www.flickr.com/photos/bblfish/637617442/http://www.flickr.com/photos/louspringer/504705017/

41